" I would love to change the world,
but they won't give me the source code "
-- Unknown Geek
Thursday, February 01, 2007
Bitterness
" ... Look at Joseph at the end of his life. He had been abused by his family, had his reputation ruined by being falsely accused of adultery, he was forgotten by friends, and at times it must have felt as if God had forgotten him. But at the end of his life, when faced with those who were responsible for the years of slavery and pain, he forgives his brothers. He said to them: 'You meant it for evil, but God meant it for good.' Despite all that has happened to him, he acknowledges the sovereignty of God, and God's amazing creative ability to bring good out of evil... "
Wednesday, January 31, 2007
Are you a Firebug power user ?
Click the title to the ajaxian blog entry with Joe Hewitt demonstrating the firebug for power-users.
Tuesday, January 30, 2007
Javascript rocks ... seriously
Sunday, January 28, 2007
She sings a love song to a Mac Pro
Click the title to see a Filipina singing modified lyrics of James Blunt's "You're Beautiful" to a Mac Pro. Hilarious !
Sunday, January 21, 2007
Enjoying my Seafood inspite of my allergies
While growing up, I discovered that certain things will allow me to enjoy seafood without very adverse effects.
1 - Devein the shrimp. Deveining removes the vein or the dark line that runs along the back of the shrimp. I noticed my allergies are less intense when eating deveined shrimp.
2 - Avoid the head of the shrimp. It seems whatever is causing my allergies, as far as shrimp goes, is heavily concentrated in the head so I stay away from it and eat the body only.
3 - Cider Vinegar and Pepper. I dip shrimp and crab meat in cider vinegar with pepper before I put it my mouth. I feel that it tastes really good and more importantly it seems to counter act the itchiness I usually get in my mouth after eating it.
4 - Lemon. I discovered this while dining at a UCC coffee shop. The water they served smelled like rubbing alcohol, at least it did to me. I inquired and it was in fact lemon and NOT rubbing alcohol. It seems dipping shrimp and crab in lemon has the same effect as cider vinegar and pepper. Alternatively, I found that I could chase away the itchiness in my mouth if I drink water with some lemon juice.
WARNING : The above are based on my personal experiences only. I classify my condition as mild. People with very serious reactions to seafood like shrimp or crab should consult a physician. As mild as the term "allergy" sounds, there have been known incidents of people dying due to allergic reactions. You have been warned !
Wednesday, January 10, 2007
there's an iPhone after all
Just a few hours ago Steve Jobs announced to an ecstatic crowd the availability of a mobile phone developed by Apple. I'm not sure I share the same sentiment. It's cool but will it fly this June 2007 ?
Monday, January 08, 2007
Are you on the list ?
- It'll be on the internet (e.g. youtube, peekvid, dailymotion).
- If it's a TV series, I can watch all the episodes in succession without worrying about schedules.
One thing I did notice about my TV and movie habits is how many of the stuff I watch are about super heroes. Not heroism in the patriotic everyday sense but rather seemingly ordinary people with extraordinary abilities.
Hero is no exception.
What's different about it is that, it's good, really good. It's the kind of series that makes you ask the obvious questions but it keeps you engaged with the wonder of discovering the answers. Like the recent big screen encarnations of Spiderman and Superman, the writers attempt to add the 'human' component. The characters are not portrayed as 'super heroes' but human beings with special abilities. Yes, there's a difference. The former connotes a level that you or I can never achieve while the latter identifies us mere mortals with the characters.
If you're in the US, you'll be able to see the episodes from http://www.nbc.com/Heroes/episodes/. Outside the US, I would suggest http://www.peekvid.com.
Friday, January 05, 2007
Google Answer to Filling Jobs Is an Algorithm
They've been known to do the most innovative things to attract prospective employees. Remember the math problem on the billboard ?.
Looks like they're going to go a step further and innovate the selection process with an alogrithm.
Click on the title to read the NY Times article.
Tuesday, January 02, 2007
Gmail's CSRF Security Flaw, is OpenACS vulnerable to a CSRF attack ?
Don't be misled, just because it's in the Ajaxian, doesn't mean that this is purely a problem with web applications that use Ajax. In fact, if I understand CSRF correctly, an out of the box OpenACS application that uses ad_form is possibly vulnerable. Well, except for the login form :-) Curious ? read on ....
What is CSRF ?
CSRF is an acronym for "cross site request forgery". Also known as "session riding", it describes a malicious exploit where a script takes advantage of an authenticated session to get information, like in Gmail's case, your contact list, but in other cases can be your personal or, worse, your financial information from the site that your browser is currently authenticated with.
How does it Work ?
The players involved are (A) you, the user, (B) the site with the malicious script and (C) the website where you are currently logged in or authenticated with. Examples of (C) are Gmail, your online banking website or an OpenACS web application.
The scenario would go something like this.
The user (A) logs in to (C) and stays logged in by checking "Remember me on this computer". On another window or tab, (A) goes to a website (B) with the malicious script. The script in (B) gets executed either from clicking a link or loading a page. The script from (B) will attempt to access (C) using the authenticated session and attempt to retrieve information like your contact list or other information.
Javascript can't do that ! Can it ?
Javascript is not suppose to be able to have access to cookies from other domains. Cookies are used to determine if a user is logged in to a site. They contain session information and other user specific information, hence, the browser imposes this cross domain limitation on javascript. In short, you can't use javascript to fake or manipulate cookies of other domains.
So this exploit will only work if the user (A) is logged in to (C) at the moment the script in (B) is executed.
Where did Gmail go wrong ?
In the case of Gmail, they were exposing a URL that returned JSON structured data that contained the contact list information. Hence you can actually put this url in script tags with the src pointing to this url. Like so
<script type="text/javascript" src="http://docs.google.com/data/contacts?out=js&show=ALL&psort=Affinity&callback=google&max=99999"></script<
While the browser prevents javascript from one domain to control a window in another domain, it will however allow you to specify a javascript source file from another domain.
I'm sure Gmail checks that the user is logged in before actually serving the javascript source file but after this check it has no way of knowing for sure that it was the user who requested it or a script from (B) a malicious website.
Is my OpenACS Web Application vulnerable ?
Unless your OpenACS application is running a web service or providing some sort of API, chances are its not.
he turned down an offer from Google
He blogs about how his 2 day interview with Google went and how (and more importantly, why) he turned down their offer.
Saturday, December 30, 2006
Notes on recent AOLserver research
I must admit that creating a socket server in AOLserver is not as straightforward as say in Apache with PHP or CGI perl but my research has led me to a number of different (possibly unrelated but potentially usefull) things.
Memcached : Someone has written a tcl api to memcached. Memcached caches db requests for clusters of AOLservers. It can run as a daemon on an unused server and allow several clustered web servers to share a cache of db requests. I was particularly intrigued that LiveJournal .com uses it with positive results. Dave suggests that it would be neat if this could be augmented into ns_cache.
Naviserver : I've known for sometime that there is a fork of AOLServer. I just noticed that they have lots of potentially useful modules. Some of these are familiar AOLServer modules. I would be interested to find out if any of these modules will work on AOLServer 4.0.10 and 4.5. Another intriguing question is whether OpenACS can run on NAVISERVER.
Saturday, December 23, 2006
One year of blogging
85 blog posts later who would have thought that it would still be here :-)
I hope next year will be a great year for blogging ...
Wednesday, December 20, 2006
Embed an encoded file in the URL
He lists a couple of possible applications. Click on the title to jump to the article at Hackzine.
Sunday, December 17, 2006
they posted my article
Upgrading to a larger hard disk
In the past, upgrading to a larger hard disk for me was always an opportunity to reinstall everything and start with a new OS. This time, however, I can't afford to do that because I have a pile of things on my plate that I want to clear out before the end of the year. In addition, I happen to be quite happy with SLES 10 (Suse Linux Enterprise 10) on my workstation and I would be devastated if I had to redo all my settings and configurations.
I went to the mall and got myself a new hard drive. It's a Seagate Barracuda 7200.9 160GB 7200rpm with 8MB cache. I would've wanted a Barracuda ES but it's available on order basis only and I didn't want to wait too long.
So here's the sitch ... I have an old 40GB hard drive that's about to give and I want to upgrade to my new 160GB hard drive but I don't want to reinstall my OS.
Thank goodness for the internet, to everyone who likes to post about their problems with their hard disks and best of all to everyone who answers.
So here's what I did.
First, I turned off the computer and unplugged it. My motherboard supports both SATA and IDE interfaces. I installed my new hard drive and plugged it into SATA1.Next, I boot up my PC and enter the BIOS. On my PC, I just press the delete key while it's booting up. Then, I configure the hard disk boot sequence so that it boots from SATA instead of the IDE interface. Note that not all motherboards supports this feature. While I am in the BIOS, I also configure the CDROM to boot first, you'll find out why next.
I used a Xubuntu Live CD to boot the PC after the configurations I made to the BIOS. In Xubuntu, I open a terminal and executed the following.
dd if=/dev/hda of=/dev/sda
My old hard disk is detected as /dev/hda while by new hard disk is /dev/sda. The dd command will copy my old hard disk into my new one byte per byte including the master boot records. There are some people that will argue that the above command can be used ONLY to clone two hard disks that are exactly the same so I was cautious but the explanations weren't very convincing so I decided to take a risk.
The copy took a while to finish. After it was done, I used cfdisk to verify the partitions on my new hard disk
cfdisk /dev/sda
From cfdisk I can see that I have a 40GB partition and about 110GB free disk space. I converted the free space into a new partition. I saved the configurations and exited cfdisk. Note that I could also have opted to resize the existing partition to use the entire disk.
I then ran fsck on /dev/sda1 which is the new partition which is the copy of my old hard drive. fsck did not report any problems.
Before rebooting, I mounted /dev/sda1 into a temporary directory.
cd /
mkdir tmpdir
mount /dev/sda1 tmpdir
Then I went into /tmpdir/boot and proceeded to edit the following files.
- /boot/grub/menu.lst
- /boot/grub/device.map
- /etc/fstab
I rebooted the PC and crossed my fingers. I was welcomed by the familiar grub menu and it proceeded to boot SLES 10. I logged in and it was like nothing changed.
Helpful Links
http://forums.gentoo.org/viewtopic-t-72947-highlight-cfdisk.html
http://www.linuxquestions.org/questions/showthread.php?p=1848006#post1848006
http://en.wikipedia.org/wiki/Dd_%28Unix%29
Tuesday, December 12, 2006
Dreamweaver, eat your heart out !!! Here comes Aptana.
Debug Javascript with Firebug
Joe Hewitt introduces you to Firebug on this video.
Monday, December 11, 2006
Are you an INTJ ? Take the test and find out.
Nope, don't worry, it's not from COSMOPOLITAN or some women's magazine ...
Saturday, December 02, 2006
Encounters with IE
1 - Operation Aborted error when printing a Web page. This happens on IE 6 only. If you happen to use "Tags" as an input name, you're users are bound to get the Operation Aborted Error.
2 - Page can not be displayed error. I couldn't find the original blog article where I read this particular problem. It occurs on a webpage where you have inline javascript that is trying to manipulate an html element that has not been loaded yet. The solution is to put the javascript in a function that gets called on the window.onload event.