It really doesn't matter what his name is, what I know is I read his book, use his projects and admired him.
Be good - Why The Lucky Stiff.
Aug 17, 2009
Vim and CTaglist plugin
My ctaglist plugin stopped working after I migrated to my new MacBook Pro 13". After playing with it for a few minutes, I realized that my default ctags cmd is not correct. To have your ctaglist working, you have to use Exuberant Ctags. I am hoping this could save you some time for looking for the answer.
$> wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz
$> tar zxvf ctags-5.8.tar.gz
$> cd ctags-5.8
$> ./configure && make && sudo make install
You probably have to copy it over the old one if you not set the $PATH on you Mac( there is a ctags under /usr/bin)
$> sudo cp ctags /usr/bin/.
That's it, start you Vim, you are ready to go.
$> wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz
$> tar zxvf ctags-5.8.tar.gz
$> cd ctags-5.8
$> ./configure && make && sudo make install
You probably have to copy it over the old one if you not set the $PATH on you Mac( there is a ctags under /usr/bin)
$> sudo cp ctags /usr/bin/.
That's it, start you Vim, you are ready to go.
Aug 10, 2009
Render without calling the controller's action in Merb
I was working on a Merb project in the company, I found a common request is generate the report to view in the browser and also send the report as an attachment of an email in a cron job. Usually I have to do two parts of job, one is for the regular MVC parts to get the report in a browser. Then I have to generate the report and write it a file(html, text or pdf). Then send it out later. As you might see, there is a duplication here, I have to design the report twice. This really bothered me, why can't I just re-use the view templates which is used in the MVC. After poking around the merb-core source files, it turns out pretty easy to do that:
This is another reason I love Merb.
This is another reason I love Merb.
Aug 4, 2009
Enable/Disable bluetooth via cmd line
Since I got my new MacBook Pro 13", I found I constantly lost the connection with my bluetooth devices, like mouse or keyboard. It is so annoying that I have to reach my touch pad to disconnect the devices and re-connect them from the status bar or system preference. You'll know what I am talking about if you have the same problem as what I have. It is pretty pain.
Today, I found a command line tools for you to enable or disable the bluetooth, it is so handy. I just love it. Here is the link for blueutil.
Now, I can just issue the command: blueutil off and blueutil on, I am back on track again.
Today, I found a command line tools for you to enable or disable the bluetooth, it is so handy. I just love it. Here is the link for blueutil.
Now, I can just issue the command: blueutil off and blueutil on, I am back on track again.
Jul 16, 2009
How to enable colour when running autotest
This will be just a quick reminder.
After migrating my user account from the MacBook Pro 15" to 13", my ZenTest autotest lost its color in its output. To re-enable it, just put following line in the .bashrc:
export AUTOTEST=true
Not sure why my old system can run without this line. Anyway, it is working now. Back on road...
After migrating my user account from the MacBook Pro 15" to 13", my ZenTest autotest lost its color in its output. To re-enable it, just put following line in the .bashrc:
export AUTOTEST=true
Not sure why my old system can run without this line. Anyway, it is working now. Back on road...
Jul 8, 2009
Restore from time machine
Just got my new Mac Book Pro 13". It is REALLY pretty.

I was hoping the migration would be a breeze. But it turns out there is a catch.
Here is the little background. I have a Mac Book Pro 15" which was purchased in April 2008 ( 4GB, 2.6GHZ, 250GB ). I loved it, the only thing it missing is the multi-touch track pad, of course, it is not a uni-body. But I want the new 13", you know it would be nice to have if you have to carry it for some business trip.
First, I made a full backup of the 15" to the time machine. Then put in the installation DVD on 13", after reboot, I wipe the SSD drive and then from the menu bar selected Utilities > Restore System from Backup...

This brought up a dialog to let me select the Time Machine

Once you've selected your Time Machine volume, you can select which snapshot to restore from. I followed steps, and after 2 hours, it was done. Once it rebooted, every thing works fine, there is only one catch - no sound. You can hear the chim when starting the machine, but no sound devices found when you go to "system preferences". After googling for about another hour, tried several solutions. None of them worked for me. I guess that just is the driver's problem, but I have no idea which library to put onto my new machine. So I gave up searching, and re-do the installation. It turns out it is quite simple, the lesson I've learned is "Do not migrate a whole system, just the user account if you have different machines". Here is the steps:
Do are regular installation, once reboot, choose to migrate a user account from your time machine. After that, every thing works great!
A little thought about the better way to do it. The way that I did which migrated all the iWork08 to my new machine, although I can reinstall the iWork09. I was thinking maybe I can create a dummy user, login, do all the update and install all the new programs, then delete the dummy account, reboot, then migrate the user account. That would save me a lot of time. Maybe when snow leopard out...
I was hoping the migration would be a breeze. But it turns out there is a catch.
Here is the little background. I have a Mac Book Pro 15" which was purchased in April 2008 ( 4GB, 2.6GHZ, 250GB ). I loved it, the only thing it missing is the multi-touch track pad, of course, it is not a uni-body. But I want the new 13", you know it would be nice to have if you have to carry it for some business trip.
First, I made a full backup of the 15" to the time machine. Then put in the installation DVD on 13", after reboot, I wipe the SSD drive and then from the menu bar selected Utilities > Restore System from Backup...

This brought up a dialog to let me select the Time Machine

Once you've selected your Time Machine volume, you can select which snapshot to restore from. I followed steps, and after 2 hours, it was done. Once it rebooted, every thing works fine, there is only one catch - no sound. You can hear the chim when starting the machine, but no sound devices found when you go to "system preferences". After googling for about another hour, tried several solutions. None of them worked for me. I guess that just is the driver's problem, but I have no idea which library to put onto my new machine. So I gave up searching, and re-do the installation. It turns out it is quite simple, the lesson I've learned is "Do not migrate a whole system, just the user account if you have different machines". Here is the steps:
Do are regular installation, once reboot, choose to migrate a user account from your time machine. After that, every thing works great!
A little thought about the better way to do it. The way that I did which migrated all the iWork08 to my new machine, although I can reinstall the iWork09. I was thinking maybe I can create a dummy user, login, do all the update and install all the new programs, then delete the dummy account, reboot, then migrate the user account. That would save me a lot of time. Maybe when snow leopard out...
Subscribe to:
Posts (Atom)
