geek stuff

this is april

Guess what I got after booting up my laptop today … ? Python 2.5 Licensing Change:-

  1. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 2.5 alone or in any derivative version, provided, however, that PSF’s License Agreement and PSF’s notice of copyright, i.e., “Copyright (c) 2001-2006 Python Software Foundation; All Rights Reserved” are retained in Python 2.5 alone or in any derivative version prepared by Licensee. License is royalty free for applications and derivative products distributed under any approved open source license. Other applications and derivative products are required to pay the Python Software Foundation a royalty of $US 1.25 per installed copy.

Already start bitching what the crap these guys are doing until I read to the bottom of the article. damn !! And another one, SQL on Rails !!:-

Rails is a short-stack framework for developing database-contained web applications according to the Model-Model-Model pattern. From the Ajax in the model, to the request and response in the model, to the domain model wrapping the database, Rails gives you a pure-SQL development environment. Finally!

man, they even got a screencast, repeat: screencast !! No serious, enterprise grade framework shouldn’t have a screencast. Definitely everyone should move their apps to SQL on Rails. And make sure your browser is fully AJAX-y to visit the website.

lighttpd and apache mod_proxy

Playing a little bit with lighttpd and it turns out to be good. Unfortunately, OpenSuse does not have lighttpd comes with the packages so I have to compiled it myself. There’s source rpm available on their site, so it’s not that hard. To get started, just edit the configuration file, you can named it anything but let’s put it as lighttpd.conf. The documentation is not really verbose about the configuration but you can get a lot of samples out there. Few things that I want to put a note is the conditional part. Sort of like this:-

$HTTP["host"] == "www.k4ml.com" {
  server.document-root = "/home/kamal/public_html/project/kxblog/trunk/www/"
  server.errorlog = "/home/kamal/lighttpd/lighttpd-error.log"
  accesslog.filename = "/home/kamal/lighttpd/access_log"

  server.error-handler-404 = "/index.php"

  fastcgi.server = ( ".php" =>
   (( "socket" => "/tmp/php-fastcgi.socket",
      "bin-path" => "/srv/www/cgi-bin/php",
      "bin-environment" => (
        "PHP_FCGI_CHILDREN" => "4",
        "PHP_FCGI_MAX_REQUESTS" => "10"
      )
   ))
 )

 } 

Most people use this feature for a virtual hosting and it really handy for that purpose. It allows me for unlimited document_root within my home directory for every sub domain that I have. And also note php-fastcgi, since lighttpd running as my userid I don’t need suExec anymore.

To start lighty, just type:-

$ lighttpd -f lighttpd.conf

If nothing comes out, everything should be ok. To verify it:-

$ curl -v http://www.k4ml.com:8139/ | head
* About to connect() to www.k4ml.com port 8139
*   Trying 207.7.108.53... connected
* Connected to www.k4ml.com (207.7.108.53) port 8139
> GET / HTTP/1.1
> User-Agent: curl/7.14.0 (i686-suse-linux) libcurl/7.14.0 OpenSSL/0.9.7g zlib/1.2.3
> Host: www.k4ml.com
> Accept: */*
>
< Date: Fri, 06 Jan 2006 08:05:58 GMT
< Server: lighttpd | k4ml

The server was set to run at port 8139 (you can choose any port) since port 80 already used by apache. Now the fun part. To enable user accessing the site using only www.k4ml.com and still be served by lighttpd, we can proxy the request through apache. If mod_proxy available, just put this in the virtual host context:-

ProxyRequests Off
ProxyPreserveHost On

Order deny,allow
Allow from all

ProxyPass / http://www.k4ml.com:8139/
ProxyPassReverse / http://www.k4ml.com:8139/

Now all request to www.k4ml.com will be passed to www.k4ml.com:8139, the lighttpd server by apache. By patching the drupal’s code a little bit, I’m able to get drupal’s clean url to work without using mod_rewrite anymore !. However, some problem with dokuwiki forced me to revert this site back to apache. Based on this litle experimentation, there’s a possibility that I would turn up to lighttpd in the future.

Main reference - Lighttpd, the painless way

drupal 4.7-beta1 and linus-gnome-usability

I was offline for a few days and these are some of the things that I missed:-

  • Drupal 4.7-beta1 was out.
  • Linus Torvalds made a headline again.
  • A few spams in my guestbook and comments entry. Thanks spammy.

As for drupal 4.7-beta1, I made a quick test on the CVS head but not going too deep into it. I’m still on my way home and once I get back, I’ll start looking into 4.7 seriously. For the linus stuff, it’s quite fun to skim through the mailing list archives (if you intend to waste some of your precious time ). Somehow, I have to agree with him but I’m not using GNOME anymore and the last GNOME I’ve try was 2.6 so it’s not fair for me to say anything. For my pleasure, this is the quote that I like much from linus:-

And every single other WM I know of has no problem assigning the different actions to different buttons. Some WM’s let you program these things almost totally freely (fvwm), others have a small fixed set of actions that they allow you to bind to the window behaviour - but they allow you to bind to the mouse button YOU want. Gnome? Nada. I’m surprised it even allows “focus-follows-mouse” behaviour (which as everybody knows is the only correct behaviour, and only God knows why both KDE and gnome default to that horrid click-to-focus, but notice how I’m not complaining about that BECAUSE I CAN FIX IT!)

and this is the full threads:-

If you ask me which desktop enviroment do I prefer, I would say XFCE (4.2 and later) but now I’m using KDE. For so long I used evilwm together with screen to manage my desktop and then I found that XFCE 4.2 can do all the things that evilwm could plus some extra stuffs.

reality tv for geeks, anyone ?

Actually I’m reading on osnews about project aardvark when this idea came out of my mind. Everyone got them, why geeks shouldn’t ? btw, about project aardvark:-

Four interns are brought into Manhattan and given 12 weeks to design, develop, debug and ship a program that will change the way computer geeks around the world fix their friends’ computers. Boondoggle Films presents a journey through the world of software development from the perspective of a unique upstart, four quirky interns, and the world of The Geek.

The dvd is not out yet but you can preorder and grab the trailer. Look’s interesting and it from Joel Spolsky… and now I’m start imagining Joel Spolsky as the next Donald Trump :D

geekblock, interrupt driven lifestyle

Previously, Helmi blogged about geekblock. Now babak farokhi (geek style) also blogging something similar. He called it “Interrupt driven lifestyle” and offered some solutions. Actually, this is what I’m suffered lately … :(

Public Bank's ATM running Windows ?

I walked passing an ATM machine when I noticed something so familiar. I step back to the Public Bank’s ATM and to my suprise .. it was a Windows desktop. The typical win 9x desktop. I’m not sure but it might be Windows NT. On the taskbar, I saw two minimized programs running which I guess the ATM’s system. So the ATM system is just a normal windows application running in full screen. For so long I thought ATM machines were running under some specific OS, not the typical Windows. Or this only the case with Public Bank ? Anyone working in the banking industry should know about this. So what is the most used OS (for their ATM machines) among the local banks ?

I snapped a picture of the ATM machine with my phone’s camera. Here it is - http://www.flickr.com/photos/k4ml/63230549/

image gallery generator

I was about to write some image gallery generator, probably in php or bash. Before I start coding, I type “gallery generator” in google and as expected, there’s already a few gallery generator available. No need to re-invent the wheel. The one that I tried, igal seem’s to produce what I’d intent for when I planned to write such a script. It was in Perl and used ImageMagick, which I already have in my system. Using it is easy. Just download the tarball. Some installation with make and then just type igal in the directory where your images exist. It will generate the HTML pages with all the thumbnails. Then I just upload the directory to my website.

Some other generators in PHP and Python also available.

  • http://www.amk.ca/python/code/gallery - Python and need Python Imaging Library
  • http://zgal.sourceforge.net/ - Perl but PHP port also available as agal.
  • http://www.nobugs.org/developer/gallery/ - also Perl and use ImageMagick

broadband on electric line

SEMUA premis kediaman atau perniagaan di Malaysia yang ada bekalan elektrik bakal menikmati perkhidmatan jalur lebar termasuk capaian internet berkelajuan tinggi dan televisyen digital tidak lama lagi kerana Masers Digital Sdn Bhd sudah berjaya membangunkan teknologi itu untuk dilaksanakan.

Ketua Pegawai Teknologi, Masers Digital Sdn Bhd, Suhaimi Abdul Rahman, berkata teknologi komunikasi talian tenaga (PLC) itu akan menjadi pemangkin kepada hasrat kerajaan merapatkan jurang digital antara bandar dan luar bandar.

“PLC membolehkan komunikasi data menerusi talian elektrik biasa yang ada di rumah, pejabat atau kilang di negara ini. Kami yakin ia dapat dikomersilkan mulai 2007 selepas ujian teknologi dan ujian sebenar dapat dijalankan tahun depan.”

via berita harian

Ok, I heard this for years but nothing has really came out. But they said 2007, so I blog this to recalled it back in the next 2 years. We’ll see.

mc

Got stomach ache this morning and I feel too lazy to get into office. Thinking that I would not be so comfortable at the office in this situation, I decided to stay at home. Then I try to log to my office’s internal jabber network, in case some one (my boss) need to contact me on urgent matter.

$ ssh -L 5222:internal-jabber-server:5222 my_office_server

However, for some reasons my Gaim client refused the connection with Stream Error message when I try to connect. After trying for a few times, I guess the problem was with the authentication process. The internal-jabber-server used username@internal-jabber-server to verify the user but I’m specifying localhost as my server resulting in the screenname username@localhost. As usual, I tried to search google for a possible solutions but can’t find any. Almost give up then I realized something … stupid me !!! All the jabber server need is just a screenname in form of username@internal-jabber-server and all that I need to do just specify internal-jabber-server as my server instead of localhost. Then I just edit my /etc/hosts file to point internal-jabber-server to 12.0.0.1.

done … !

and wow … using the same method, now I can access the internal subversion server which I got problem to access it from home before. Adding the CNAME of the internal subversion server to my /etc/hosts, forward my local port to the subversion server which running at port 80, I can just checkout all the source code like usual, as I’m at the office.

$ svn co http://internal-subversion-server:8080/svn/path/to/project

Where 8080 is my local ssh forwarded port to the internal-subversion-server. Ok .. now I can start hacking ;)

my very old website

Reading this discussion on ittutor made me try to search for my old (first) website also and to my suprise, it’s was indexed on web archive website. This is my first website I’ve created few years ago.

Syndicate content