Vim setting

Once again this is for my sanity. When using vi, I kept finding myself doing Ctrl-G just to know where I am in a particular file, i.e. which line number. To display that all the time, place the following settings in your ~.vimrc file. set number set ruler “set number” will place a vertical column on the left to show the line numbers. “set ruler” will place a bottom row to show the current line number and row number, plus where you are in the edited file in percentage. Very handy. ...

June 6, 2011 · 1 min · birdchan

tree

I didn’t know that osx doesn’t have the tree command, I guess I have been taking the linux dev env for granted. Here is a quick little guide to install tree from source. It will make your life a lot easier. http://shaunchapmanblog.com/post/329270449/how-to-install-the-tree-command-on-mac-os-x

June 6, 2011 · 1 min · birdchan

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