command prompt setting for my sanity

I have finally decided to change my usual command prompt setting to avoid countless times of typing pwd, ls -l, stuff like that. If you find yourself typing a lot of certain commands to just get the status of your current directory, then I suggest you to take a look at the following so you may save some typing in the long run. Here you go. I am using the bash shell btw. All changes should go into your local ~/.bash_profile . ...

June 4, 2011 · 3 min · birdchan

Shortcut for going to beginning or end of a line in osx

If you are coming from a PC background, your usual HOME and END keys won’t work, and you will have no choice but to use your mouse… Time to learn the osx shortcut keys! Command + Left-arrow move to the beginning of the current line. Command + Right-arrow move to the end of the line. Option + Left-arrow move to the beginning of the closest word Option + Right-arrow move to the end of the closest word ...

June 3, 2011 · 1 min · birdchan

Setting up mcrypt for php

I found a very detailed step-by-step guide to install the mcrypt php extension on snow leopard. It’s not as simple as doing an apt-get, so I am posting the link here for future reference. ;) http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on-mac-os-x-snow-leopard-10-6-1/

June 3, 2011 · 1 min · birdchan

Tune up an Innodb database

I found an excellent guide to tune up an Innodb database at http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/. It got very practical info.

May 26, 2011 · 1 min · birdchan

mod rewrite

If you want to enable wordpress’ permalinks, it’s actually quite simple. Instead of displaying: http://birdchan.com/home/?p=2034 you can have it displayed as: http://birdchan.com/home/2011/05/25/mod-rewrite/ Picking the permalink format in the wordpress admin page is quite easy. The part that is a little tricky is on the server. Here are the steps: 1. If you have done it right, the .htaccess in your wordpress directory should look something like this: RewriteEngine On RewriteBase /home/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /home/index.php [L] 2. Then check your apache conf file. I am using ubuntu apache2 so your mileage may vary. Make sure you see the following settings enabled in /etc/apache2/sites-available/default ...

May 26, 2011 · 1 min · birdchan

Born this way

Glee S02E18 Born this way T-shirt titles Kurt: Likes Boys Brittany: I’m With Stoopid (Arrow Up) Puck: I’m With Stupid (Arrow Down) Mike: Can’t Sing Artie: Four Eyes Rachael: Nose Finn: Can’t Dance Sam: Trouty Mouth Tina: Brown Eyes Quinn: Lucy Caboosey Mercedes: No Weave Santana: Bitch (originally), then Lebanese (from Brittany) Lauren: Bad Attitude Mr. Schuester: Butt Chin Emma: O.C.D. (obsessive compulsive disorder)

May 22, 2011 · 1 min · birdchan

微笑

被人誤解的時候能微微的一笑,這是一種素養; 受委屈的時候能坦然的一笑,這是一種大度; 吃虧的時候能開心的一笑,這是一種豁達; 處窘境的時候能自嘲的一笑, 這是一種智慧; 無奈的時候能達觀的一笑,這是一種境界; 危難的時候能泰然一笑,這是一種大氣; 被輕蔑的時候能平靜的一笑,這是一種自信; 失戀的時候能輕輕的一笑,這是一種灑脫。 不管是有什麼事情,為了什麼原因, 我們每天都要開心一笑~~

May 18, 2011 · 1 min · birdchan

bimonthly

Does ‘bimonthly’ mean ’twice a month’ or ’every two months’? From Dictionary.com bi·month·ly –adjective 1. occurring every two months. 2. occurring twice a month; semimonthly. So, it’s both…. great… English language man, confusing since the first day I learned it.

May 11, 2011 · 1 min · birdchan

ㅋㅋㅋ

Sometimes I see a lot of these ㅋㅋ on my friends’ facebook updates. After a while I really can’t resist to look this up. As it turns out, ㅋ makes the K sound, so combining a lot of it makes the laughing sound. It’s similar to hehehehehheheh, or hahahahahahah, or lololololololol ….

May 11, 2011 · 1 min · birdchan

installing osx from an external hard drive

For whatever reasons if you need to install osx from an external hard drive, here are the steps I have tried and verified. In my case I installed snow leopard onto a mac mini from an external usb hard drive. First of all, go get the snow leopard image file in iso or dmg. Then we will need to prepare for your external hard drive. We are going to erase its content so please make a backup first. ...

May 8, 2011 · 1 min · birdchan