Skip to main content

Posts

Showing posts from 2008

Laptop Reborn

snapshot-20081227
Originally uploaded by Abdullah Zainul Abidin 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 man…

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 :)

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 …

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 heartHe 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 fadesI 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 heartAnd 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

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…

foss.my 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 t…

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

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 https://help.ubuntu.com/community/WindowsXPUnderQemuHowTo 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 -…

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 anywa…

Of version control and hostings

Recently I was just stumbling along in the internet when suddenly I came to the github.com 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 foss.my?". It is because RoR is hosted right there on github.com 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 launchpad.net uses bazaar and zope (which he is heavily involved in) is hosted on launchpad.net. 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 mercu…

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..

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…

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.. :)

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

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 a…

Tips for admins and more wisdom from Linus

I was reading the August edition of Arch newsletter (http://www.archlinux.org/static/newsletters/newsletter-2008-Aug-04.html) and in it I found 2 articles which I was particularly interested in.
1) 10 Essential tricks for admins (http://www.ibm.com/developerworks/linux/library/l-10sysadtips/?ca=dgr-lnxw02aLinux10Tricks&S_TACT=105AGX59&S_CMP=GR) 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 (http://www.simple-talk.com/opinion/geek-of-the-week/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..

Some tips for administrators and more wisdom from Linus..

I was reading the August edition of Arch newsletter
(http://www.archlinux.org/static/newsletters/newsletter-2008-Aug-04.html)
and in it I found 2 articles which I was particularly interested in.
1) 10 Essential tricks for admins
(http://www.ibm.com/developerworks/linux/library/l-10sysadtips/?ca=dgr-lnxw02aLinux10Tricks&S_TACT=105AGX59&S_CMP=GR)
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
(http://www.simple-talk.com/opinion/geek-of-the-week/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..

Humanity...

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 identi.ca 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 to…

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.

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 http://ubuntuforums.org/showthread.php?t=43892 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.

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 …

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:
http://www.youtube.com/watch?v=6B8SSKgkALc&feature=related

and if you want the lyrics check them out at:
http://infinite-hands.rakjar.de/

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

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: http://www.r3uk.co.uk/index.php/home/36-useful-information/79-eeepc-tips-and-tricks. 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...

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.

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:
Take out the batteryPress the power button and keep it pressed while inserting the battery againRelease the power button only after the palm logo has finished loadingIt will ask to press up to delete all the data. So press upThat's itSo next, how do I organize my life with this? Still a lot to learn..

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 http://hgbook.red-bean.com/hgbook.html

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.

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 worthwhileI 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 sma…

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: http://blogs.warwick.ac.uk/jrose/entry/using_clamav_in/.

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 `db.XY.clamav.net` to `db.MY.clamav.net` 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 filen…

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". …

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 lewk.org 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 pro…

My life..

LOL.. found this while stumbling..

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)
{
try
{
// Show "property" and "type property"
type = typeof(obj[proper…

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 b…

VirtualHost in apache

Finally understand it after reading:
http://www.onlamp.com/pub/a/apache/2003/07/24/vhosts.html?page=2
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.

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 https://help.ubuntu.com/community/SSHHowto#public-key-auth.

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 id_dsa.pub 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.

Setting up trac in ubuntu

After looking for quite some time finally found and easy guide to install trac on ubuntu at http://code.softwarefreedom.org/projects/backports/wiki/TracFastCgi. 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 http://abdullahsolutions.com/trac/epunch

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 http://www.getfirebug.com/ and download the 1.1 Beta. It works in Firefox 3 Beta and that is GREAT.. :)

Getting postfix relay to work with godaddy.com

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. person@domain.com)
Outgoing Mail Server: smtpout.secureserver.net
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/main.cf to use the 3535 port:
relayhost = smtpout.secureserver.net:3535

And the most important part is the username. It is person@domain.com. It is the person@domain.com you registered your free mailbox with. Not your login name to godaddy. Use the…

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.

<webdav-source-server>
# # valid keys are "address" and "force-connection-close"
address localhost:1980
force-connection-close off
</webdav-source-server>

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 w…

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 http://www.physics.queensu.ca/Computing/Docs/HOWTOs/rsync/. 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.

Setting up awstats in ubuntu

Finally my server at abdullahsolutions.com has awstats after delaying to install it for so long. The steps I follow were found at here http://www.petersblog.org/node/697 . 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: LogFile="/var/log/apache/access.log"
LogFormat=1
DNSLookup=1
DirData="/var/cache/awstats/"
DirCgi="/cgi-bin"
DirIcons="/icon"
SiteDomain="hostname"
AllowToUpdateStatsFromBrowser=1
AllowFullYearView=3
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/awstats.pl -config=hostname -update
In your web browser, go to the url: http://hostname/cgi-bin/awstats.pl?config=hostname
Study the stats in quiet awe Edit crontab to update stats automatically every night:�…

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 http://www.oscc.org.my/index.php?option=com_content&task=view&id=189&Itemid=128. 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

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.

#!/bin/sh

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 [ $w…

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…

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: http://plone.org/documentation/how-to/apache-ssl . 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: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html which also led me to an interesting albeit not really what I'm looking for now at http://httpd.apache.org/docs/1.3/misc/rewriteguide.html. 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 th…

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 http://svnbook.red-bean.com/en/1.2/svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.resurrect 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 commi…

Enable .htaccess rewrite in Ubuntu Server

Fuh.. Finally after so long abdullahsolutions.com 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.