Skip to main content


Showing posts from February, 2008

Shortcuts makes your life easier

Do you find yourself always typing long paths over and over again? Maybe because that is your project path? In vim the first command you do is :lcd and you have to type it in all the time? Here's a small idea that might make your life a little easier. Softlinks... Make a directory on your home folder to keep all your softlinks. Make the directory name short. Maybe just one letter. I made mine s. ~$ mkdir s Then make the link in there. ~$ ln -s /long/path/to/project/folder s/project So now whenever you need to go there just key in: cd ~/s/project And tab autocomplete helps a lot here. Maybe you just need to type 4 keys (including tab) if you haven't got much links yet. And in vim? :lcd s/project and BAM you're working you're way to oblivion. Nice eh...

Running Plone behind an apache server

Alhamdullillah.. After a whole night of googling and hacking configurations I was finally able to configure Plone to run behind an apache server. I began my quest by googling and finding this page: . I don't need the ssl mentioned there but I did want to run Plone behind apache. But following the instructions didn't get me any result. So I tried to find out what on earth does the RewriteRule is actually about. After much googling again I found this: which also led me to an interesting albeit not really what I'm looking for now at . Sooooo... the [P] actually stands for proxy. Ok.. so now I'm getting somewhere. After much trial and error I finally figured out that I need to run: sudo a2enmod proxy sudo a2enmod proxy_http To enable the proxy function in my apache server. Once that is done, it seems the rules given

Recovering a file using subversion

Today I've just realized I actually deleted a file which is used in on of my projects. After googling for a while I found this which basically tells how to recover a lost file. To sum it up, you have to first find out which version the file still exists in (that would be the version just BEFORE the file was deleted). To do that use svn log to look for it. I searched for it with something like this: svn log --verbose | grep -B 10 name_of_file The -B option is how many lines before the found line should be displayed. Quite important as the version number is actually on top of the log and not on each file line. Once you know which version you have to recover from, it is a small matter of copying that file from the repository with a svn copy command: svn copy --revision num_of_revision http://path/to/file/in/repository ./name_of_file The file would be recovered and you'd have to

Enable .htaccess rewrite in Ubuntu Server

Fuh.. Finally after so long is up again. It seems that actually it wasn't my hardware that was broken but just the filesystem of my old hard disk. Now I've put in a new hard disk and installed Ubuntu Server 7.10 on it. And just for the site itself I've decided to try out drupal. Downloaded it and installed it. All seems to be going fine right now. No problems yet. Except for the pretty urls. I needed to enabled mod_rewrite and had no idea how to do that in Ubuntu Server. So after googling it a bit I found just the thing. Type: a2enmod rewrite That is short for apache2 enable module. That would create the necessary link in mods-enabled but I still couldn't use the pretty urls in drupal. Well, it turns out that the settings in sites-available/default would not allow override. So had to change AllowOverride None to AllowOverride All. It's good now.

Welcome to the Rojak

Hi there. Some of you might not know what rojak is, so let me just introduce that first. It is a type of food found here in Malaysia which consist of many types of food. Some of them fruits, some of them nuts, some of them fried things. Point is that all of them are just mixed up in a big bowl and added some sauce and that is it. Mixed up of many kinds of food. Here I will write a mix up of high-tech stuff ranging from things like Linux and Ubuntu to Smartphone and PDA's. Whatever that might come to mind.