Gmail + aliases

August 29th, 2008 by Leandro Morgado

Gmail has a cool nifty feature. It allows you to use append a string to your email address and still receive it. For example, say your email address is If mail is sent to you will still receive it in your regular inbox.

Why is this useful? Some might use this to combat spam, but personally I think Gmail’s spam filter does the job.

What is really neat is that you can use Gmail filters on to automatically label or star an email. For example, say everytime you apply for at a job board, you give out the address. You can then apply a label filter to have all your job application related emails neatly organized with a “Jobs” label.

MySQL Passwordless Login

August 12th, 2008 by Leandro Morgado

MySQL allows user specific options to be placed in a user options file under your home directory. This is handy if you use automated scripts or want to avoid typing in your MySQL user’s password everytime you login in. To do this, create the ~/.my.cnf with the options below:


Then make sure no one else on the system can read this file. It’s essential for security as it contains your password in clear text!

$ chmod 600 ~/.my.cnf
$ ls -l ~/.my.cnf
-rw------- 1 alice alice 36 Aug 12 17:49 /home/alice/.my.cnf

Now you can just type mysql to login. Note that this will work for other MySQL clients like mysqldump. And you can always override the .my.cnf settings in the command line. For example:

$ mysql -ubob -pbobspassword

You can add other parameters to this file. For a full reference check out: