Create a folder called Payload

Place the .app folder inside of that.

Place a jpeg (512x512px) named iTunesArtwork (with no extension) into the same directory as the Payload directory.

Select the Payload Directory and the iTunesArtwork, right click or control click and select Compress 2 items.

Change the name of the resulting file from Archive.zip to WhateverYourAppNameIs.ipa.

curl -u username –silent “https://mail.google.com/mail/feed/atom” | perl -ne ‘print “\t” if //; print “$2\n” if /<(title|name)>(.*)<\/\1>/;’

cat ~/.ssh/id_rsa.pub | ssh user@remotehost ‘cat >> ~/.ssh/authorized_keys’

mmmmmmmm…..

For web servers using PHP as apache module:

AddType application/x-httpd-php .html .htm

For web servers running PHP as CGI:

AddHandler application/x-httpd-php .html .htm

In case you wish to do the ASP mimick:

For PHP as module:

AddType application/x-httpd-php .asp

OR

For PHP as CGI:

AddHandler application/x-httpd-php .asp

Open the Terminal and type:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

It may be necessary to log out and back in, or even to restart the computer (which is what the article states), for the change to take effect.

if you install mysql run this command please…

mysql_secure_installation

what does it do?

asks you set a password for root account
remove root accounts that are accessible from outside the local host.
remove anonymous-user accounts.
remove the test database, which by default can be accessed by anonymous users.

see… it’s important

here’s what happens

me@ubuntop:~$ mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we’ll need the current
password for the root user. If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

You already have a root password set, so you can safely answer ‘n’.

Change the root password? [Y/n] n
… skipping.

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
… Success!

Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
… Success!

By default, MySQL comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
– Dropping test database…
ERROR 1008 (HY000) at line 1: Can’t drop database ‘test’; database doesn’t exist
… Failed! Not critical, keep moving…
– Removing privileges on test database…
… Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Dec 292009

Mercurial is a very nice alternative to svn. I have several projects in it now and I’m pretty happy with it. Here are some starter commands. These should be executed from the command line in the directory that you want to control.

$ hg init # creates .hg

$ hg add # add those ‘unknown’ files
$ hg commit # commit all changes into a new changeset, edit changelog entry
hg commit -m ‘updated bad links to style sheet and changed directory name’

$ hg parents # see the currently checked out revision (or changeset)

$ hg status # show all non-ignored files

$ hg help

# export your current repo via HTTP with browsable interface on port 8000
$ hg serve -n “My repo”

hg revert –all -r 268033ec7859
Backing out changes

Reverting the whole tree to a known-good revision
It’s easy, like using a sledgehammer is easy. But this is usually overkill.

$ hg pull -u
$ hg revert –all -r a0193d83c208 # use your known-good revision id here
$ hg commit # be kind, include the revision id in your commit message
$ hg push

There’s a more precise alternative:
Backing out a single changeset
Suppose changeset f8f4360bf155 broke something.
$ hg pull -u
$ hg backout f8f4360bf155 # use the revision id of the bad change here
This creates and commits a new changeset that reverts all the changes in that revision.

Output 1 sample to a file
top -n 1 -b > top-output.txt

Output 1 sample to an email
top -n 1 -b | mail -s “Here’s my top” me@jamesborder.com

here is the mac version
top -l 1 | mail -s “Here’s my top mac” me@jamesborder.com

Send email while your at the teminal….
echo "The body of your email here" | mail -s "The Subject of your email here" me@jamesborder.com

A couple of “useful examples”?

send the last 100 line of the error log to yourself (or to a client that needs to see them but doesn’t know how to get to them)
tail -100 /opt/local/apache2/logs/error_log | mail -s "From error_log" me@jamesborder.com

send the last 10 lines of your command line history to your self
history | tail -10 | mail -s "Howd I do that" me@jamesborder.com

Yes I admit I have mangled MySql on my macbook very badly and it had to go…. here is what it took to do it

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
edit /etc/hostconfig and remove the line MYSQLCOM=-YES-
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*

© 2012 James Border Suffusion theme by Sayontan Sinha