Saturday, December 27, 2008

Laptop Reborn

Maybe it was the limited 512MB ram, maybe it was the rather slow Celeron 1.5 GHz processor, maybe because I didn't spend time tweaking it, whichever way it was my old laptop was really crawling under Fedora 9. Hearing that Fedora 10 is so much faster I was kind of tempted to try it out. But when I think back I haven't got much time to upgrade and tweak my laptop all the time, I decided to just go the bare minimum way. I decided to go back to Arch Linux. Back home.. :) It'll take some time to get it exactly right, but I know once it's exactly how I like it, it can stay that way for a very very long time but still updated due to Arch rolling release life cycle.

So I wanted something light. Very light. If possible no Gnome or KDE. So that's what I've got myself.. :D Installed xorg with Openbox. Fuh.. now finally my laptop loads under 1 minute again. In the end my desktop consist of openbox for window manager, wicd as network manager, docker as a dock manager, lal as clock in the dock, volwheel for a mixer, pcmanfm as the file manager and urxvt as a terminal emulator.

Learned quite a few stuff too while looking for the lightest software to run. One of them being audacious. I hate xmms. But I don't want to install amarok or even rhythmbox neither due to their rather heavy kde and gnome reliance. So after googling through the arch linux forums I found audacious. It uses gtk+ so selecting which files to play looks very good but still kept very lean and mean.

Another suprising discovery was wicd. I wanted a good network manager. I must admit gnome-networkmanager spoiled me a bit and I don't really want to have to go through the whole iwlist and iwconfig route anymore. Again the arch forums gave a hint about wicd. The interface is drop dead ugly compared to gnome-networkmanager but it works quite well. It automatically detects wifi ap and connects to them once the profile has been created. And since most of the time it just sits in the dock so you forget about the ugly interface after a while. At least till the next time you have to create another profile.. :P

I found out even the gnome-terminal has spoiled me a bit too. Now xterm looks pretty ugly to me. The fonts are so retro. I want beatifully rendered anti-aliased fonts. Again the arch forums and wiki came to the rescue and pointed me in the direction of rxvt-unicode. It can do a lot of other stuff apart from anti-aliased font (like unicode, transparency, and lots of other stuff) but I don't really need them all that much. I just need to be looking at smooth curves all the time. That's all... :D

So finally now my laptop is able to load up fully in under 1 minute and running everything I need to do my job, even mysqld and httpd. I'm happy.. till next time.. ;)

Sunday, December 21, 2008

No Sound From Dell Inspiron Mini using Ubuntu

Bless my mom. Even after a few weeks of using ubuntu on her Dell, she didn't realize that it cannot produce any sound at all. Recently my father was complaining about the windows on his Dell too, so he too wanted me to install ubuntu on it. Since now I've got a little bit more time on my hand, I wanted to do a proper job with all the codecs and flashplugin installed and everything.

But after installing flash, going to youtube I realized, "Hey, this thing is not making any sound at all". So after much googling, I came to find out that I have to add the following line to the /etc/modprobe.d/alsa-base file:

options snd-hda-intel model=dell

Once I've rebooted there was a new option in the mixer(Speaker). Just have to max that up and finally we have sound.. foss ftw :)

Friday, December 19, 2008

MyMeeting, Ubuntu Netbook and other stuff

There has been a lot of things happening for the past month or so until I've been so busy I didn't get the time to update my blog properly and even if I had the time I'd rather use it to sleep to get back my energy. Anyhow things are much calmer now and let me take this opportunity to say a few things.. :)

First off the bat, MyMeeting has won an AIPA (Anugerah Inovasi Perkhidmatan Awam) and it was awarded by The Pak Lah himself (some people call me Pak Lah too but this is the real Pak Lah, the one that's running this country. I don't wish to run this country.. :P) at the AKSA (Anugerah Kecemerlangan Sektor Awam) 2008 on 27th November 2008. Check out some of the pictures of the OSCC booth on that day here.

I guess I'm pretty proud that it won that award. Now I can write on my resume, one of the developers of an award winning system.. :) LOL.. somehow I like the sound of that.. :P Whichever way it is, it has drawn quite a lot of attention to MyMeeting. And finally we get feedback from users.. Yay.. \o/ And thus why I've been so busy. MyMeeting has been developed quite a lot since then and finally I think I can be truly proud of it. Most of the features that I've been saying it has but wasn't actually implemented is now implemented.. >.< You can check it out at the MyMeeting trac.

Apart from that, quite recently (as in around 3 weeks ago), I've bought for my parents Dell Mini Inspiron 9. So one for my father, one for my mother (using their money of course.. :P). The funny thing was that my mother's mini just kept on having problems. It wouldn't shut down properly so suddenly you find that it's battery has been completely drained. It sometimes wouldn't detect the mouse. But my father's one was a-okay. My mom asked me to fix it. What was my answer? "You know you wouldn't have this problem if it was running linux rather than windows xp :P"... So she agreed to let me install Linux on it.. \o/

So I went out to buy an external DVD drive (I know there's ways to install it using usb pendrive and all but I need an external DVD drive anyway.. :P) and promptly installed Ubuntu 8.10 on it. I've read that because the SSD have limited amount of write cycles you should limit the amount of writing to it as much as possible. So rather than formatting the hard disk with an ext3 that has journaling (and thus more writes for every file operation) I opted to use ext2. Some people would also suggest not to have a swap partition as there would be lots of writes there too. But I've read somewhere else that most of the time you don't use enough memory to require a swap if you've got 1GB of ram (which the Dell Mini has) and thus wouldn't use it even if it's there making it okay to create a swap partition. But I didn't create a swap partition because what's the point. If you want to create a swap partition for suspend and stuff you need to create it at least 2.5 times larger than your amount of RAM. The Dell Mini has only 8 GB of real estate. After installing Ubuntu you're left with only around 5GB (compared to only 3GB with bare windows). 2.5GB would take away half of the available space. So forget suspending this baby. Better just shut it down. Googled for Ubuntu netbook and followed the instructions written here. Made sure to add maximus and netbook-launcher to the list of programs run at start-up (System->Preferences->Session for those who doesn't know).

The verdict. After over two weeks of using it, my mom loves it.. :D Now she's not embarrased when she try to boot up the netbook in front of her friends it doesn't boot. Or when she tries to connect the mouse it doesn't work. It just works and it's interface is lovely. And then it happened... My wife asked me to install it on her EEEPC too.. :) Her EEEPC was still using the original custom Xandros which greatly limited the amount of software (and even drivers) available for her. So I went and installed it. And because it has a 20GB SSD, there's plenty of space to create the swap partition (which I did). So just like I suspected it now boots a lot slower than the original Xandros (but still much faster than any kind of windows xp installation.. :P) but at least now she's running the latest software and drivers. There's a whole lot more issue with the EEEPC actually and I've still haven't got the internal mic to work yet. But at least bluetooth doggle should work (actually I haven't tried it yet.. :P).

Fuh.. this has turned into a longer post than I thought. So I'll just end it here. If you're a PHP developer (especially if you're a CakePHP developer) please check out MyMeeting and who knows, maybe you can contribute something. If you're not a developer but you know how to install web apps (php, mysql stack) try installing mymeeting and see whether maybe your organization can use it. If not give us a feedback on why and maybe we can make it happen.. ;) If you're neither of that but you know someone who is, tell them about it.. :)

Alrighty then, till next time...

Sunday, December 14, 2008

Leon: The Professional -- Shape Of My Heart

He deals the cards as a meditation
And those he plays never suspect
He doesn't play for the money he wins
He doesn't play for respect
He deals the cards to find the answer
The sacred geometry of chance
The hidden law of a probable outcome
The numbers lead a dance

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart

He may play the jack of diamonds
He may lay the queen of spades
He may conceal a king in his hand
While the memory of it fades

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart

And if I told you that I loved you
You'd maybe think there's something wrong
I'm not a man of too many faces
The mask I wear is one
Those who speak know nothing
And find out to their cost
Like those who curse their luck in too many places
And those who fear are lost

I know that the spades are swords of a soldier
I know that the clubs are weapons of war
I know that diamonds mean money for this art
But that's not the shape of my heart


Great movie. Thanks to BuffaloSoldier for pointing it out. :)

Monday, November 17, 2008

Get only the second column of output

Little bash script which took me quite some time to figure out:

svn status | grep ? | awk '{print $2}'

Will get rid of the status field and that can be used to add to svn.

Friday, November 14, 2008

Food first post

My blogs' name is High-Tech Rojak but I don't recall ever talking about food. So here's a first. Just recently I got some free time and finally got to cook the pasta I've bought for ages. So here's an account of how it went down.. :)

Okay. That's the thing I cooked. I have no idea what it's called. At first I was thinking of buying the ribbon ones, then my wife looked at the colorful spiral ones and said "why not get these? they're more colorful" and so we got them (yes, we know nothing about pasta.. :) So I boiled it, actually put some salt and oil into the water so that they won't stick, drained it and tadaaaaa, you'd get the above. I remember once I tried to cook macaroni and I didn't drain it after boiling it, it filled up the whole pot. LOL... Learned my lesson.

Next up the sauce. Like I said we don't know anything about pasta so here's the ingredients we prepared.
Yes ladies and gentleman. Instant pasta sauce all bottled up and ready to go. Some dried up basil also bottled up. Some onions and garlic. Hahahaha... The sauce is "traditional" lagi tu.. So yes, it's about as authentic as I can get it till I learn to do better. So on the color spiral packaging mentioned about frying some onions, garlic and capsicum. Since I didn't have any capsicum, garlic and onions would have to do. So into the frying pot.Once the smell has risen (how DO you say "bau dah naik" in english ?) you can just dump in the sauce. Stir it around a bit. Put water into the bottle and add that to the pot too so that nothing gets wasted. Once it start boiling dump in the minced meat (apologise for my vegetarian or non-cow meat eating readers, the following pic is rather graphical.. :P ).

It doesn't look very impressive. Well, stir it up some more. Add diced vegetables. Add some salt (actually I overdid it with the salt >.< ). But in the end...
Tadaaaa... Looks pretty good eh.. :) A bit salty I know.. But still edible enough that we went to sleep with a full stomach and even got enough for breakfast. I didn't do the whole pasta thing again but eating the sauce with bread is really nice. Fuh.. Now I'm hungry again.. >.<

Monday, November 10, 2008 is AWESOME!!!

Lol.. I can't help but keep on writing awesome in big capital letters.. AWESOME!!! :D

That was the most awesome weekend that I have ever had. It's monday and I still feel the high.. >.<

There was so many great things about it and a lot of people have written about it. Here is just some of my thoughts and what I'd like to highlight (and can read back this entry in the future and feel the awesomeness again):

First impression when I just arrived was that the whole atmosphere was so cool. Everyone was friendly and down to earth. There was no special separation between any vip and the other participants or anything. Maybe I've just been to too many government conferences but I love this atmosphere and attitude.

Then I remember when Collins mentioned special thanks to the sponsors. First one he mentioned was Microsoft and all was quite. As soon as he said Mozilla, WHOA!! Everyone clapped and cheered. And so was for Mixi, Bytecraft, Inigo and APIIT. LOL!! I felt sorry for the Microsoft rep there but at least they didn't boo or anything. I guess we're polite. Makes me so proud.. :)

The Raj 'Dylan' strumming the "The Times They Are A-Changin' " song on his guitar. To tell the truth there was a few hiccups and most of the audience didn't know the song (yours truly included :P). But I thought it was great. Great for 2 things. One is the fact that "Hey, there's a guy who came forward and played his guitar at this conference.." and two is I find the lyrics very appropriate to how I feel about this conference. The fact that they was able to pull of this conference just shows that the foss community here is getting stronger and better and this could really be the sign of "Times They Are A-Changin'".

Yoon Kit gave the opening keynote about the "Format Wars". There wasn't any keynote from APIIT as scheduled. Then it was my talk. Hmmm.. I think it went well despite the slides was just prepared a few hours before the talk. Could have been better if I had prepared earlier but with MyGOSSCON and all that's pretty much the best I could do. There certainly was more interest from the audience than normally from government conferences. Even on Sunday there was still some of the participants come up to me to talk about mymeeting and cakephp. Love it. Hope I stirred up enough interest in MyMeeting to get even more feedback and participation from the community. I better buckle up too and make sure MyMeeting gets better and better all the time.

Then it was Google Summer of Code 101 by Raj 'Dylan' Kissu. Awesome talk. Wish I was still a student. I would certainly try my luck in getting into the Google Summer of Code. The opportunity to learn, the money incentive (4500 USD is a lot of incentive ;), the experience in getting involved with Google. After that Kaeru presented the Orca talk because En. Rahim wasn't able to make it. It was great.

I stayed awhile for the Navigating the Commons talk but in the middle of it decided I'd rather go to the fosschix session. I missed the main presentation by Pia (until now I still regret it..) but it was great. Just chatting about how to make the working hours more family friendly so that the ladies can get more involved in IT. Love it.

Lunch had McChicken. To tell the truth it was nearly enough for me. But I didn't come for the food anyway so I don't mind.

Then listened to Toru about OSS at Cool dude. Way cool.. :D you know how you read comics and all and you think, wow.. the japanese people are so cool. Well.. he's even cooler.. >.< Loved his style of presentation. Relaxed and walking around everywhere. I think if they have given him a clicker he might have actually walked of the stage and just talk and talk.

Then went to a "Birds of A Feather" session on python. Kaeru and Bakhtiar were great. Talking about things which I haven't even heard of before.. :P Even gave me some new ideas I can try out with my projects. Programming in firefox. Sounds cool.

Then end of day 1 with Pia's keynote. Almost the same as the one she gave at MyGOSSCON but with a bit of modification. Why do open source? "Fun, Work and making the world better". Great. Got me all revved up to contribute more.

Then off to the speakers dinner. Great to be able to mingle with great people. But actually I was soooo tired I wasn't able to take full advantage of the opportunity. But it was fun nonetheless..

Day 2 was full of awesomeness too. I actually didn't read the schedule and thought it would start like day 1 at 9 am. But actually it was scheduled to start at 10am. I was an hour early and apiit was noisy with a taekwondo competition downstairs.

Keynote by Ditesh was again proof of how awesome he is.. :D Highlighted things which a lot of us didn't know of before. All the contributions of the community which we wasn't even aware of. Actually he gave almost the same talk at MyGOSSCON but now it was a bit modified to be more cool. :P

Track session began and I was torn. I had no idea whether I wanted to listen to Toru on memcached or Kamal on git. In the end I decided on Kamal and again I must say this dude is one heck of a great speaker. Now he got me all excited on using git. I'm already using svn, hg, bzr. Now git pulak.. :D

Followed by James Morris talk on kiosk mode in Fedora. Looks great. Reminds me of Juzt-Reboot card which I used to have. Do whatever you want. As soon as you restart the computer is restored into it's original pristine state. Would be great to be used in computer labs at school or libraries.

Then off to fosschix. Pamela Fox is so cooool.. :D There was so many people that we had to move to a bigger room. And Pamela just sat on the table talking about webdevedu. Awesome.

Lunch. And it is confirmed, python is used a LOT at google... :D Pamela is into languages too. Asked about the Malay language and all. Awesome.. :)

SaaS and PaaS? I had no idea what that was until I heard the talk by Jerome. Software as a service, Platform as a service. It's the wave of the future and it is happening now. Hmmm.. MyMeeting as a service? Maybe one day.. :P

Then OLPC talk by Pia. The thing I remember most about the talk? Pia raised the XO high above her head and dropped it.. 0_O wow... it still work. That thing was built to be abused. :P Wonder whether it can take on Muhammad.. >.< But seriously I want to get on to developing on it. Got some ideas of creating local content to learn. And I've got two beta testers at home. :P

HTML 5 and google gears was presented by Pamela. WOW!!! Can't wait for it to be properly supported by mainstream browsers. It's seriously cool stuff. I know how l33t it is to be able to do complex ajaxy stuff right now, but soon those complex ajaxy stuff have to be standard fare and html 5 will help a lot in making that come true.

Lightning talk... My first ever. And what do I remember most? Couch surfing by the totally awesome dude.. :D Lol.. wonder whether I might actually do that one day.. :P

Keynote: Makkal Sakti by Jaya Kumar. Yeah!! Very cool. Run, study, redistribute, modify. The four freedom.. :D All men are created equal.. :D

Then wrapping it up with all the speaker, crew and volunteers in front. Toru said it best when he mentioned "The world needs more love".. :D was AWESOME!!! and I hope to be there next year (especially if it's at a beach.. ;)

Friday, November 7, 2008

MyGOSSCON 08 is over..

Alhamdullillah finally MyGOSSCON 08 is over. InsyaAllah life will soon return back to normal.

It is sometimes funny that when you talk in real life, face to face, you tend to forget or leave a lot of things out because you just missed it. So when you come back from the meeting only then do you realize the things that you really wanted to say. Happened to me after dinner going back home from oscc tonight. So I just want to say it here to get it off my chest.

First and foremost, I want to congratulate the superb maestro Mr. Marzuki. He has done a great job conducting the implementation of MyGOSSCON 08 from beginning to end. I was there and saw how much and how bad the problems he had to face, and even more amazingly how he overcame them with his trademark off handed coolness and kept his everlasting charm. **power** **power** /me doing the firdaus salute.

Second of course a big thank you to the lovely Eavay for her excellent work in leading the development, design & maintenance of the MyGOSSCON 08 website and also for developing the plspeakers product for our intranet so that we can easily manage our speakers data. Personally I think that handling the speakers (something that I was actually officially responsible for, at least some of the speakers) has been made much easier with that product. And I think having a better infrastructure to actually work together and collaborate with in one of the primary reasons why I feel MyGOSSCON this year is a whole lot more easier than MyGOSSCON last year.

Thirdly of course a big thank you to all of my team mates in SC1 (Shima, Razlina and Yana) and not forgetting the head honcho Mr Nicholas for all of their help and support in calling up the speakers and chair person. It wasn't easy but finally we got through it all (well, almost all.. ;). And later on MyGOSSCON itself eavay joined SC1 too and helped a lot. Another round of thank you to eavay. .. \o/

Fourthly a big thank you to all the OSCC staff. It wasn't easy but finally we pulled it through, together. This thank you even includes ex OSCC staff the foss advocate extraordinaire kaeru. I can't help but think of him as I saw the awards for the OSS Case Studies given out to the winners. And thank you also Mr Firewall ;). It was tough I know. So to kaeru, kak siti, stanly, suria, Mr Jacob, Mr Foong, saro, nuhaa, cikgu, hisham, indhran, gopi, Mr Fauzi, e-jat, eric, achik, ella, kak aida, coreen and nadia, thank you all.

Lastly thank you too all the speakers (especially those who I had to contact, please forgive me if I was ever rude or intruding) for their time and cooperation, thank you too to all the MAMPU staff and MEP staff who made MyGOSSCON 08 the success that it was. It was GREAT!!


Come to think of it, there is no way I could have thought of all of that on my feet ad hoc before dinner just now. So oh well, I need to improve some more.. :P

Thursday, October 30, 2008

Running a service on qemu

Mmmmm.. choice is good. And one thing about linux is that there is a LOT of choices. Sometimes the differences between them is enough to make you think they are actually different OS's (/me ducks away from debate of what is an OS). But recently a user tried to install mymeeting on a SUSE machine and couldn't get it to work. When we tried a fresh install on our Ubuntu's the mymeeting version he downloaded worked just fine. So there might be something about the SUSE configuration that broke it. Since we didn't want to have to reformat any of our machines to do a fresh install of openSUSE we decided to just create a virtual machine and run it from there. Sure it might be slow. But we only got to make sure it can run je.. :P

So we downloaded the openSUSE iso and with instructions from we installed qemu. Then kaeru showed a neat trick. When we run the qemu, run it with redir like this:

qemu -localtime -m 384 suse.img -kernel-kqemu -net nic -net user -redir tcp:8022::22 -redir tcp:8081::80

So the redir will open up the ports on your localhost to the virtual machine. `-redir tcp:8022::22` will open up the ssh port so you can do `ssh -p 8022 root@localhost` and manage the machine directly throught the command line. Haaaa.. Take that graphic heavy SUSE user interface... We beat you.. :P

And of course `-redir tcp:8081::80` will open the http port so I can check the mymeeting system just by going to http://localhost:8081/mymeeting. Very usefull..

Sunday, October 26, 2008

Dell Inspiron Mini 9

Yesterday went to Low Yat to buy my cousin a sub RM 1500 notebook. Of course with that kind of price tag it would have to be a netbook jelah. Anyhow, I was short on time so I didn't get to browse thoroughly. Just went for one quick round around level 2 and picked the one that I thought would fulfil his need. The thing is, as soon as I stepped out of the lift there was a shop that sold the new Dell Inspiron Mini 9 for only RM 1199. I was suprised. Just 1199. I couldn't believe my eyes. With original Windows XP and all. RM 1199. I thought there must be something wrong. Better survey first. So went around level 2. There was nothing that could match that price. Most of the other netbook from acer, asus and lenovo even was around RM 1600. So I decided I'll just go with the Dell lah. But to tell you the truth if I had money to buy for my own use, I'd go with the Lenovo Ideapad S10. Fuh.. she's one sweet mama... Smooth rounded curves, slim white profile. Pergh.. But anyway, that was RM 1699 which is more than the budget so I went with the Dell.

The Dell has a keyboard with decent sized keys. I was actually able to touch type on it. But to achieve that there wasn't any dedicated function keys. So I don't think this would have been a good choice if say you wanted to give this to a blind person who uses the shortcuts a lot as he would not be able to find where the function keys are. And also there was some of the keys that moved from their normal place. The most obvious was the apostrophe which brought me to a screeching halt when I had to type it as it was not on the homerow as usual but on a tiny little key at the very bottom row.

The only downside was that it uses a 8GB SSD and with the minimal bare Windows XP there was only 3GB left... :D I asked the guy was there a Ubuntu Linux version. He went "Huh??". Very sad. In fact as far as I remember almost all the other brands were also displaying their XP variant. Yes, even asus was displaying their XP variant. Which is sad.

As for the size of the netbook itself it is as small as most other netbook out there. It is small even when compared to my cute little face. :P
Of course running Windoze XP it took a lot longer than my wife's asus which can be cold booted and used within 30 seconds. I didn't time it properly but felt close to 2 minutes before if became fully usable. As it came with a barebone Windows XP so as soon as I got home of course I downloaded firefox and :D Not sure whether chrome might have been a better choice but firefox is good enough for me.

Saturday, October 25, 2008

Of version control and hostings

Recently I was just stumbling along in the internet when suddenly I came to the page. I had no idea there was such a page. And on that page came the answer to one of the questions that have been bugging me in my head, "why is the Ruby on Rails guru Kamal giving a talk on using git at". It is because RoR is hosted right there on as the most watched project. So he's been using git quite extensively then. Hmmm.. an example of how which project you are most involved with will effect your choice of version control tool.

Some time ago I posted a few post on using mercurial and setting it up under lighttpd. Kaeru commented how he preferred bazaar over mercurial as his distributed version control of choice because uses bazaar and zope (which he is heavily involved in) is hosted on Another example of how which project you are most involved with will effect your choice of version control tool.

As for me I still prefer mercurial over bazaar mainly because that's what I've been using first since Linus mentioned it in his google tech-talk on git. If it wasn't for because at that time there was a small possibility I might have to use windows so I preferred something written in python, I might have choosen git too. So I can't wait to hear Kamal's talk.

For most people they doesn't even use distributed version control but just version control in the form of subversion or even cvs. Of course the most famous hosting for this would be the venerable And so a lot of people would actually prefer subversion over git, mercurial or bazaar because their project of choice is hosted on

But I did try bazaar a bit after kaeru mentioned it and even registered a project on Check out jocomgen if you are interested. It is a "Joomla Component Generator" for Joomla version 1.0. written in python and uses the mako template engine. It doesn't have any documention though but there is some example on how it could be used. And yes I do find it ironic that I'm using python to write php code. :P

Another project on is done by the lovely eavay called "Plone Speakers Product". Check out plspeakers. Basically it is a plone product which eavay created for use on the OSCC intranet to manage the information of speakers for myGOSSCON 2008.

And of course at OSCC we use subversion. MyMeeting is also hosted there. In the end "Choice is good (tm)".

Saturday, October 11, 2008

I love vim...

Vim is the ultimate editor for me. And the best thing is I can use it even if I *have* to work in Windoze... :D

I wonder whether anyone is going to give some pointers in using it at the Malaysia’s premier Free and Open Source Software (FOSS) event.

See you there..

Saturday, October 4, 2008

I love my Centro

Lol.. I've been using my Centro quite extensively ever since I've got it. Especially after reading the book Kaeru recommended (although there's still a lot I haven't put into practice). But just yesterday was the first time I really fully appreciated the Google Maps on it. There I was thinking of how on earth do I get to KL from KB going through Terengganu. I've driven that way once, but that was a long time ago and my navigator at that time knew the road so I wasn't paying much attention. I could have called people up asking for directions, but that would have been a bit tedious too. Jeng.. jeng.. jeng.. I was able to look it up on Google Maps.

So following route 3 all the way to Kuantan then jump on over to E8 for highway access all the way to KL. And quite surprisingly Digi's coverage is quite awesome. Of course I didn't check it every minute (don't drive while using Google Maps.. :p) , but whenever I did Google Maps was able to locate my location and show that I was on the right track home.

Finally arrived at Serdang around 8.30 after 9 hours of driving.. :-S
Fuh.. thank you Palm, Google, and Digi for showing me my way home..

Wednesday, October 1, 2008

Raya again

Alhamdullillah it's that time of year again. Ramadhan has marked a special time for me as it was just a few days before Ramadhan last year when there was quite some major changes in my life. I moved from staying at Bangi to staying at Serdang. And I started working at oscc. So this raya comes as a witness that I have been at oscc for at least a year. And what a year it was.

There was ups and downs. There was joy and sorrow. There was pleasure and pain. But all in all it was all brilliant and I hope have made me a better person. And so to all that know me, I am sorry for any wrongs that I have done. Minta maaf zahir dan batin. And to everyone else, Selamay Hari Raya Aidilfitri and may we all be blessed.. :)

Tuesday, September 23, 2008

Long time no update

It has been a long time since my last post. And still longer actually. Just want to fill up the cyberspace with this empty post.. :P

Wednesday, September 17, 2008

Serving mercurial using lighttpd fastcgi

Fuh.. Finally after 2 days of searching and experimenting I've gotten it to work. For the fastcgi part of lighttpd you have to have something like:

"/hg" => (
"bin-path" => "/home/dev/web/hgwebdir.fcgi",
"socket" => "/tmp/hgwebdir.sock",
"check-local" => "disable",
"disable-time" => 1,
"min-procs" => 1,
"max-procs" => 1

Fuh.. That was where I was stuck with the most. For the rest just follow the guide at the mecurial wiki. As for configuring lighttpd authentication (very simple authentication at least :P) please refer to this article at cyberciti.

Now I can get some work done.. :D

Wednesday, September 10, 2008

Wednesday, September 3, 2008

Finally some peace...

Things are starting to calm down now. Before this things were pretty hectic at OSCC and at home. Next storm in the forecast is MyGOSSCON 2008. There might be little tornadoes here and there till then but insyaAllah mostly it will be alright.

On the lighter side of things, my Centro is back. Palm finally replaced the unit and it is finally back in control of my life.. :P But there are still things to do. I didn't keep my mSD card properly while it was homeless and now it's pratically dead also. So got to get me a new one. Maybe an 8 gig one.. ;) A man can still dream...

Puasa is already into the third day now. Mmmm.. so far not feeling the pinch yet. But I do miss being able to slowly sip hot Milo when thinking about whatever problems I have to face. And also miss being able to eat whatever Muhammad happens to not finish and try to put into my mouth.. :)

Have learnt quite a bit lately. Especially useful is the `netstat -tupan | grep LISTEN` command which would show what programs are listening on what port. Very useful when troubleshooting a server that's running many things at the same time.

Saturday, August 23, 2008

Tips for admins and more wisdom from Linus

I was reading the August edition of Arch newsletter ( and in it I found 2 articles which I was particularly interested in.
1) 10 Essential tricks for admins ( is very useful and introduced me to a few things which I've never knew before. Haven't tried it yet but the combining of the screen session sounds cool. Gotta try it one day.
2) Linus Torvalds, Geek of the week (,-geek-of-the-week) is an interesting read on this man, Linus Trovalds. I know some people doesn't really like him for his rather... err.. not so polite ways of saying things. But I like the way he thinks. And doesn't mind his reference to masturbation once in a while.. :P Choice is good..

Some tips for administrators and more wisdom from Linus..

I was reading the August edition of Arch newsletter
and in it I found 2 articles which I was particularly interested in.
1) 10 Essential tricks for admins
is very useful and introduced me to a few things which I've never knew
before. Haven't tried it yet but the combining of the screen session
sounds cool. Gotta try it one day.
2) Linus Torvalds, Geek of the week
is an interesting read on this man, Linus Trovalds. I know some people
doesn't really like him for his rather... err.. not so polite ways of
saying things. But I like the way he thinks. And doesn't mind his
reference to masturbation once in a while.. :P Choice is good..

Wednesday, August 20, 2008


Some of you might notice that I rarely write about non-technical stuff. Most of them are just notes for myself actually. But here's a post that is a bit different.

kaeru introduced to me the book called "Time Management For System Administrators" and quite frankly it is a good book. And most of the tips are very applicable in real life unlike most "time management" ideas. But this week it has just been... emmm.. backfired, sort of. I can name at least two. The first one, my centro.

Oh my centro, what has happened to thee. I miss thy ever present memory of all things to come and needs to be. If any of you have been following my then you would know that my centro has kinda bit the dust. First it kept on syncing until it's batteries are dead. Then even when I have recharged the batteries it stays dead. Called palm and they want to replace my battery first. I know it's not just the batteries problem. After this they would have to replace the unit too. Why not just take it first already and spare me the agony of being centroless.

So how did the book idea backfired? Well.. one of the great ideas in the book is that don't rely on your brains to remember stuff like todo's and appointments and stuff. Reserve your brain for more important things. Our tools like pda's and organizers keep a better record than our brains when it comes to just making sure you don't forget. So.. emmm.. I don't remember anything. It's all in the centro. If I had another one it won't be much of a problem, but I don't. Seriously thinking maybe I should just get myself an old fashion organizer. Won't be as effective but at least it is waaaay more reliable. Palm.. oh Palm..

What is the other one? Well.. one of the great ideas in the book is make a habit of filling your fuel consistently so that you don't get caught with no fuel. So you should set a certain time when you would fill your fuel tank to full even if it's not really empty yet (it cannot be completely full of course). So you don't have to every worry about suddenly finding that you are late for appointments and stuff but need to fill up your tank first. Mmmm.. I choose to fill my motorcycle's fuel tank 3 times a week. Going back from work on Monday, Wednesday and Friday. So today I went to KL to drop off my centro's battery at the drop off point. On the way coming back I saw my fuel tank almost empty. But thinking it would be alright because I'll be filling it up on the way back later, I didn't follow my gut feeling and went on with it. Guess what? On the way back right on the flyover heading towards Petronas at Precinct 8, my bike died (mmmm.. seems like my tools like to make a habit of dying on me). So I had to push my bike.. :'( Ohhh... the agony... It is the most exercise I've got since a long time. Pushing motorcycles is hard work. Lucky for me some guy saw me pushing my bike and came to ask what's wrong. When I said I was out of fuel he offered to push me to Petronas. So lucky me was pushed from behind all the way to Petronas. I am sooo grateful. I didn't even get his name. Not even his plate number. Once we're there he just said okay and went off. God bless you unknown stranger. God bless you...

But in the book there is also another tip. Which was, use mantras. Things which normally happen to you. Make decision early about it, and remind yourself to take that decision every time using mantras. So my mantra now is "if it looks like it needs to refuel, just refuel damn

Oh well.. So that's what I wanted to share. Nothing all that spectacular and it ain't going to win a bestseller award or anything. So thank you for reading, and thank you unknown stranger for you help. Thank you. Thank you. Thank you.

Tuesday, August 12, 2008

I'm on too

Mmmm... I barely update this blog, maybe it's too big. I should try something smaller. What's smaller than a blog? A micro-blog. Just want to say I'm on now.

Thursday, August 7, 2008

MyMeeting in the wild

Thank you cikgu for finally committing mymeeting into sourceforge and introducing it to the community. Even ccharles blogged about it. As one of the developers of mymeeting I really hope this would be the beginning of something great in the Malaysian Public Sector. It would be good if we could get all of the great people out of the wood works of obscurity and make the open source community of Malaysia thrive with life.

Tuesday, July 29, 2008

Creating a postgresql database in ubuntu

According to the docs I was supposed to just type `createdb debiancedb` but that would fail saying the user cannot be authenticated. Finally after much googling I found which basically says to do a `sudo -s -u postgres` first which would basically make me run the command as the postgres user. I think most probably the best solution is to add my user to the postgres group most probably. Haven't tried it yet though.

Saturday, July 19, 2008

Working with mercurial

A while back I wrote an intro about using mercurial as your own repository that does not require any network connection to commit. Finally I've come to the point where I have to send my modifications onto another machine. So how do I do it? Let's begin with having the project reside on a computer which we will call mainserver. On this machine we already have created a mercurial repo and has committed files into it. Let's say we have another machine which we will call devlaptop. And on the devlaptop there is no copy of the project yet. So here are the steps by steps to get your work done.

1. First we will put a copy of the project into devlaptop. At the mainserver go to the project root directory and run the command `hg serve`. This should make the repo accesible on the default port 8000. Use the -p option to set to a different port. Then on the devlaptop run the command `hg clone http://mainserver:8000 projectname`. That will pull the project from the mainserver and put it into the projectname directory on the devlaptop. (Note: if your routes are not set properly just replace the name mainserver with the actual ip of mainserver)

2. Do your thing. Fix up the project and stuff. Commit to the local repo like there's no tomorrow. Until your finally satisfied. All test have passed and it is time to finally put those changes on the mainserver.

3. Put the changes from devlaptop onto the mainserver. First on the devlaptop go to the project root directory and run `hg serve`. That would make the repo available to others. Then on the mainserver just go to the project root directory and run `hg pull http://devlaptop:8000`. That will pull all the latest changes you've made on the devlaptop. But the repo will now be aware of the changes but have not applied them yet. To apply them run the command `hg update` on the mainserver and it should apply all the changes to the local repo. Now the mainserver has the most latest of your project.


Friday, July 18, 2008

Answers of great programmers

This is already an old article actually, but stumbled upon it again. Just to share with all of you:
It's very interesting to see how great programmers think.

Wednesday, July 16, 2008

Infinite Hands are we...

Wow.. this is a pretty good song (imho) about free software and what it's all about. Catch it on youtube at:

and if you want the lyrics check them out at:

And no law shall bind us or keep us for long,
for infinity's ours and infinity's free,
and no company owns us, and no land's our own,
for Infinite Hands are we... :D

Tuesday, July 15, 2008

More eeepc resources

Here's more resources for eeepc:

And this article seems interesting about the Ubuntu Remix for notebook:

More distros for the eeepc

Last week I got an eeepc for my wife's birthday. She's very happy with it. Thought I might like to borrow it once in a while, but after trying out the keyboard, it's a no-go for a touch typist like me. But my wife's a normal pc user who still hunt and peck most of the time. She's very comfortable with it. Anyhow... I still wanted to hack the thing. Adding more repo would be the first thing I want to try. One of the page is: But installing the repos there I find that there is a lot of broken packages where their dependecy is not met. Oh well.. the hunt continues...

Tuesday, July 8, 2008

Monday, July 7, 2008

Important to priorities

I've always had to learn and relearn this lesson. You've got to get your priorities right. For example rushing for an appointment, and you're already late. But your car or bike is low on fuel. Fill it first no matter how tempted you are to try your luck and hope you'de get there before your fuel runs out. You'd be late certainly but at least you'd arrive.
Same thing if you want to start your own business. It might be tempting to just dive in and get started but then if you didn't stock up you might not even get there. But if you have took the time to plan and prepare you might get there a bit later but insyaAllah you'll get there. And in every incident there is a lesson to learn if nothing else but to remind us to be humble as we move on in this life on our journey to the next.

Wednesday, July 2, 2008

First thing to know

Hmmm.. I feel there is going to be quite a bit of change coming. Whichever way it is I feel there is a need for me to get my life together and start to be more organized. So what's the first step? Buy myself a centro of course.. :P

Haven't used a palm for quite a while since my lifedrive broke down about a year back. Guess what was the first thing I had to learn? Hard reset of course.. :D To do it on centro:
  1. Take out the battery
  2. Press the power button and keep it pressed while inserting the battery again
  3. Release the power button only after the palm logo has finished loading
  4. It will ask to press up to delete all the data. So press up
  5. That's it
So next, how do I organize my life with this? Still a lot to learn..

Friday, June 13, 2008

Own versioning repo

SVN is great as a version control system if you have many developers and require a single point of authoritative reference point for everyone. But if you're working on your own, it could get cumbersome since for every project you'd have to set up a repo first and then you can commit stuff. What's easier, mercurial. How easy?

hg init
hg add *
hg commit -m "First commit"

And then the subsequent changes?

hg commit -m "Comment"

Need to browse the file changes and the like?

hg serve -n "Name of repo" -p 8091

-p is which port it'd run on localhost from. So the command above should be accessed at http://localhost:8091/. For more reference go to

Thursday, June 5, 2008

Using wget to browse offline

I used to do this all the time, but haven't done it for quite a while until I forgot how to do it. Luckily I found back the original reference here: and in summary the command that need to be run is:
wget -m -k -K -E -o /home/me/weeklog

Friday, May 30, 2008

Learn to google

Google is one of those things which is so widely used it has become a verb by itself 'Just google it up'. It has become synonymous to internet searches just like when people want to buy tooth paste they'd say 'I'm going to go buy some colgate'. But did you know it's even a calculator, a currency converter, a dictionary of sorts? Well, look it up here and you'll find that you can use it for so much more.

Sunday, May 25, 2008

Develop it FAST!!!

I've always liked game programming. That's what got me to start programming in the first place. But even with all the current advancement in technology and tools I've never actually got round to making one to the finish. While idly stumbling I've found this interesting article entitled "How To Build a Game In A Week From Scratch With No Budget". That Jay Barson must be one heck of a talented fella to be able to pull of what he did. Takes a lot of experience to be able to tell which way down the road you need to go when you've got to get there quick. Anyhow, what I liked best about the article is the lessons he learned after finally having done it:
  • Lesson 10: Doing something like this really was worthwhile
    • I know what he means when he says "You wouldn't think that working on Yet Another Game would feel like a vacation, but it did." Sometimes I feel I need to do that too. After a long stretch on one project, you just need a short sprint on a smaller one to just revitalize yourself.
  • Lesson 9: Cutting features isn't always free
    • Sometimes we think it's better to not do something in a more holistic way, we don't need THAT much bells and whistle. But in the end sometimes not doing it that way makes it so much harder to do even small things and things start to become repetitive and error prone REAL fast.
  • Lesson 8: Do the important stuff first
    • "If I pretend that I only have those 8 hours to 'finish' the game, what could I do that would make the biggest difference in those 8 hours?". That's a good way of thinking what do we really have to do to make it work. Probably should apply to most of my projects too.
  • Lesson 7: Scope will expand to exceed your budget and schedule
    • LOL.. I do this a LOT.. :D "Every programmer I've ever met tends to underestimate the time required for him or her to complete a feature.". Ask my manager, he'd know.. ;)
  • Lesson 6: Get the game playable as fast as possible
    • I know I've always tried to get my projects up as soon as possible so that the clients can give feedback as soon as possible. Sure you have a list of features to implement, but sometimes when all is dark, a lone beacon in the distance can make all the difference.
  • Lesson 5: It's sometimes much faster to throw away old code and start over
    • Ahhh.. one of those things that makes working in the software industry seems so volatile. You can work on a set of feature for a whole week to find that the way you should have implemented it is different and you just throw away the whole weeks' work. But actually it's never thrown away. It's hidden deep in your consciousness on how you should implement it the next time.
  • Lesson 4: Python Rules!
    • I couldn't agree more.. :D
  • Lesson 3: Don't underestimate the art requirements
    • Oh yeah.. so many times I've implemented so many killer features only to find customers looking at the unmade up interface and say "where's the value added in this???". Huh!! It doesn't matter you can do this and that, if it's ugly I don't want it. Sadly I'm not a full fledged graphic artist though.
  • Lesson 2: I need to be more efficient in my use of time
    • "Better use of my time means I can get more done AND have more 'free time' to do other things". Oh, how true.
  • Lesson 1: IT CAN BE DONE
    • Yeah... :D

Saturday, May 24, 2008

Using clamav in fedora

Hmm.. I might have to try to scan a windoze comp for viruses later this afternoon. So thinking the best way to clean up the thing would be doing it from a linux boot and then scan it. First thing to pop up in my mind was "Hey, use the fedora usb drive you've got". So went scouring google for pointers on how best to use clamav under fedora and found one at:

Anyhow, to summarise it you have to install the clamav and clamav-update package. Edit /etc/freshclam.conf file. Comment the `Example` line and change the `` to `` or whatever your country code happens to be. Run `freshclam` (as root) to update the database and `clamscan -r --quiet /to/windows/partition/mount` to scan the windows mount. The --quite part is so that it'd list only those that have been found problematic so that you don't have to look for them with you bare naked eyes in the middle of thousands of lines of filenames. That should be it. Hope it works this afternoon.

Wednesday, May 21, 2008

The editor of a programmer

I think in every profession there is always a certain tool which is so important that the professional would have one very personal to his heart. He loves using it and would not think of using any other. For the chef would be his knife, for the samurai his katana, for the gamer his perfectly aligned customized and calibrated mouse (who on earth in his right mind would buy a 500 ringgit mouse???). But I consider myself a programmer and the tool close to my heart as a programmer is my editor. Oh how I love my editor, namely vim (please don't flame me, I like emacs too but don't use it anymore).

So while I was just idly surfing around looking for inspirations I bumped into this page entitled "Bill Joy's greatest gift to man" and it gives an interesting view on the origin of vi (vim's much revered parent). In the article in mentions "So the editor was optimized so that you could edit and feel productive when it was painting slower than you could think". We don't live in that kind of world now. Our computers could probably render 3d worlds faster than we can imagine them now, but still the feel productive part is essential. How productive? Look at Why, oh WHY, do those #?@! nutheads use vi? to understand. :D

Tuesday, May 20, 2008

vim colour scheme

Don't you just love the wide range of things you can customize with open source software. One of the things that some people really stick to is color schemes. Some like it light, others like it dark, even others like it pink :S.

Anyhow, whichever your preference is, it's nice to know you can change the color scheme of your favorite editor, vim. Just create the directory ~/.vim/colors and copy any color_scheme.vim file you find there (eg. tango, zen). Then restart vim and do a `:colorscheme name_of_color_scheme` or in gvim go to the edit->color scheme->name of color scheme menu. You can also add `colorscheme name_of_color_scheme` into your ~/.vimrc file to make it a permanent change everytime vim loads.

First hurdle

Lol... it's only been an hour of trying of fedora 9 and I have already stumbled into the first thing I have never had to face before, SELinux. I never had to face this problem on any of the distro's I've tried before (Namely because they didn't have SELinux installed on default). But as soon as I try to access my php project (which I checked out from svn, on a live usb disk... how coooool is that??? :D) it pops up saying that httpd is somehow violating it's policy by trying to access .htaccess (Huh??). Well, no biggie, just go to System->Administration->SELinux Mangement and change it to permissive (to turn it off requires a reboot, which I'm not willing to make) and the site works pretty well already. Man.. Now I can work on any computer I have access too.. But with lotsa RAM of course.. ;P

First taste of Fedora 9

Thanks to the constant persuasion by kagesenshi I finally tried out Fedora 9 as a Live USB Drive. And I am impressed. I haven't got any screen shots but the installation was way easy.
If you have access to a windows computer (shouldn't be a problem for the majority of people) go to and download the liveusb-creator 2. The program can download the iso required by itself but I have already downloaded it earlier. Just select the iso and choose how much persistent overlay that you want.
Now here's the thing about the smart overlay. It is used by fedora to keep track of all the changes you made to your live USB so that your changes would be persistent. It's really nice. I tried installing inkscape after booting the usb and also saved a firefox bookmark. Both are still there when I rebooted again. Very nice.. :)
But the smart overlay is no longer available for your normal usb use. So I would suggest that you give enough smart overlay for you to install your required programs and settings and such but leave the rest so that you can save your files where it can be accessed normally as a usb disk. With the smart overlay of course you can save all your files to the normal home directory but you will not be able to access this home directory if you did not boot from the usb. Kinda defeat the purpose of being able to be access everywhere.
Haven't had the chance to extensively test it yet but so far I am very very impressed. Looking like another distro jump is possible in the near future... :P

Wednesday, May 7, 2008

Headaches of keeping up with standards

Ugh.. I haven't done any real top to bottom, beginning to end, full css tableless design for such a long time, I have forgotten how to do it. But here's a good place to start:

Tuesday, April 29, 2008

Inspecting object in javascript

An interesting problem is to inspect unknown objects in javascript. Found a good example of how to do it here. Just to rehash in case the site move:

function inspect(obj, maxLevels, level)
var str = '', type, msg;

// Start Input Validations
// Don't touch, we start iterating at level zero
if(level == null) level = 0;

// At least you want to show the first level
if(maxLevels == null) maxLevels = 1;
if(maxLevels < 1)
return '<font color="red">Error: Levels number must be > 0</font>';

// We start with a non null object
if(obj == null)
return '<font color="red">Error: Object <b>NULL</b></font>';
// End Input Validations

// Each Iteration must be indented
str += '<ul>';

// Start iterations for all objects in obj
for(property in obj)
// Show "property" and "type property"
type = typeof(obj[property]);
str += '<li>(' + type + ') ' + property +
( (obj[property]==null)?(': <b>null</b>'):('')) + '</li>';

// We keep iterating if this property is an Object, non null
// and we are inside the required number of levels
if((type == 'object') && (obj[property] != null) && (level+1 < maxLevels))
str += inspect(obj[property], maxLevels, level+1);
// Is there some properties in obj we can't access? Print it red.
if(typeof(err) == 'string') msg = err;
else if(err.message) msg = err.message;
else if(err.description) msg = err.description;
else msg = 'Unknown';

str += '<li><font color="red">(Error) ' + property + ': ' + msg +'</font></li>';

// Close indent
str += '</ul>';

return str;

Javascript ninja on Cakephp

Fuh.. Cakephp by default uses the library for ajax which uses the prototype javascript library. To get you're ninja on prototype you can refer directly to the docs. Good stuff..

Using firebug in Ubuntu Hardy Heron

*Update* Yesterday kaeru pointed out that firebug from the ubuntu repo works with the default firefox 3 beta on Hardy. Just tried it and I'm glad to report it does work very nicely. No more need for this workaround.. Just look for it in synaptic or apt-get install firebug.

What can I say? Ubuntu is pretty bleeding edge. :P It comes with firefox 3 beta 5 which is pretty slick. But there are still a lot of add-ons which do not work with firefox 3 beta. Earlier on I've blogged about using the 1.1 beta of firebug with firefox 3 beta. It works pretty well on my home box which runs arch linux. But on my computer at the office running on Ubuntu, firebug doesn't even come out. So I had to find a way around.

Luckily Firdaus of OSCC showed me that you actually can install Firefox 2 on Ubuntu. It's still in the repo and you just have to select it with synaptic or apt-get 'Firefox-2'. But the default installation will share the same default profile of Firefox 3 and so will break firebug when you launch Firefox 3. So what can you do? KageSenshi showed me how creating profiles for firefox will solve the problem. Well, first you have to create a different profile just for Firefox 2 by running 'firefox-2 -profilemanager'. There you can create your profile. Make sure you never use this new profile with Firefox 3 so what we do is that we change the command of the icon to start firefox 3 to 'firefox -P "Default"' and the icon to start firefox 2 to 'firefox-2 -P "firefox2"' (Use the name of the profile you created before). I don't think you can run both versions at the same time but I don't have time to experiment right now. These settings work and I have to get back to work.

Saturday, April 19, 2008

VirtualHost in apache

Finally understand it after reading:
I was having lotsa trouble understanding why wasn't my rules applying to the vhost I was setting up. But after reading that I know you weren't suppose to create multiple NameVirtualHost entry. Just one. The ServerName inside the VirtualHost block will determine whether that block applies to the query or not.

Friday, April 18, 2008

Using ssh and scp without a password

ssh and scp are very useful for making sure you work in a pretty secure environment. But sometimes it can be a hassle if you have to keep on keying in your password to login many times to the server or you might need to write a backup script but do not want to write your password in the script then I have found a solution at Basically what you need to do is copy your public key to the authorized keys file on the server. If you haven't got a public key yet just type in:
ssh-keygen -t dsa

And that will create an file in your ~/.ssh folder (By default, you can set it in other places if you want). Anyway, copy the content of that file (it should be just one line) into the ~/.ssh/authorized_keys file on the server you want to login. Now whenever you ssh username@server you'll access it straight away without any password. And scp also works without password so you can write those scripts.

 Update: dsa doesn't seem to work anymore. Try using rsa.

Bash your head on this..

Uhm.. Bash scripts are really great.. But sometimes you just forget how to do even the simplest thing (like how do you set an else condition :P). So here's a very good and simple starting point at: That should be able to bring you up to speed till you start writing whole apps in bash.. ;)

Thursday, April 17, 2008

svn, ldap and groups.. big words

Alhamdullillah.. just got svn with ldap auth working. And even restricting commit by user group. It was quite tedious to finally get the settings right, but here's some references which was used:
Starting to look good.. :)

Wednesday, April 16, 2008

Using ldap auth in lighttpd

Alhamdullillah.. It is quite easy to set up lighttpd to authenticate using ldap. Found a reference here: Just enable mod auth and follow the examples in the wiki. Great.. :)

Setting up trac in ubuntu

After looking for quite some time finally found and easy guide to install trac on ubuntu at So I've got it up and running and uploaded one of the first Abdullah Solutions project we did. E-Punch is an online punch clock where you clock in by using a login. It checks your ip to make sure you are in the local network, and there is even a module to use a fingerprint reader. But the fingerprint reader interface was written using VB though and is not included in this folder. I am yet to set up svn so that you can download it but you can already browse it on trac at

Tuesday, April 15, 2008

Regular expression in VIM

Sometimes you just forget how to do it... Here's some reference that might help

Firebug for Firefox 3

Are you using Firefox 3 Beta? You need to use Firebug but when you check the Extensions page the Firebug is not compatible with Firefox 3 Beta? Well.. here's the solution for you. With beta software use beta software. Go to and download the 1.1 Beta. It works in Firefox 3 Beta and that is GREAT.. :)

Getting postfix relay to work with

Alhamdullillah after days (and I mean literally days because each day I can spend only a few minutes on this problem) I have finally got it working. To set up postfix to use relay with authentication, just ask the oracle. But to get it working with godaddy? I finally gave up and sent them an email. And in their reply was my answer:
Username: Your full email address (i.e.
Outgoing Mail Server:
Outgoing Mail Server Port: 25, 80, or 3535.

And so first I tested the ports. After telneting the host and ports I finally decided that most probably would work best because the server response has the word 'auth' in it (I have no idea whether it's even relevant or not). Anyhow changed it my /etc/postfix/ to use the 3535 port:
relayhost =

And the most important part is the username. It is It is the you registered your free mailbox with. Not your login name to godaddy. Use the email address. And then run postmap, restart postfix, and viola, it is sending mail and those mails don't just get dumped into trash. Fuh...

Thursday, April 10, 2008

WebDav works :)

Alhamdullillah.. finally got webdav in plone not only working, but rerouted through apache lak tu... :)

First step, enable webdav in plone. Go to the zinstance/etc/zope.conf file and unremark the webdav part.

# # valid keys are "address" and "force-connection-close"
address localhost:1980
force-connection-close off

And restart your zope. That ought to make it listen to port 1980 on localhost for webdav connection.

Then go to your apache web root folder and add a folder with the same name of your plone instance. Inside there put a .htaccess file like this:

RewriteEngine on
RewriteRule ^($|.*) http://localhost:1980/dev/$1 [L,P]

And that will redirect any access to your folder to the proper port (Note: because you can't use VirtualHostMonster for webdav, it has to be in the same folder as your plone instance. You can put the redirect to your plone instance in a different folder and redirect it from there with VirtualHostMonster).

Okay.. Once that is done you should be able to access it using a webdav client. It has to be a webdav client, not your browser because your browser will not know how to handle webdav. Ok.. so for the webdav client? For ubuntu you can try here: . Then you can use it just like a normal folder. Cool.

Oh.. for more reference go to:

Tuesday, April 8, 2008

A little drama

Hahahaha... My brothers' (Basyeer and Munzeer) friend blogged about a recent acting they did at Putrajaya. Just for fun, check it out at Heaven's Cloud.

Monday, April 7, 2008

Use rsync to copy files

Finally took time to learn rsync. Great stuff. Can copy gigs and gigs of files real fast. Learned it from Basically all I needed to do was:
rsync -av -e ssh username@host:/source/directory/ destination/directory

Or if you need to ssh over a different port you would do something like this:
rsync -av -e "ssh -p 443" username@host:/source/directory destination/directory

-a for archive. -v for verbose. -e to specify to use ssh.

Thursday, April 3, 2008

Setting up awstats in ubuntu

Finally my server at has awstats after delaying to install it for so long. The steps I follow were found at here . Here they are:
  • Install awstats package
  • Edit a file called /etc/awstats/awstats.hostname.conf where hostname is the hostname. Put something like this in it:
  • Make a directory called /var/cache and chmod it 777 so it can be used from the web server
  • Copy icons to web directory:
    cp -r /usr/share/awstats/icon /var/www/icon
  • Run this to update databases:
    /usr/lib/cgi-bin/ -config=hostname -update
  • In your web browser, go to the url:
  • Study the stats in quiet awe
  • Edit crontab to update stats automatically every night:
    crontab -e
    0 1 * * * /usr/lib/cgi-bin/ -config=hostname -update
But my website is still pretty empty though. Hope to add more stuff soon.

Saturday, March 29, 2008

Shortcuts for Firefox

Silly me. I forgot the shortcuts to firefox and actually googled it. Found it here just for reference next time:

Wednesday, March 19, 2008

A new dawn.. :)

The whole of MAMPU will soon be using OpenOffice exclusively. Starting from 1st April 2008 all desktop and notebooks will be installed with OpenOffice (and this ain't no joke ;) , and taking it a step further they will completely uninstall MS Office by the the end of the year. Check it out at So many things are happening here in Malaysia currently, truly we live in historical times. I can't wait to be able to tell to my grandchildren, "yes.. grandpapa was there when we first took steps towards our digital freedom!" :)

"What will you do without freedom?!" - William Wallace, Braveheart

Tuesday, March 11, 2008

Open Office Extensions

Wow! I had no idea there were so many. Or that they did so many things. Haven't tried any of them yet but going to in the near future. Get your open office extensions at:

Friday, March 7, 2008

Switching display modes on a laptop using xrandr

I have written this script quite a while back and already forgot where I've got the original idea. I think it was from somewhere inside the ubuntu forums. Whichever way it is, I find it quite useful when I have to use a laptop to display to a projector but the function keys to switch display is not configured or is not working. You have to have zenity installed though. Just a simple "sudo apt-get install zenity" on Ubuntu (or "pacman -S zenity" on Arch linux ;) and you can use it.


whichmode=`zenity --list --radiolist \
--title "Change Display Mode" \
--text "Choose where you want to display your desktop." \
--column="" --column="" --column="Options" \
"" "1" "Just the Laptop's LCD" \
"" "2" "Just the Output Monitor" \
"" "3" "VGA Dual Monitor" \
"" "4" "VGA Cloned (projector mode)"`

if [ $whichmode -eq 1 ]
xrandr --output VGA --off --output LVDS --auto
if [ $whichmode -eq 2 ]
if xrandr -q | grep -q "VGA connected"; then
xrandr --output LVDS --off --output VGA --mode 1024x768
if [ $whichmode -eq 3 ]
if xrandr -q | grep -q "VGA connected"; then
xrandr --output VGA --mode 1024x768 --left-of LVDS --output LVDS --mode 1280x768
if [ $whichmode -eq 4 ]
if xrandr -q | grep -q "VGA connected"; then
xrandr --output VGA --mode 1024x768 --pos 0x0 --output LVDS --mode 1280x768 --pos 0x0

I have to warn you thought that I have my monitor on the left of my laptop. So if you have it on the right of your laptop, then you might want to change --left-of to --right-of. Pretty neat.

p/s: If the Dual Monitor mode does not work, try running it from a terminal and see what error it output. If it says something along the line of "screen cannot be larger than x y" then go edit your xorg.conf (Most of the time it is at /etc/X11/xorg.conf, got to be root to edit it) and add the line "Virtual x y" (replacing x and y from the error) in the "Display" subsection under the "Screen" section.

Saturday, March 1, 2008

Freedom of free software

One of the things which made me love free (free as in freedom) software was the choice of options open to you. What? You don't like this feature of this software? Look for another. Sometimes you change just because you can. In the beginning I distro hopped quite a bit. I enjoyed learning how each distro did things. Each unique and beautiful. I loved learning how to tweak every aspect of the system. It took me two weeks to get just the right display driver for X, but it was a great learning experience. Loved every agonizing ugly screen day of it. And then it came...

I tried out Ubuntu. OMG!!! What??? It has set up everything to work properly out of the box? I don't have to do anything? Even the brown colour looks kinda nice. Oh man... This is so cool. And the days passed. I usually develop using php. On personal projects I like to use python. So I don't really need to do much of the technical stuff so Ubuntu gave me a good platform to just start working. I don't actually need to compile anything. The last time I had to compile anything for my laptop was when I was running Slackware. Oh.. that was sweet hacker heaven. You HAD to tweak everything. And since I didn't know much about using packages under slackware then, once I had ./configure, make, make install, the programs never ever leave. I just didn't know which file to delete. If it have make uninstall option I might use that but not all had that.

And one of the distros that I had used in my distro hopping days was Arch linux. It was one of the more memorable ones. Actually used it for almost a year. Loved the pacman -Syu to keep my system updated. But of course you still had to tweak quite a lot. But I remembered there was wiki and forum for everything you need.

One of the sad things about having things made easy is that you tend to like it being easy. And in Ubuntu almost everything was already configurable using some graphical tool. There wasn't even any need of iwlist wlan0 scan to see what wireless network was available. It was just displayed there. Soon I got a bit rusty with the good old CLI. And I said to myself, enough is enough. I'm going back. Hmmm... Arch was pretty good. So this morning I decided to install good old archlinux. But guess what? I was pretty scared. I WAS SCARED!!! I thought what if I had to take the whole day configuring it? What if some of the drivers I can't figure out again how to install it? I had FEAR!! I had UNCERTAINTY!! I had DOUBT!! Everything you need to launch a full scale FUD attack. Ubuntu made me forget that is how most people felt about Linux and free software in general. Ubuntu did a great job. If ever you wanted proof that Linux is ready for the desktop prime time, that was it. You could just install it without worrying about anything. And actually, personally I think installing Ubuntu is even easier than installing windows because there was no need to hunt for drivers. So I said this is ridiculous. I went ahead and installed arch...

Now I'm posting this from epiphany because I haven't finished installing all the software I need yet. Not even firefox. My display is stretched because I haven't install 915resolution yet and in general everything looks pretty retro 90's kinda style. Sweeeet... :)

Thursday, February 28, 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...

Monday, February 25, 2008

Search for packages and install them in mandrake

Just a little note in case I forget, under Mandrake to look for packages the command is urpmq and to install is urpmi. Simple stuff.

Saturday, February 23, 2008

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 at the first website is not really correct. So in the end my .htaccess contains the following:
<IfModule mod_proxy.c>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ http://localhost:8080/$1 [P]

But even though that is all fine and dandy, it didn't allow me to surf to more than the front page. All the subsequent links in the page was broken. And I experimented some more until finally I've got it at:

RewriteRule ^(.*) http://localhost:8080/VirtualHostBase/http/$1 [P]

Read the first article and it will mention about enabling Virtual Host Monster in the zope management page. But it did not mention about if you we're actually serving from a directory under your web root. Well, good thing the about page on the zope management page explained it all. So for the example above, my server was serving plone from the directory plone. The _vh_ tells the virtual host monster to append plone/ to every link it generates. Cool stuff..

So then I finally got it working. Alhamdullillah... Took a whole night. But seems to be very worth it.

Update (16 March 2008): Finally I've even got the layout working. After referring to and the Velo site it point to and also which explains what RewriteMap actually does. The RewriteMap part has to be part of the http.conf or if you are using Ubuntu in the sites configuration file. Then escape the request just like it says in the matthewwhitworth site and it all should work. Finally.

Wednesday, February 20, 2008

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 commit it again to the repository so that it'd be available for everyone.

Sunday, February 10, 2008

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.

Saturday, February 9, 2008

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.

Is Blogging No Longer a Thing?

As I embark on my new journey to learn the Rust programming language, I find myself pondering—where have all the blogs gone? In search of pr...