<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Site With The Lamp</title>
	<atom:link href="http://www.raditha.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.raditha.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 23 Jul 2010 05:26:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Yet another dead macbook</title>
		<link>http://www.raditha.com/blog/archives/yet-another-dead-macbook.html</link>
		<comments>http://www.raditha.com/blog/archives/yet-another-dead-macbook.html#comments</comments>
		<pubDate>Fri, 23 Jul 2010 05:26:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[Macbook]]></category>
		<category><![CDATA[toast]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/yet-another-dead-macbook.html</guid>
		<description><![CDATA[Dell is in a lot of hot water for shipping lousy hardware. One wonders why the same fate has not befallen Apple, the company that is so arrogant as to elegantly package a brick and call it an iphone or an ipad and charge you heaps of money for it. Macbooks are only slightly better. [...]]]></description>
			<content:encoded><![CDATA[<p>Dell is in a lot of hot water for shipping lousy hardware. One wonders why the same fate has not befallen Apple, the company that is so arrogant as to elegantly package a brick and call it an iphone or an ipad and charge you heaps of money for it. Macbooks are only slightly better. It was only a couple of months ago that my <a href="http://www.raditha.com/blog/archives/a-dead-macbook..html">Macbook died off</a>. Fortunately I was able to bring it back to the land of the living thanks to Ebay. The price that the local Apple dealers wanted for fixing it was enough to buy a netbook. And the 13&#8243; macbook is only slightly more powerfull (or bigger than a netbook anyway).</p>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.raditha.com/blog/images/mac/mobo.jpg"><img title="Macbook motherboard" src="http://www.raditha.com/blog/images/mac/mobo-t.jpg" alt="Macbook motherboard" width="400" height="266" /></a><p class="wp-caption-text">Motherboard or logic board or whatever</p></div>
<p>Yesterday, my father&#8217;s mac refused to power up. He had shut it down normally the previous day. I never shut down mine for fear that it wouldn&#8217;t start up again and in his case it didn&#8217;t. So he tried all the usually remedies like resetting the SMC etc etc but when none of them worked, I was asked to take a look. I immediately suspected a broken cable like happened with mine. After taking the damned thing apart (there are about 20 screws to undo), I found the cable was ok. Anyway to be safe, I tested with another cable only to find that the computer doesn&#8217;t start up.</p>
<p>I bet you are itching to ask if I tried a different battery or a different power supply. You bet I did. So the only logical conclusion now is that the mother board (Illogically named the Logic board by Apple is toasted). And guess what? <a href="http://www.raditha.com/blog/archives/001302.html">this is the second time</a> that the mother board on this computer has got toasted! The first time around it was still under warranty but that is no longer the case.</p>
<p>There are plenty of logic boards for sale on Ebay. But they are of no use whatsoever.  That&#8217;s because Apple being as stupid as they are, have thought fit to solder the CPU onto the mother board. Yes you heard that right, in Apple notebooks you cannot upgrade the CPU unless you are an electronics engineer. Even then most electronics engineers may not have the equipment needed to replace the CPU or the motherboard at home.</p>
<p>The best thing to do with this macbook seems to be to cannibalize it for parts, any of the macbooks that belong to other family members or close friends are sure to develop some fault before long.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/yet-another-dead-macbook.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More on CDNs</title>
		<link>http://www.raditha.com/blog/archives/more-on-cdns.html</link>
		<comments>http://www.raditha.com/blog/archives/more-on-cdns.html#comments</comments>
		<pubDate>Wed, 07 Jul 2010 11:51:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[cloud]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/more-on-cdns.html</guid>
		<description><![CDATA[CDNs exists because it&#8217;s widely believed that they help speed up website load times by distributing static content to locations that are geographically closer to the user. However this might actually slow things down for some users. Typically you can use tools such as Firebug, Chrome Developer Tools and Yslow to check your page load [...]]]></description>
			<content:encoded><![CDATA[<p>CDNs exists because it&#8217;s widely believed that they help speed up website load times by distributing static content to locations that are geographically closer to the user. However this might actually slow things down for some users. Typically you can use tools such as Firebug, Chrome Developer Tools and Yslow to check your page load time and efficiency. But once again you are testing from your own location. Fortunately there are a few tools that will help you figure out the page load times from remote locations. They include <a href="http://tools.pingdom.com/">Pingdom Tools</a>, <a href="http://www.showslow.com/">Show Slow</a> and <a href="http://www.webpagetest.org/">WebPageTest</a>. WebPageTest even allows you to specify different locations for the test server. However the best looking tool appears to be <a href="http://github.com/yahoo/boomerang">Boomerang</a>. But it&#8217;s still early days for Boomerang so let&#8217;s look at a few results from Pingdom Tools.</p>
<div class="wp-caption aligncenter" style="width: 560px"><a href="http://www.raditha.com/blog/images/aws/pingdom-cdn.png"><img title="With Cloud Front Enabled" src="http://www.raditha.com/blog/images/aws/pingdom-cdn-t.png" alt="Pingdom test while cloud front is enabled." width="550" height="148" /></a><p class="wp-caption-text">Pingdom test while cloud front is enabled.</p></div>
<div class="wp-caption aligncenter" style="width: 560px"><a href="http://www.raditha.com/blog/images/aws/pingdom-s3.png"><img title="Static content hosted on S3" src="http://www.raditha.com/blog/images/aws/pingdom-s3-t.png" alt="Static content hosted on S3" width="550" height="152" /></a><p class="wp-caption-text">Static content hosted on S3</p></div>
<div class="wp-caption aligncenter" style="width: 560px"><a href="http://www.raditha.com/blog/images/aws/pingdom-www2.png"><img title="No CDN " src="http://www.raditha.com/blog/images/aws/pingdom-www2-t.png" alt="All content on the webserver itself" width="550" height="158" /></a><p class="wp-caption-text">Without and content distribution</p></div>
<p>All the images can be clicked on to be zoomed. As you can see, content distribution really does have a positive impact when the site&#8217;s visitors are from the United States.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/more-on-cdns.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Content Distribution Networks any good?</title>
		<link>http://www.raditha.com/blog/archives/content-distribution-networks-any-good.html</link>
		<comments>http://www.raditha.com/blog/archives/content-distribution-networks-any-good.html#comments</comments>
		<pubDate>Fri, 02 Jul 2010 11:14:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Rad Inks]]></category>
		<category><![CDATA[broadband]]></category>
		<category><![CDATA[cloud]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/content-distribution-networks-any-good.html</guid>
		<description><![CDATA[CloudFront, built upon Amazon S3 is a useful cloud hosting solution because there are no monthly commitments. You pay for the bandwidth you use. Well you do end up paying twice for bandwidth unless you are smart enough to use proper cache control mechanisms. Even then CloudFront is probably more suitable for small businesses than [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://aws.amazon.com/cloudfront/">CloudFront</a>, built upon Amazon S3 is a useful cloud hosting solution because there are no monthly commitments. You pay for the bandwidth you use. Well you do end up paying twice for bandwidth unless you are smart enough to use proper cache control mechanisms. Even then CloudFront is probably more suitable for small businesses than other Content Distribtion Networks like <a href="http://www.akamai.com/">Akamai</a> or <a href="http://www.cachefly.com/">Cachefly</a> because they all have monthly commitments.</p>
<p>It is debatable whether using a CDN will speed up your site. In fact, I just discovered that using Cloudfront actually appears to be slower than just using S3 or indeed delivering static content from an Elastic Compute Cloud server.</p>
<div class="wp-caption aligncenter" style="width: 560px"><a href="http://raditha.com/blog/images/aws/www2radinks.png"><img title="Load times without a CDN" src="http://raditha.com/blog/images/aws/www2radinks-t.png" alt="Page load times all content on an EC2 server" width="550" height="173" /></a><p class="wp-caption-text">Page load times all content on an EC2 server</p></div>
<div class="wp-caption aligncenter" style="width: 560px"><a href="http://raditha.com/blog/images/aws/cdnhosting1.png"><img title="Static content from Amazon Cloud Front" src="http://raditha.com/blog/images/aws/cdnhosting1-t.png" alt="Static content from Amazon Cloud Front" width="550" height="179" /></a><p class="wp-caption-text">Static content from Amazon Cloud Front</p></div>
<div class="wp-caption aligncenter" style="width: 560px"><a href="Static content from Amazon S3"><img title="Static content from Amazon S3" src="http://raditha.com/blog/images/aws/s3hosting1-t.png" alt="Static content from Amazon S3" width="550" height="174" /></a><p class="wp-caption-text">http://raditha.com/blog/images/aws/s3hosting1.png</p></div>
<p>The reason for this apparent slowdown is that CDNs are generally geared to send you route you to the closest geographic location. The closest geographic location may not always be the closest network path. Even they are the same, it&#8217;s still possible that there is less bandwidth in the fiber optic cables for that location, as a result if lots of surfers are connecting to that location, you might find things a little bit slow.</p>
<p>Users from Sri Lanka are directed to the CloudFront servers in Singapore. Even though Singapore is much closer to me than the United States, most traffic from Sri Lanka ends up heading Westwards towards US than eastwards towards Singapore. The same applies for most parts of South Asia including India.  Most ISPs in different parts of the world are better equipped to route traffic towards the US than towards other countries for the simple reason that historically a vast majority of web servers were located in the US. In fact the business model of small web hosting companies is to rent out racks full of servers from large us hosting companies and to sublet them to their customers. Which means, whenever you connect to the website of the office across the street from yours, you are actually accessing a server in the United States.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/content-distribution-networks-any-good.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Going nowhere with @anywhere.</title>
		<link>http://www.raditha.com/blog/archives/going-nowhere-with-anywhere..html</link>
		<comments>http://www.raditha.com/blog/archives/going-nowhere-with-anywhere..html#comments</comments>
		<pubDate>Sun, 13 Jun 2010 15:31:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[etc]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/going-nowhere-with-anywhere..html</guid>
		<description><![CDATA[When twitter&#8217;s @anywhere came out many geeks (yours truely included) thought of ways of adding it to their sites and blogs. @anywhere has a lot of usefull features, then again some it isn&#8217;t very usefull either (unless of course you are building a fully featured twitter app (which most website owners aren&#8217;t doing)). In the [...]]]></description>
			<content:encoded><![CDATA[<p>When twitter&#8217;s @anywhere came out many geeks (yours truely included) thought of ways of adding it to their sites and blogs. @anywhere has a lot of usefull features, then again some it isn&#8217;t very usefull either (unless of course you are building a fully featured twitter app (which most website owners aren&#8217;t doing)). In the end like many others I ended up using it to create a &#8216;follow me on twitter&#8217; button. Sure it&#8217;s a bit more dynamic than a static image but it&#8217;s a lot bigger than a static image as well.  There is a difference of about 20Kb when the page loads with and without the @anywhare javascript.</p>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.raditha.com/blog/images/twitter/with-anywhere.png"><img title="Statistics with @anywhere" src="http://www.raditha.com/blog/images/twitter/with-anywhere-t.png" alt="Statistics with @anywhere" width="400" height="125" /></a><p class="wp-caption-text">Page size with the @anywhere javascript included</p></div>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.raditha.com/blog/images/twitter/without-anywhere.png"><img title="Without the @anywhere code" src="http://www.raditha.com/blog/images/twitter/without-anywhere-t.png" alt="Page load statistics without @anywhere" width="400" height="125" /></a><p class="wp-caption-text">Page load statistics without the @anywhere code</p></div>
<p>Sounds bad huh? well maybe, but not even half as bad as Facebook&#8217;s like button. It adds about 70Kb to the page size and doesn&#8217;t do anything other than display the like button. In the case of @anywhere, it&#8217;s got a load of features it&#8217;s just that we are not making use of them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/going-nowhere-with-anywhere..html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Have we been misled about cloud hosting?</title>
		<link>http://www.raditha.com/blog/archives/have-we-been-misled-about-cloud-hosting.html</link>
		<comments>http://www.raditha.com/blog/archives/have-we-been-misled-about-cloud-hosting.html#comments</comments>
		<pubDate>Sat, 12 Jun 2010 16:31:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/have-we-been-misled-about-cloud-hosting.html</guid>
		<description><![CDATA[Amazon recently announced that S3 support has been enabled in the AWS management console. Sounds great. Except that it doesn&#8217;t work. Once you click on the S3 tab in the console the process seems to hang. The reason amazon and other cloud hosting companies want us to switch over to the cloud is because it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon recently announced that S3 support has been enabled in the AWS management console. Sounds great. Except that it doesn&#8217;t work. Once you click on the S3 tab in the console the process seems to hang. The reason amazon and other cloud hosting companies want us to switch over to the cloud is because it&#8217;s supposed to eliminate this sort of thing. They have being throwing phrases like Auto scaling, Auto load balancing, Distributed locations and what have you to prove the point.</p>
<div class="wp-caption aligncenter" style="width: 520px"><a href="http://www.raditha.com/blog/images/virtualization/aws-s3.png"><img title="Shouldn't happen in the cloud" src="http://www.raditha.com/blog/images/virtualization/aws-s3-t.png" alt="Shouldn't happen in the cloud." width="510" height="176" /></a><p class="wp-caption-text">Now they are blaming us for their own faults!</p></div>
<p>Those who were patient enough to stare at the semi frozen browser window were rewarded with the above dialog. That&#8217;s right nothing wrong at their end, we have a firewall issue. Except that in my firewall all outgoing ports are open. Which is pretty much the same for quite a few others who have commented on it.</p>
<p>The truth is that this is not a firewall issue. It&#8217;s not a scalability issue. S3 can and will scale very well, It&#8217;s just that someone has written buggy JavaScript and doesn&#8217;t want to admit it. In the meantime many users will jump to the wrong conclusion and get off the cloud.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/have-we-been-misled-about-cloud-hosting.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>fuse: failed to exec fusermount: Permission denied</title>
		<link>http://www.raditha.com/blog/archives/fuse-failed-to-exec-fusermount-permission-denied.html</link>
		<comments>http://www.raditha.com/blog/archives/fuse-failed-to-exec-fusermount-permission-denied.html#comments</comments>
		<pubDate>Fri, 11 Jun 2010 13:42:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/fuse-failed-to-exec-fusermount-permission-denied.html</guid>
		<description><![CDATA[This is a footnote to yesterday&#8217;s post about using fuse based encrypted filesystems on linux. Once you have everything setup and try to mount an encrypted folder, you might get the following error:
﻿EncFS Password:
fuse: failed to exec fusermount: Permission denied
fuse failed.  Common problems:
- fuse kernel module not installed (modprobe fuse)
- invalid options &#8212; see usage [...]]]></description>
			<content:encoded><![CDATA[<p>This is a footnote to yesterday&#8217;s post about using fuse based encrypted filesystems on linux. Once you have everything setup and try to mount an encrypted folder, you might get the following error:</p>
<p style="padding-left: 30px;">﻿<span style="color: #993300;">EncFS Password:</span></p>
<div id="_mcePaste" style="padding-left: 30px;"><span style="color: #993300;">fuse: failed to exec fusermount: Permission denied</span></div>
<div id="_mcePaste" style="padding-left: 30px;"><span style="color: #993300;">fuse failed.  Common problems:</span></div>
<div id="_mcePaste" style="padding-left: 30px;"><span style="color: #993300;">- fuse kernel module not installed (modprobe fuse)</span></div>
<div id="_mcePaste" style="padding-left: 30px;"><span style="color: #993300;">- invalid options &#8212; see usage message</span></div>
<p>This can be easily fixed by typing:</p>
<p>chmod +x /usr/bin/fusermount</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/fuse-failed-to-exec-fusermount-permission-denied.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encrypted filesystem on linux</title>
		<link>http://www.raditha.com/blog/archives/encrypted-filesystem-on-linux-2.html</link>
		<comments>http://www.raditha.com/blog/archives/encrypted-filesystem-on-linux-2.html#comments</comments>
		<pubDate>Thu, 10 Jun 2010 13:00:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[etc]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[steganography]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/encrypted-filesystem-on-linux-2.html</guid>
		<description><![CDATA[Six years ago, I had a post with this exact same title. At the time it was about making a crypto loop. Cryptoloop allows you to create a large file, ecrypt it and then mount it with the help of a loop back device as a file system. The contents cannot be seen without the proper [...]]]></description>
			<content:encoded><![CDATA[<p>Six years ago, I had a <a href="http://www.raditha.com/blog/archives/568.html">post</a> with this exact same title. At the time it was about making a crypto loop. Cryptoloop allows you to create a large file, ecrypt it and then mount it with the help of a loop back device as a file system. The contents cannot be seen without the proper password. Truecrypt is another system which allows you to do pretty much the same thing but with the added bonus of having support for Staganographic content. However this method is cumbersome because if you run out of space on the encrypted volume, you need to create a new file and copy over the contents from the old one. That&#8217;s where fuse based systems like encfs come in.</p>
<p><a href="http://www.arg0.net/encfs ">encfs</a> is pretty useful because you don&#8217;t need to start of by creating a large single file to hold all your other files. Simply create two folders on your hard drive, one to contain the encrypted files and the other as the mount point where the decrypted files show up  (but only if you provide the right password).  Today, I tried to setup such a system on a Centos 5.4 box (well it wasn&#8217;t really a centos 5.4 box it was virtualize, but never mind) and ran into an error straight away:</p>
<div id="_mcePaste" style="padding-left: 30px;"><span style="color: #993300;">Verify Encfs Password:</span></div>
<div id="_mcePaste" style="padding-left: 30px;"><span style="color: #993300;">terminate called after throwing an instance of &#8216;boost::filesystem::filesystem_error&#8217;</span></div>
<div id="_mcePaste" style="padding-left: 30px;"><span style="color: #993300;">what():  boost::filesystem::path: invalid name &#8220;.backups&#8221; in path: &#8220;/mnt/.backups/.encfs6.xml&#8221;</span></div>
<div id="_mcePaste" style="padding-left: 30px;"><span style="color: #993300;">Aborted</span></div>
<p style="padding-left: 30px;">
<p>Oh by the way, encfs is not found on the Centos Base repos. You need to get it from <a href="http://fedoraproject.org/wiki/EPEL">EPEL</a>. There were exactly four results in Google for this error and none of them seemed likely to be the solution. Pretty annoying, because I had in fact set this up before on a 32 bit CentOS machine before (this time, it&#8217;s a 64 bit machine). Rather than compiling from sources, which I am loath to doing, I thought to have a look at some of the <a href="http://sourceforge.net/apps/mediawiki/fuse/index.php?title=EncryptedFileSystems">other options available</a>.</p>
<p style="text-align: left;">1) <a href="http://www.freenet.org.nz/phonebook">PhoneBook</a></p>
<p style="text-align: left; padding-left: 30px;">Phonebook also appears to support steganography content and sounds similiar to truecrypt but it&#8217;s a bit of overkill for me and it hasn&#8217;t been maintained since 2004.</p>
<p style="text-align: left;">2) CryptoFS</p>
<p style="text-align: left; padding-left: 30px;">Sadly the site seems to have been taken offline.</p>
<p style="text-align: left;">3) <a href="http://polacanthus.net/">MinforFs</a></p>
<p style="text-align: left; padding-left: 30px;">&#8216;MinorFs is a userspace filesystem (fuse) for Linux providing private storage to pseudo persistent processes. This allows programs that are run by a user to keep some data safe from all potential malware that runs with all this users privileges.&#8217; &#8211; once again it appears to be overkill</p>
<p style="text-align: left;">4) <a href="http://www.enderunix.org/metfs/">MetFS</a></p>
<p style="text-align: left; padding-left: 30px;">&#8216;<span style="font-family: sans-serif;">MetFS is a filesystem software in userspace that is encrypted, dynamic sized (increase when new data added, decrease when data removed), single file when it&#8217;s unmounted&#8217; &#8211; oh well, if the file grows and shrinks dynamically I can live with that. The only catch is that it doesn&#8217;t have an RPM. It&#8217;s released under an open source license but the download page says, it may only be used for educational purposes. Explain that one to me. </span></p>
<p style="text-align: left;"><span style="font-family: sans-serif;">Sadly MetFS wouldn&#8217;t compile either:</span></p>
<p style="text-align: left; padding-left: 30px;">
<p style="text-align: left; padding-left: 30px;"><span style="color: #993300;">metfs.c: In function ‘metfs_extract_file’:</span></p>
<p style="text-align: left; padding-left: 30px;"><span style="color: #993300;">metfs.c:802: error: ‘TAR’ undeclared (first use in this function)</span></p>
<p style="text-align: left; padding-left: 30px;"><span style="color: #993300;">metfs.c:802: error: ‘t’ undeclared (first use in this function)</span></p>
<p style="text-align: left; padding-left: 30px;"><span style="color: #993300;">metfs.c:820: warning: implicit declaration of function ‘tar_extract_all’</span></p>
<p style="text-align: left; padding-left: 30px;"><span style="color: #993300;">metfs.c: In function ‘main’:</span></p>
<p style="text-align: left; padding-left: 30px;"><span style="color: #993300;">metfs.c:910: warning: implicit declaration of function ‘fuse_main’</span></p>
<p style="text-align: left; padding-left: 30px;"><span style="color: #993300;">make: *** [all] Error 1</span></p>
<div>It was time to look again at encfs but by now it was angry at my unfaithfulness.</div>
<div></div>
<div>
<div style="padding-left: 30px;"><span style="color: #993300;">checking for boostlib &gt;= 1.34&#8230; configure: error: We could not detect the boost libraries (version 1.34 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to &#8211;with-boost option.  If you are sure you have boost installed, then check your version number looking in &lt;boost/version.hpp&gt;. See http://randspringer.de/boost for more documentation.</span></div>
<div style="padding-left: 30px;"></div>
<div style="padding-left: 30px;"><span style="color: #993300;"><br />
</span></div>
<div>Then it occured to me that <a href="http://moririn-web.blogspot.com/2008/08/how-to-use-encfs-on-centos-52.html">one of the four results</a> for the encfs &#8211; boost error mentioned that you should not use stuff from EPEL.  I ignored that at first because the post was from 2008 and was speaking of Centos 5.2 but I decided to add the <a href="http://rpmrepo.org/RPMforge/">RPMForge</a> repo to my repository list and try again. And sure enough this time encfs worked without that annoyed error. Phew.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/encrypted-filesystem-on-linux-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time for a face lift.</title>
		<link>http://www.raditha.com/blog/archives/time-for-a-face-lift..html</link>
		<comments>http://www.raditha.com/blog/archives/time-for-a-face-lift..html#comments</comments>
		<pubDate>Tue, 18 May 2010 14:23:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[etc]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/time-for-a-face-lift..html</guid>
		<description><![CDATA[This site was first created in 2003 and then totally neglected. Every now and then I get a bee under my bonnet and write a few new articles or make some minor tweaks to the site&#8217;s appearance. The last such redesigned happened back in 2007. That was only a minor tweak, which meant that right until today, the [...]]]></description>
			<content:encoded><![CDATA[<p>This site was first created in 2003 and then totally neglected. Every now and then I get a bee under my bonnet and write a few new articles or make some minor tweaks to the site&#8217;s appearance. The last such redesigned happened back in 2007. That was only a minor tweak, which meant that right until today, the site looked like one that had been designed in <a href="http://www.raditha.com/blog/archives/000542.html">2005</a>. Hopefully it will now look like something made in 2008!</p>
<p>This is the old UI saved here for posterity.</p>
<div class="wp-caption aligncenter" style="width: 410px"><a href="http://www.raditha.com/blog/images/olddesign-2010.png"><img title="The old design" src="http://www.raditha.com/blog/images/olddesign-2010-t.png" alt="The old UI, saved here for posterity." width="400" height="315" /></a><p class="wp-caption-text">The old UI, saved here for posterity.</p></div>
<p>Oh and by the way, this is totally untested on Windows. I will be absolutely delighted to hear that this doesn&#8217;t work on IE 6, 7 or even 8. If it&#8217;s indeed broken, I have absolutely no plan of fixing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/time-for-a-face-lift..html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox upgrade Broke Your Extensions?</title>
		<link>http://www.raditha.com/blog/archives/firefox-upgrade-broke-your-extensions.html</link>
		<comments>http://www.raditha.com/blog/archives/firefox-upgrade-broke-your-extensions.html#comments</comments>
		<pubDate>Fri, 07 May 2010 13:27:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/firefox-upgrade-broke-your-extensions.html</guid>
		<description><![CDATA[Did you just upgrade Firefox only to find that your favorite extension is not compatible with the new version? That&#8217;s usually easy enough to fix. Your beloved extension might in fact be compatible with the new version because Firefox unlike that other browser is mostly backward compatible.  So why doesn&#8217;t the extension work? Probably because the developer [...]]]></description>
			<content:encoded><![CDATA[<p>Did you just upgrade Firefox only to find that your favorite extension is not compatible with the new version? That&#8217;s usually easy enough to fix. Your beloved extension might in fact be compatible with the new version because Firefox unlike that other browser is mostly backward compatible.  So why doesn&#8217;t the extension work? Probably because the developer of the extension thought a 3.5 is a better number than 3.6. I kid you not each extension has an RDF file that describes it, two of the fields are the minimum and maximum version numbers that the extension is compatible with. All you need to do is to edit the maximum version number to 3.6.* and there is a very good chance that the extension will be loaded.</p>
<p>For example the Amazon <a href="http://code.google.com/p/sdbtool/">SimpleDB extension</a> resides in a folder named ﻿~/.mozilla/firefox/2f1ex7k8.default/extensions/sdbizo@bizo.com/ and the relevent section of the install.rdf file looks</p>
<pre>     &lt;em:targetApplication&gt;
        &lt;Description&gt;
          &lt;em:id&gt;{ec8030f7-c20a-464f-9b0e-13a3a9e97384}&lt;/em:id&gt;
          &lt;em:minVersion&gt;1.5&lt;/em:minVersion&gt;
          &lt;em:maxVersion&gt;3.5.*&lt;/em:maxVersion&gt;
        &lt;/Description&gt;
     &lt;/em:targetApplication&gt;</pre>
<div>All you need to do is to change maxVersion tag&#8217;s content to 3.6.* and the SimpleDB extension will happily load up once you restart firefox. This wouldn&#8217;t work all the time but it works often enough.</div>
<div></div>
<div>Note: by the time you are reading this they might have released a 3.6 compatible version anyway (probably by just editing the install.rdf file)</div>
<pre><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: small;"><span style="line-height: 19px; white-space: normal;">
</span></span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/firefox-upgrade-broke-your-extensions.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ExtJS , YUI and jQuery</title>
		<link>http://www.raditha.com/blog/archives/extjs-yui-and-jquery.html</link>
		<comments>http://www.raditha.com/blog/archives/extjs-yui-and-jquery.html#comments</comments>
		<pubDate>Mon, 03 May 2010 12:12:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[etc]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/extjs-yui-and-jquery.html</guid>
		<description><![CDATA[I needed to build a data grid, and even though I am a big fan of jQuery, I thought of using YUI instead. It&#8217;s just a matter of keeping up with the Joneses (I wasn&#8217;t familiar with YUI at the time this was started). A data grid has many names, the geeks at Yahoo! call [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to build a data grid, and even though I am a big fan of <a href="http://jqueryui.com/">jQuery</a>, I thought of using <a href="http://developer.yahoo.com/yui/">YUI</a> instead. It&#8217;s just a matter of keeping up with the Joneses (I wasn&#8217;t familiar with YUI at the time this was started). A data grid has many names, the geeks at Yahoo! call it a  DataTable. Call it by any name but what I am talking about is an HTML table that can be sorted on the client side and the columns can be reordered by drag and drop. It should also be possible to hide and display columns as well and preferably edit cells too. That&#8217;s asking a lot but that&#8217;s what a JTable in an applet can do (but it does take a lot of code). And now, there are several JavaScript libraries that can provide this functionality and coding with them is a lot easier than using a JTable.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img title="Table Sorter" src="/blog/images/tablesorter.png" alt="The jQuery Table Sorter at work." width="450" height="99" /><p class="wp-caption-text">Grid created using the jQuery tablesorter plugin</p></div>
<p>All in all, it took me a full day to figure this out. I know it&#8217;s more cool to say I did it in half and hour but the truth is that I couldn&#8217;t. Well I could have done so if I had used jQuery and one of it&#8217;s plugins. It probably wouldn&#8217;t have taken me even 5 minutes in fact because I&#8217;m quire familiar with jQuery as well as it&#8217;s <a href="http://tablesorter.com/">TableSorter</a> plugin. Much of the time taken by this task was spent in reading the documentation and the rest, hitting the reload button on firefox and chrome.</p>
<div class="wp-caption aligncenter" style="width: 437px"><img title="YUI DataTable" src="/blog/images/yui.png" alt="A table created with the YUI DataTable" width="427" height="157" /><p class="wp-caption-text">A YUI DataTable.</p></div>
<p>The day spent was worth it because the UI of the YUI DataTable looks pretty good and there are many more configuration options than available with jQuery plugins. But it&#8217;s not going to beat <a href="http://www.extjs.com/">ExtJS</a>. While I was laboring with the YUI datatable, I tweeted about it and <a href="http://geek.farook.org/">Fahim Farook</a> suggested that I look at ExtJS instead and I did, <em>en passant</em>. After a half hour diversion, I had a working  data grid in Exts (there you are I am a cool geek). It looked much better than what even YUI produced. But there is a catch, the ExtJS library is more than 2MB in size.</p>
<div class="wp-caption aligncenter" style="width: 454px"><img title="Ext Js.png" src="/blog/images/ExtJs.png" alt="ExtJS grid with bells and whistles" width="444" height="186" /><p class="wp-caption-text">ExtJS Data Grid</p></div>
<p>A 2MB library for a web page that usually has less than 50kb of content would rule out ExtJS for most situations. However, you can &#8216;trim the fat&#8217; and create a customized version of ExtJS. It would contain the bare minimum code needed to support the set of function that you are trying to make use of. However,the customized library I downloaded was still over 200Kb in size and both Firefox  and Chrome immediately started complaining about undefined objects. An indication that the library file is incomplete.</p>
<p>So to cut a long story short the next time i need a data grid, what would I use? It depends. If the software being designed is an Air app, I would definitely insist on ExtJS. If download time and or development time really mattered it would be jQuery, else it would be YUI.</p>
<p>related: <a href="http://www.raditha.com/blog/archives/jquery-tablesorter-and-xsl-transformation.html">jQuery TableSorter and XSL Transformation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/extjs-yui-and-jquery.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ImportError: No module named MySQLdb</title>
		<link>http://www.raditha.com/blog/archives/importerror-no-module-named-mysqldb.html</link>
		<comments>http://www.raditha.com/blog/archives/importerror-no-module-named-mysqldb.html#comments</comments>
		<pubDate>Wed, 28 Apr 2010 11:15:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/importerror-no-module-named-mysqldb.html</guid>
		<description><![CDATA[When you see that title,  you are gonna say; &#8216;you need to install the MySQLdb module&#8217;. Well, let me assure you that it&#8217;s already it&#8217;s already there. Provided by MySQL-python-1.2.3-0.4.c1.fc12.x86_64.rpm . On the other hand if you are here because you ran into the same problem and want a solution, but don&#8217;t want to [...]]]></description>
			<content:encoded><![CDATA[<p>When you see that title,  you are gonna say; &#8216;you need to install the MySQLdb module&#8217;. Well, let me assure you that it&#8217;s already it&#8217;s already there. Provided by MySQL-python-1.2.3-0.4.c1.fc12.x86_64.rpm . On the other hand if you are here because you ran into the same problem and want a solution, but don&#8217;t want to listen to my ramble, just scroll down to the bottom to see how it&#8217;s solved.</p>
<p>All this started when I decided to write a small script to analyze the content of a database using python rather than my usual first choice PHP. But I haven&#8217;t really coded anything at all with Python since I learned it nearly two years ago. So I thought, why not use Python, well the time I spent researching the cause of this problem could have been utilized to write the darned thing in PHP, Perl or Java or heck even C.</p>
<p>The last time, I did anything with Python, I ran the scripts either from the command line or using mod_python. I can&#8217;t remember the editor or IDE I was using at the time but I pretty sure it wasn&#8217;t <a href="http://netbeans.org">Netbeans</a>. The problem pops up only when you try to run the script from inside Netbeans itself. The very same script can be executed from the shell using the python interpreter (see, what did I tell you about mysqldb being installed?)</p>
<p>Searching for I<em>mport Error: No module named MySQLdb netbeans</em> came up with a blank. Digging a bit deeper, I realized that Netbeans using the jython intepreter rather than the default python 2.6 interpreter that&#8217;s available on Fedora. That in turn enabled me to dig up a post on <a href="http://stackoverflow.com/questions/2275072/installing-mysqldb-for-django-jython">Stackoverflow</a> which explained that MySQLdb cannot be used with <a href="http://www.jython.org/">jython</a>. You need to use something called zxJDBC instead. Damned if I am going to bother with that. Instead <strong>I just changed the python platform and solved it easily</strong>.</p>
<p>To change the platform, Right Click on the projects root node (the project name in the &#8216;projects tab&#8217;), when the dialog pops up select the &#8216;python&#8217; item from the tree on the left and then change the platform.</p>
<div class="wp-caption aligncenter" style="width: 410px"><a href="/blog/images/python/nb1.gif"><img title="Change Python Platform" src="/blog/images/python/nb1-t.gif" alt="Changing the Python Platform" width="400" height="270" /></a><p class="wp-caption-text">Changing the Python Platform (click to enlarge)</p></div>
<p>If by some chance, the installed python interpreter does not show up here, click the manage button and on the new dialog, choose the &#8216;auto-detect&#8217; button. If today isn&#8217;t your lucky day, netbeans will refuse to find your default python interpreter. But that&#8217;s ok, just run to the command line do a `which python` and then use the path to the interpreter as reported by which to add a &#8216;New&#8217; platform.</p>
<div class="wp-caption aligncenter" style="width: 410px"><a href="/blog/images/python/nb1.gif"><img title="Change Python Platform" src="/blog/images/python/nb2-t.gif" alt="Adding a new python platform" width="400" /></a><p class="wp-caption-text">Adding a new python platform (click to enlarge)</p></div>
<p>Hopefully you might find my older post <a href="http://www.raditha.com/blog/archives/1759.html">ImportError: No module named dom.minidom</a> also to be usefull</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/importerror-no-module-named-mysqldb.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cloud Hosting : Making sense of the pricing</title>
		<link>http://www.raditha.com/blog/archives/cloud-hosting-making-sense-of-the-pricing.html</link>
		<comments>http://www.raditha.com/blog/archives/cloud-hosting-making-sense-of-the-pricing.html#comments</comments>
		<pubDate>Sat, 17 Apr 2010 11:07:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[etc]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/cloud-hosting-making-sense-of-the-pricing.html</guid>
		<description><![CDATA[With many companies entering the cloud hosting market, competition is hotting up. So much so that the most recognizable name in the game, Amazon EC2 has had to reduce their prices several times and recently introduced a cut rate spot pricing model. Competition specially for the entry level packages (if you could call it that) [...]]]></description>
			<content:encoded><![CDATA[<p>With many companies entering the cloud hosting market, competition is hotting up. So much so that the most recognizable name in the game, Amazon EC2 has had to reduce their prices several times and recently introduced a cut rate spot pricing model. Competition specially for the entry level packages (if you could call it that) is really tough. But comparing these services is also a tough task because of the differences in virtual server architectures and pricing models amongst the vendors. Let&#8217;s compare what the &#8216;entry level package&#8217; for different vendors looks like.</p>
<div style="text-align: center;">
<table style="height: 130px;" border="1" width="588">
<thead>
<tr>
<th>Vendor</th>
<th>CPU</th>
<th>RAM</th>
<th>Storage</th>
<th>Charges</th>
<th>Outgoing<br />
bandwidth</th>
<th>Incoming<br />
bandwidth</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="http://www.rackspacecloud.com/">Rackspace</a></td>
<td>0.4 GHz</td>
<td>256MB</td>
<td>10GB</td>
<td>$ 0.015</td>
<td>$ 0.22/GB</td>
<td>$ 0.08/GB</td>
</tr>
<tr>
<td><a href="http://aws.amazon.com/ec2/">Amazon</a></td>
<td>1.6 Ghz</td>
<td>1.6GB</td>
<td>160GB</td>
<td>$0.085</td>
<td>$ 0.17/GB</td>
<td>Free / $ 0.10/GB</td>
</tr>
<tr>
<td><a href="http://www.gogrid.com">Go Grid</a></td>
<td>0.25 MHz</td>
<td>512MB</td>
<td>30GB</td>
<td>$0.090</td>
<td>$0.50/GB</td>
<td>FREE</td>
</tr>
<tr>
<td><a href="http://www.opsourcecloud.net">Opsource</a></td>
<td>??</td>
<td>1GB</td>
<td>10GB</td>
<td>$ 0.068</td>
<td>$0.15 per GB</td>
<td>FREE</td>
</tr>
</tbody>
</table>
</div>
<p>Notes: With amazon ec2, data transfer in is free till 30th June 2010.</p>
<p>Amazon and go grid provide  detailed specifications about the CPU power that you get.</p>
<p style="padding-left: 30px;">&#8216;One EC2 Compute Unit (ECU) provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor.&#8217; (Amazon)</p>
<p style="padding-left: 30px;">&#8216;GoGrid is built upon a Grid of servers (nodes), managed by a hardware virtualization layer (Xen-based hypervisor) which allows several guest operating systems (virtual servers) to be executed on the same computer hardware at the same time. Our nodes are custom built multi-processor, Intel-based computers. In order for GoGrid to guarantee a minimum CPU to a virtual server, we will always maintain a ratio of 1 Xeon core (equivalent to a P4 2.0 chip) to 4 GB of RAM across our entire grid.&#8217; (Go Grid)</p>
<p>Rackspace is less clear about their CPU speeds, the speed in the chart above is derived from the information given in their FAQ. Opsource have not mentioned the speed of their CPU at all. The prices are calculated assuming $0.04/CPU + 0.025/GB RAM + 0.003 for 10GB storage</p>
<p>As you can see, it&#8217;s pretty hard to compare these prices. It&#8217;s much more difficult than comparing apples and oranges. Just to make the waters a little murkier, all these vendors have pre-paid packages which allow you to obtain significant discounts by agreeing to purchase a certain number of CPU hours per month. If you want to run windows, you need to pay extra.</p>
<p>One fact that does stand out:  Rackspace has the lowest charges but their CPU is only 1/4 the power of the Amazon version. So if you were to multiply the rackspace price by 4, you would get a figure of USD 0.06 per hour for 1.6GHz/1.0GHz/40GB . Amazons price for a 1.6GHz/1.6GB/160GB is 0.085 you decide whether the extra 2 cents for 600MB of memory is worth the extra 2.5 cents.</p>
<p>We will revisit this topic later to compare the pre paid plans made available by the different vendors and also take a look at cloud storage.</p>
<p>References:</p>
<p style="padding-left: 30px;">Cloud Servers Pricing by Rackspace Cloud Computing &amp; Hosting [Online]. Available from : <a href="http://www.rackspacecloud.com/cloud_hosting_products/servers/pricing">http://www.rackspacecloud.com/cloud_hosting_products/servers/pricing</a> [Accessed : 17, April, 2010].</p>
<p style="padding-left: 30px;">Amazon.com, 2010. Amazon Elastic Compute Cloud (Amazon EC2) [Online]. Available from : <a href="http://aws.amazon.com/ec2/#pricing">http://aws.amazon.com/ec2/#pricing</a> [Accessed : 17, April, 2010].</p>
<p style="padding-left: 30px;">GoGrid Cloud Hosting : Frequently Asked Questions [Online]. Available from : <a href="http://www.gogrid.com/support/faqs.php">http://www.gogrid.com/support/faqs.php</a> [Accessed : 17, April, 2010]</p>
<p style="padding-left: 30px;">OpSource Cloud &#8211; Pricing information [Online]. Available from : <a href="http://www.opsourcecloud.net/getstarted/pricing/">http://www.opsourcecloud.net/getstarted/pricing/</a> [Accessed : 17, April, 2010].</p>
<p style="padding-left: 30px;">
<p>References were generated with <a href="http://deadlinedue.com">deadlinedue</a>, a free service by Rad Inks that&#8217;s hosted on an amazon EC2 instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/cloud-hosting-making-sense-of-the-pricing.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter over capacity and SimpleDB Errors</title>
		<link>http://www.raditha.com/blog/archives/twitter-over-capacity-and-simpledb-errors.html</link>
		<comments>http://www.raditha.com/blog/archives/twitter-over-capacity-and-simpledb-errors.html#comments</comments>
		<pubDate>Mon, 05 Apr 2010 15:40:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/twitter-over-capacity-and-simpledb-errors.html</guid>
		<description><![CDATA[As I write this, &#8216;Twitter is over capacity&#8217;. The fail whale as it&#8217;s popularly known is flying with the help of  a few tweety birds. In between reloads the broken robot (or is that an  alien) with the &#8216;Something is technically wrong&#8217; message also pops up. By quite a coincidence, simpleDB, Amazon&#8217;s cloud hosted [...]]]></description>
			<content:encoded><![CDATA[<p>As I write this, &#8216;Twitter is over capacity&#8217;. The fail whale as it&#8217;s popularly known is flying with the help of  a few tweety birds. In between reloads the broken robot (or is that an  alien) with the &#8216;Something is technically wrong&#8217; message also pops up. By quite a coincidence, <a href="https://aws.amazon.com/simpledb/">simpleDB</a>, Amazon&#8217;s cloud hosted nosql solution is throwing up intermittent errors.  There was a running task on one of our server that was attempting to movie about 11 million records from a Mysql database into SimpleDB, every 50,000 records or so <a href="http://webmasterinresidence.ca/simpledb/">the underlying API</a> produced the following error:</p>
<p style="padding-left: 30px;">PHP Warning:  SimpleDB::batchPutAttributes(): ServiceUnavailable: Service AmazonSimpleDB is currently unavailable. Please try again later<br />
in /var/www/****/SimpleDB/sdb.php on line 1021<br />
Items FAILED<br />
ErrorCode: ServiceUnavailable</p>
<p>However at about the time that twitter went offline, we noticed almost every other insert producing an error. When that happens we have coded our script to sleep a few seconds and retry the insert. The second attempt was completed successfully almost everytime. I went to tweet about it to find that twitter has gone offline.</p>
<p>AFAIK, twitter has not publicly stated what their database platform is. They might do so at chirp so for the moment I am going to hazard a guess that they are using SimpleDB to store some of their data. All their static content is served out of <a href="https://aws.amazon.com/s3/">Amazon S3</a> so this is not a wild guess (I hope). I am now going to leap to the conclusion that the two errors are related and make a fool of myself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/twitter-over-capacity-and-simpledb-errors.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exit Firefox enter Chrome</title>
		<link>http://www.raditha.com/blog/archives/exit-firefox-enter-chrome.html</link>
		<comments>http://www.raditha.com/blog/archives/exit-firefox-enter-chrome.html#comments</comments>
		<pubDate>Sat, 03 Apr 2010 06:27:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[etc]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/exit-firefox-enter-chrome.html</guid>
		<description><![CDATA[Finally Firefox was sent into retirement and I have started composing my first post with Google&#8217;s Chrome Browser. I just hope the retirement of firefox will not be like the retirement of a Pakistani cricketer. My reasons for giving up on Firefox include.

Annyoing memory leaks. Of course they will say &#8216;there are no memory leaks&#8217;, [...]]]></description>
			<content:encoded><![CDATA[<p>Finally Firefox was sent into retirement and I have started composing my first post with Google&#8217;s Chrome Browser. I just hope the retirement of firefox will not be like the retirement of a Pakistani cricketer. My reasons for giving up on Firefox include.</p>
<ul>
<li><strong>Annyoing memory leaks. </strong>Of course they will say &#8216;there are no memory leaks&#8217;, but if you leave FF running for a day or two, you find that it&#8217;s using around 2GB of memory. The longer you keep if running and the more tabs that you have open the worse it gets. Not only does this slow down firefox itself, but it slows down the whole computer as well.</li>
<li><strong>High CPU Usage </strong>I don&#8217;t know what causes it but there are times when FF drinks up 80% or even more of available CPU capacity to do nothing. There is no reason for a browser to need more than 5% of a Core 2 duo processor&#8217;s capacity to process a web page and that too will be a spike that disappears after the page has been rendered. But what really happens is that processor usage never goes down. As with the high memory usage, this slows down the whole computer and also increases power consumption while reducing the lifetime of the processor.</li>
<li><strong>GTK-Gnash </strong>I hate to knock open source software but gtk-gnash is just awful</li>
</ul>
<p style='margin-top:1em'>Firefox might still come out of retirement if I cannot figure out how to set a master password for saved passwords. Surely google doesn&#8217;t expect me to store my passwords where anyone can see them? I also need to find replacement for all the firefox extension that i&#8217;ve been using.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/exit-firefox-enter-chrome.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>A dead macbook.</title>
		<link>http://www.raditha.com/blog/archives/a-dead-macbook..html</link>
		<comments>http://www.raditha.com/blog/archives/a-dead-macbook..html#comments</comments>
		<pubDate>Thu, 01 Apr 2010 13:22:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Macbook]]></category>
		<category><![CDATA[toast]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/a-dead-macbook..html</guid>
		<description><![CDATA[My Macbook never get&#8217;s shut down or restarted, it keeps running for months on end without any hiccups, but the other day it died. It started with the battery getting drained. I just closed the cover, turned it over and put in the spare battery.  When you do that the Macbook automatically hibernates, you need [...]]]></description>
			<content:encoded><![CDATA[<p>My Macbook never get&#8217;s shut down or restarted, it keeps running for months on end without any hiccups, but the other day it died. It started with the battery getting drained. I just closed the cover, turned it over and put in the spare battery.  When you do that the Macbook automatically hibernates, you need to press the power button to wake it up. But it wouldn&#8217;t.</p>
<p style="text-align: center;"><a title="macbook motherboard" href="/blog/images/mac/motherboard.jpg"><img class="aligncenter" style="margin-top: 20px;" src="/blog/images/mac/motherboard-t.jpg" border="0" alt="Macbook motherboard" /></a></p>
<p>I plugged in the power cable and tried again with the same result. Next I let the battery charge some more and tried again. The last attempt was with a borrowed battery but the machine still refused to wake up. Time to take off the screws, there are many screws, including a few loose ones belonging to Jobs. I removed the top panel, unplugged the ribbon cable connecting the top panel to the mother board, put it back in and tried again. Guess what? nothing happens. Then I unplugged the machine again and shorted the pins for the power button connector with the tip of a ball point pen. Viola the machine started up! I shut it down again by connecting the mouse (there is no other way), connected the cable and tried again. Nothing happens. Thought to remove the cable and spray some contact cleaner, but the cable came apart.</p>
<p style="text-align: center;"><a title="macbook motherboard" href="/blog/images/mac/ribbon.jpg"><img style="text-align: center; margin: 20px;" src="/blog/images/mac/ribbon-t.jpg" border="0" alt="Macbook motherboard" /></a></p>
<p>I looked around for a replacement cable but it&#8217;s not available. The local apple agents would happily sell me the top panel with the cable included and I would happily by from them if they had the darned thing in stock, which they don&#8217;t. Now I am waiting for them to get one down, let&#8217;s see how it goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/a-dead-macbook..html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compressed File Systems on Linux</title>
		<link>http://www.raditha.com/blog/archives/compressed-file-systems-on-linux.html</link>
		<comments>http://www.raditha.com/blog/archives/compressed-file-systems-on-linux.html#comments</comments>
		<pubDate>Tue, 23 Mar 2010 08:53:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[fuse]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/compressed-file-systems-on-linux.html</guid>
		<description><![CDATA[Perhaps the title should have been; &#8216;the lack of a suitable compressed file system on linux&#8217;. A compressed file system in this case refers to a setup where the files are saved on the disk in a predefined compressed format (such as gzip or bzip2). When you read from those files they will be automatically [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps the title should have been; &#8216;the lack of a suitable compressed file system on linux&#8217;. A compressed file system in this case refers to a setup where the files are saved on the disk in a predefined compressed format (such as gzip or bzip2). When you read from those files they will be automatically decompressed by the file system. Similarly when you attempt to create a  new file or modify an old file, it should be automatically compressed before saving. Such a file system is sure to be very slow for random access but for sequential access it wouldn&#8217;t matter so much. It might even be faster than an uncompressed file system because hard drives continues to be the real bottleneck in most computers today.</p>
<p>Linux gives you two options for creating file systems; at the kernel level or in the user space.  <a href="http://e2compr.sourceforge.net/">e2compr</a> is a kernel patch that supports compressing an ext2 file system while the user space tools are based on <a href="http://fuse.sourceforge.net/">fuse</a>. Using kernel space drivers could be messy if the file system chosen like e2compr is always playing catchup with the kernel version. The only compressed file systems supported in the mainstream kernel are <a href="http://sources.redhat.com/jffs2/">jffs2</a> and <a href="http://squashfs.sourceforge.net/">squashfs</a>.  The former is for flash drives and the latter is ready only. Though <a href="http://jfs.sourceforge.net/">JFS</a> is available for linux, it&#8217;s compression mode is not.  While both KDE&#8217;s Dolphin and Gnome&#8217;s Nautilus support mounting a gzipped tar archive of a zip file as a node in the file system in read/write mode, they are not suitable for web apps. So fuse seems  the way to go.</p>
<p>There are eight file systems listed on the <a href="http://sourceforge.net/apps/mediawiki/fuse/index.php?title=CompressedFileSystems">Fuse compressed file system page</a>. Four are read only, two are abandoned, two more are heading down that route. One is in it&#8217;s early development stage. The remainder was FuseCompress.</p>
<p>This one is real easy to install just do &#8216;yum install fusecompress&#8217; setup is even easier.</p>
<p style="padding-left: 30px;">
fusecompress  /mnt/compressed   /mnt/uncompressed</p>
<p>Copying over a set of 30,000 files (a mix of text and binary data) with a total weight of 85MB took 36 seconds. The same operation when repeated, completed in 20 seconds because of file system caching.  When the files were copied without compression the operation completed in 1 second, so much for my assumption that a compressed system would be faster.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/compressed-file-systems-on-linux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mysql Sphinx Storage Engine</title>
		<link>http://www.raditha.com/blog/archives/mysql-sphinx-storage-engine.html</link>
		<comments>http://www.raditha.com/blog/archives/mysql-sphinx-storage-engine.html#comments</comments>
		<pubDate>Sun, 14 Mar 2010 06:22:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[voice]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/mysql-sphinx-storage-engine.html</guid>
		<description><![CDATA[I have blogged about Sphinx in that past, but that was about CMU Sphinx, a Speech Recognition Engine, this Sphinx is different. This sphinx is a Search Engine. Pretty good one too. The Sphinx search daemon has a mysql compatible API, which means you can use your trusty old mysql console or query browser to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.raditha.com/blog/archives/360.html">I have blogged about Sphinx</a> in that past, but that was about CMU Sphinx, a Speech Recognition Engine, this Sphinx is different. This <a href="http://sphinxsearch.com/">sphinx is a Search Engin</a>e. Pretty good one too. The Sphinx search daemon has a <a href="http://mysql.com">mysql</a> compatible API, which means you can use your trusty old mysql console or query browser to do a search. You can even use the PHP mysql API if you wanted to, but there is no need to do that because PHP has support for the default Sphinx protocol. However if your preferred programming language didn&#8217;t include support for Sphinx you could still use the mysql compatible mode.</p>
<p>The sphinx index isn&#8217;t really a mySQL database, so you cannot join it to your other tables. That&#8217;s where the Sphinx storage engine comes into the picture. It allows you to create a table in your existing databases to represent the Sphinx index. That would allow you to actually use the sphinx data in a join or sub query. You might ask why goto all this trouble? Why not just use full text? Full text search has it&#8217;s limitations, most notable being how slow it is when you have large table. A full text search on a table with 8 million rows (which is about as much as we have on Pitupasa.com at the moment) will take 10-15 seconds to complete. Sphinx on the other hand returns the results in a fraction of a second.</p>
<p>At first glance, it seems that enabling the sphinx storage engine is kidstuff. Just download the sphinx and mysql source tarballs, copy a set of files from sphinx into the mysql source tree, do a BUILD/autorun.sh followed by ./configure &#8211;with-plugins=sphinx  (see full instructions at <a href="http://www.sphinxsearch.com/docs/current.html#sphinxse-mysql50">http://www.sphinxsearch.com/docs/current.html#sphinxse-mysql50</a> ). Except that it doesn&#8217;t work.</p>
<p style="padding-left: 30px;"><span style="color: #993300;">configure error: unknown plugin: sphinx</span></p>
<p>Yes, I know what I am doing. No there weren&#8217;t any typos. I am not the first one to run into it. The others who ran into this problem don&#8217;t seem to have found the solution either. Then I ran into another set of instructions at <a href="http://www.sphinxsearch.com/wiki/doku.php?id=sphinx_sphinxse_on_rhel">http://www.sphinxsearch.com/wiki/doku.php?id=sphinx_sphinxse_on_rhel</a> there the instruction is to use &#8216;-with-plugin&#8217; but shouldn&#8217;t that be &#8216;&#8211;with-plugins&#8217; ? since I have already tried &#8216;&#8211;with-plugins&#8217; I tried &#8216;&#8211;with-plugin&#8217; (note the s). I tried &#8216;&#8211;with-plugin&#8217; and the compiler didn&#8217;t complain about the missing sphinx plugin as above. But still the sources in the sphinx folder were not getting built. By the way, &#8216;configure &#8211;help&#8217; shows the correct parameter to be &#8211;with-plugins. But then none of these things will result in the sphinx storage engine being built.</p>
<p>The docs refer to a prepatched mysql source tarball, unfortunatley it appears to have been taken off line. There is a patch for mysql 5.0.x but I don&#8217;t want to use that because I want to be able to partition the table and indexes (a feature that is not available in mysql 5.0.x). Oh well looks like it&#8217;s time to look at <a href="http://www.mnogosearch.org/">mnogosearch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/mysql-sphinx-storage-engine.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Centos 5.4  , PHP 5.3 and Harvard Referencing.</title>
		<link>http://www.raditha.com/blog/archives/centos-5.4-php-5.3-and-harvard-referencing..html</link>
		<comments>http://www.raditha.com/blog/archives/centos-5.4-php-5.3-and-harvard-referencing..html#comments</comments>
		<pubDate>Mon, 01 Mar 2010 11:45:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Rad Inks]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[deadinedue]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/centos-5.4-php-5.3-and-harvard-referencing..html</guid>
		<description><![CDATA[A couple of days back, we did an update to Deadlinedue, the Harvard reference generator, the moment the database was updated and the new code was put in place, PHP started segfaulting. It was time to decide whether to roll back or press forward. I chose the latter and it resulted in the site been [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days back, we did an update to <a href="http://deadlinedue.com/">Deadlinedue</a>, the Harvard reference generator, the moment the database was updated and the new code was put in place, PHP started segfaulting. It was time to decide whether to roll back or press forward. I chose the latter and it resulted in the site been offline for <a href="http://deadlinedue.com/blog/more-accurate-citations.html">around an hour</a>.</p>
<p style="padding-left: 30px;">I<span style="color: #993300;">t is not possible to assign complex types to nodes in /var/www/deadline/ISBN.php on line 480, referer: http://deadlinedue.com/index.php?lookf<br />
or=http%3A%2F%2Fraditha.com&amp;find=find<br />
*** glibc detected *** /usr/sbin/httpd: double free or corruption (fasttop): 0&#215;81cdfc78 ***</span></p>
<p>PHP is pretty old now, it&#8217;s not something that you expect to segfault, so initially I thought the culprit would be APC &#8211; Advanced PHP Cache. These PHP accelerators or caches are known to crash every once in a while. That can be easily fixed by removing the accelerator. In this case we could afford to do so since we had upgraded the server very recently and optimized the code which resulted in a speed boost and reduced memory usage. I was barking up the wrong tree,  disabling APC didn&#8217;t do any good. So guess it&#8217;s time to upgrade PHP?</p>
<p>Now you might ask, shouldn&#8217;t we have used the same version of PHP in our development and production servers to ensure that this sort of thing didn&#8217;t happen? Right you are but who expects PHP of all things to crash like this. It&#8217;s really rediculous that deadlinedue is hosted in the cloud. So we could easily have made a snapshot of it and started another server in less than 5 minute. We could have tested with that guinea pig and then gone live, but no, I was too cocky.</p>
<p>This is <a href="http://centos.org/">Centos</a> 5.4 and there are no RPMs available for PHP 5.3.1, So it was time to compile from scratch. Which usually means you need to run ./configure about half a dozen times, fixing each of the missing dependencies it rep<span style="color: #000000;">o</span>rts until it completes without error. Fortunately there is plenty of bandwidth on <a href="http://aws.amazon.com/ec2/">Amazon EC2</a> and the servers are blazing fast. Most deps can be installed in less time than it takes to type out the yum install command.</p>
<p>After all this the problem still wasn&#8217;t solved, a lot of modules we needed like JSON , DOM and heck even Mysqli were not getting added!</p>
<p style="padding-left: 30px;"><span style="color: #993300;">PHP Warning:  PHP Startup: apc: Unable to initialize module\nModule compiled with module API=20050922\nPHP    compiled with module API=20090626\nThese optio<br />
ns need to match\n in Unknown on line 0<br />
PHP Warning:  PHP Startup: dbase: Unable to initialize module\nModule compiled with module API=20050922\nPHP    compiled with module API=20090626\nThese opt<br />
ions need to match\n in Unknown on line 0<br />
PHP Warning:  PHP Startup: dom: Unable to initialize module\nModule compiled with module API=20050922\nPHP    compiled with module API=20090626\nThese optio<br />
ns need to match\n in Unknown on line 0<br />
PHP Warning:  PHP Startup: json: Unable to initialize module\nModule compiled with module API=20050922\nPHP    compiled with module API=20090626\nThese opti<br />
ons need to match\n in Unknown on line 0</span></p>
<p>Given enough time, I can track down their causes and fix these errors, but time was exactly what I was not having on my hands. So tried looking around to find out if there are any RPMs available from third party repositories that would update PHP to version 5.3.1. Fortunately there was.  The repo is called <a href="http://www.webtatic.com/blog/2009/06/php-530-on-centos-5/">Web Tactic</a>. Update using the RPMs took just seconds and good news, no more segmentation faults. The bad news is that APC is no longer available.  I tried  I tried &#8216;yum install php-pecl-apc&#8217;  without success. Then tried &#8216;pecl install apc&#8217; and got the following error:</p>
<p style="padding-left: 30px;"><span style="color: #993300;">/tmp/pear/temp/APC/php_apc.c: In function &#8216;zif_apc_compile_file&#8217;:<br />
/tmp/pear/temp/APC/php_apc.c:881: warning: unused variable &#8216;eg_class_table&#8217;<br />
/tmp/pear/temp/APC/php_apc.c:881: warning: unused variable &#8216;eg_function_table&#8217;<br />
/tmp/pear/temp/APC/php_apc.c: At top level:<br />
/tmp/pear/temp/APC/php_apc.c:959: error: duplicate &#8217;static&#8217;<br />
make: *** [php_apc.lo] Error 1<br />
ERROR: `make&#8217; failed</span></p>
<p>Oh well, can live without APC for the moment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/centos-5.4-php-5.3-and-harvard-referencing..html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bug in Twitter list get members?</title>
		<link>http://www.raditha.com/blog/archives/bug-in-twitter-list-get-members.html</link>
		<comments>http://www.raditha.com/blog/archives/bug-in-twitter-list-get-members.html#comments</comments>
		<pubDate>Sun, 07 Feb 2010 01:32:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[etc]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/bug-in-twitter-list-get-members.html</guid>
		<description><![CDATA[If you add yourself to a list and then call the get list members method you might be surprised by the result.

One of the data items returned by the get list id method includes the number of members in your list. The get list members method returns 20 members at a time and you need [...]]]></description>
			<content:encoded><![CDATA[<p>If you add yourself to a list and then call the <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-GET-list-memberships">get list members</a> method you might be surprised by the result.</p>
<p style="text-align: center; margin-top: 25px; margin-bottom:25px"><img class="aligncenter" src="/blog/images/twitter/e4c5-lists.png" alt="Add user to a list" /></p>
<p>One of the data items returned by the <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-GET-list-id">get list id</a> method includes the number of members in your list. The <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-GET-list-memberships">get list members</a> method returns 20 members at a time and you need to call the it multiple times using different cursor locations to retrieve the complete membership. When you count them and compare against the number returned by the get list id method, you will find that they do not match. Your own account is not part of the dataset that is returned.</p>
<p style="text-align: center; margin-top: 25px; margin-bottom:25px"><img class="aligncenter" src="/blog/images/twitter/election-xml.png" alt="the XML from the twitter api call" /></p>
<p>By the time you are reading this post, the list might have changed. So I have saved a copy of the XML <a href="/blog/images/list-members.xml">here.</a> On the other hand when you access the list through twitter.com, you can see that I am included in my own list. In fact my screen name (e4c5) appears twice!</p>
<p style="text-align: center; margin-top:25px; margin-bottom:25px"><img class="aligncenter" src="/blog/images/twitter/election-2010.png" alt="the twitter list" /></p>
<p>The work around I suppose is to not rely on the members count returned by the get list id method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/bug-in-twitter-list-get-members.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora 11 on amazon ec2</title>
		<link>http://www.raditha.com/blog/archives/fedora-11-on-amazon-ec2.html</link>
		<comments>http://www.raditha.com/blog/archives/fedora-11-on-amazon-ec2.html#comments</comments>
		<pubDate>Mon, 01 Feb 2010 07:14:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/fedora-11-on-amazon-ec2.html</guid>
		<description><![CDATA[Amazon has been offering cloud hosting services for longer than most unfortuntely they don&#8217;t seem to have updated their Amazon Machine Images since they started operation. Well, it&#8217;s not exactly accurate, they have reasonably upto date images for some linux distributions and for windows. However many of the linux images are actually owned by third [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://aws.amazon.com/ec2/">Amazon</a> has been offering cloud hosting services for longer than most unfortuntely they don&#8217;t seem to have updated their Amazon Machine Images since they started operation. Well, it&#8217;s not exactly accurate, they have reasonably upto date images for some linux distributions and for windows. However many of the linux images are actually owned by third parties and not by amazon itself. As for my favourite distribution Fedora, what&#8217;s available is Fedora 8! After reading the discussion at <a href="http://developer.amazonwebservices.com/connect/message.jspa?messageID=141707">http://developer.amazonwebservices.com/connect/message.jspa?messageID=141707</a> I thought to try my hand at creating my own Fedora 11 or 12 AMI.</p>
<p>Unfortunately I didn&#8217;t meet with a lot of success the Fedora 11 AMI refused to boot but trouble started even before, first with yum reported numerous depsolving errors. I tried to sort them out by using the &#8211;skip-broken flag to no avail.</p>
<p style="padding-left: 30px;"><span style="color: #800000;"><br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #800000;">Total size: 252 M<br />
Is this ok [y/N]: y<br />
Downloading Packages:<br />
Running rpm_check_debug<br />
ERROR with rpm_check_debug vs depsolve:<br />
libcrypto.so.7 is needed by (installed) httpd-tools-2.2.14-1.fc10.i386<br />
libssl.so.7 is needed by (installed) httpd-tools-2.2.14-1.fc10.i386<br />
Complete!<br />
(1, [u'Please report this error in http://yum.baseurl.org/report'])</span></p>
<p>I worked around this by uninstalling the complaining RPM (yum remove httpd-tools-2.2.14-1.fc10.i386) and putting it back after the upgrade had completed. Nevertheless the machine reused to boot up. I tried to do this as a two step process, stopping at F10, booting up that image and then upgrading to F11. Unfortunately that didn&#8217;t quite work out either. The terminal displayed by the Amazon Management Console remains blank without anything ever showing up on it. Then I tried changing the RAM Disk and Kernel,  tried  using aki-20c12649 as the kernel and ari-21c12648 as the ramdisk with the same result.</p>
<p>In the end I gave up on this temporarily and used a third party Centos 5.4 image (uploaded by <a href="http://www.rightscale.com/">RightScale</a>) for the task at hand. Going to come back to this problem later. Want to try installing a new image on the loopback device.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/fedora-11-on-amazon-ec2.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Netbeans, Aptana and Debugging AIR Apps</title>
		<link>http://www.raditha.com/blog/archives/netbeans-aptana-and-debugging-air-apps.html</link>
		<comments>http://www.raditha.com/blog/archives/netbeans-aptana-and-debugging-air-apps.html#comments</comments>
		<pubDate>Sat, 26 Dec 2009 03:07:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[etc]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/netbeans-aptana-and-debugging-air-apps.html</guid>
		<description><![CDATA[It&#8217;s been a while since Aptana 2.0 came out. I ignored it till version 2.02 was out. As usually happens with most software, what worked in previous versions doesn&#8217;t work in the new version. Now if this had been with version 2.0, you could have just said someone forgot to do a regression test but [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since Aptana 2.0 came out. I ignored it till version 2.02 was out. As usually happens with most software, what worked in previous versions doesn&#8217;t work in the new version. Now if this had been with version 2.0, you could have just said someone forgot to do a regression test but not so with 2.02</p>
<p>So what doesn&#8217;t work? The Adobe AIR debugger. It gets stuck at &#8216;Launching New_Configuration&#8217; and this dialog pops up without the air app starting up.</p>
<p align="center"><img src="/blog/images/aptana-debug.png" alt="Aptana error dialog" /></p>
<p>Sounds like a socket error but this is running on localhost and all my ports are open to the local machine. As usual when I run into a problem there is nothing on google and there is nothing on the log file. At this stage I would gladly switch to Netbeans. I use for almost everything other than air. Unfortunatley I never figured out how to use the netbeans debugger with AIR. Couldn&#8217;t find any howto either.</p>
<p>Next I came across a reference to a third party debugger that you can use with any AIR app, regardless of the IDE that you use. It looks like a great project. Unfortunately the developers forget to create some documentation. There isn&#8217;t even a getting started guide.</p>
<p>I am on holiday so I am doing this on my Mac the only options available are to go back to version 1.5 or to wait till I get back home next week.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/netbeans-aptana-and-debugging-air-apps.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnash WTF?</title>
		<link>http://www.raditha.com/blog/archives/gnash-wtf.html</link>
		<comments>http://www.raditha.com/blog/archives/gnash-wtf.html#comments</comments>
		<pubDate>Sun, 13 Dec 2009 05:34:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[weird]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/gnash-wtf.html</guid>
		<description><![CDATA[My machine got really slowed down all of a sudden I suspected Netbeans and did a `ps -ef &#124; grep java` to find it&#8217;s pid and kill it. The output from ps floored me:
raditha  11263     1  1 Dec10 ?        01:00:02  /usr/java/1.6/bin/java [...]]]></description>
			<content:encoded><![CDATA[<p>My machine got really slowed down all of a sudden I suspected Netbeans and did a `ps -ef | grep java` to find it&#8217;s pid and kill it. The output from ps floored me:</p>
<div style="margin: 15px; overflow: auto; height: 200px;">raditha  11263     1  1 Dec10 ?        01:00:02  /usr/java/1.6/bin/java -Djdk.home=/usr/java/1.6 -classpath /usr/local/netbeans-6.8beta/platform11/lib/boot.jar:/usr/local/netbeans-6.8beta/platform11/lib/org-openide-modules.jar:/usr/local/netbeans-6.8beta/platform11/lib/org-openide-util.jar:/usr/local/netbeans-6.8beta/platform11/lib/locale/boot_ja.jar:/usr/local/netbeans-6.8beta/platform11/lib/locale/boot_pt_BR.jar:/usr/local/netbeans-6.8beta/platform11/lib/locale/boot_zh_CN.jar:/usr/local/netbeans-6.8beta/platform11/lib/locale/org-openide-modules_ja.jar:/usr/local/netbeans-6.8beta/platform11/lib/locale/org-openide-modules_pt_BR.jar:/usr/local/netbeans-6.8beta/platform11/lib/locale/org-openide-modules_zh_CN.jar:/usr/local/netbeans-6.8beta/platform11/lib/locale/org-openide-util_ja.jar:/usr/local/netbeans-6.8beta/platform11/lib/locale/org-openide-util_pt_BR.jar:/usr/local/netbeans-6.8beta/platform11/lib/locale/org-openide-util_zh_CN.jar:/usr/java/1.6/lib/dt.jar:/usr/java/1.6/lib/tools.jar -Dnetbeans.system_http_proxy=DIRECT -Dnetbeans.system_http_non_proxy_hosts= -Dnetbeans.dirs=/usr/local/netbeans-6.8beta/nb6.8:/usr/local/netbeans-6.8beta/bin/../ergonomics2:/usr/local/netbeans-6.8beta/ide12:/usr/local/netbeans-6.8beta/bin/../java3:/usr/local/netbeans-6.8beta/bin/../xml2:/usr/local/netbeans-6.8beta/bin/../apisupport1:/usr/local/netbeans-6.8beta/bin/../webcommon1:/usr/local/netbeans-6.8beta/websvccommon1:/usr/local/netbeans-6.8beta/bin/../enterprise6:/usr/local/netbeans-6.8beta/bin/../mobility8:/usr/local/netbeans-6.8beta/bin/../profiler3:/usr/local/netbeans-6.8beta/bin/../ruby2:/usr/local/netbeans-6.8beta/bin/../python1:/usr/local/netbeans-6.8beta/php1:/usr/local/netbeans-6.8beta/bin/../visualweb2:/usr/local/netbeans-6.8beta/bin/../soa2:/usr/local/netbeans-6.8beta/bin/../identity2:/usr/local/netbeans-6.8beta/bin/../uml6:/usr/local/netbeans-6.8beta/bin/../harness:/usr/local/netbeans-6.8beta/bin/../cnd3:/usr/local/netbeans-6.8beta/bin/../dlight2:/usr/local/netbeans-6.8beta/bin/../groovy2:/usr/local/netbeans-6.8beta/bin/../extra:/usr/local/netbeans-6.8beta/bin/../javafx2:/usr/local/netbeans-6.8beta/bin/../javacard1: -Dnetbeans.home=/usr/local/netbeans-6.8beta/platform11 -Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense -Xmx512m -Dorg.glassfish.v3ee6.installRoot=/usr/local/glassfish-v3-prelude -Dcom.sun.aas.installRoot=/usr/local/glassfish-v2.1 -client -Xverify:none -Xss2m -Xms32m -XX:PermSize=32m -XX:MaxPermSize=200m -Dnetbeans.logger.console=true -ea -Dapple.laf.useScreenMenuBar=true -Dsun.java2d.noddraw=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/raditha/.netbeans/6.8beta/var/log/heapdump.hprof org.netbeans.Main &#8211;userdir /home/raditha/.netbeans/6.8beta &#8211;branding nb<br />
raditha  11992 11899  0 Dec10 ?        00:13:52 /usr/bin/gtk-gnash -x 81788981 -j 250 -k 250 -u http://pagead2.googlesyndication.com/pagead/imgad?id=CM-h38ij_5DanwEQ-gEY-gEyCDEGjWlZTOVn -F 14 -U http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-1352004480420876&amp;output=html&amp;h=250&amp;slotname=3285550185&amp;w=250&amp;lmt=1258513226&amp;flash=9.0.999.%20Gnash%200.8.5%2C%20the%20GNU%20SWF%20Player.%20%20%20Copyright%20%26copy%3B%202006%2C%202007%2C%202008%20%3Ca%20href%3D%22http%3A%2F%2Fwww.fsf.org%22%3EFree%20Software%20%20%20Foundation%3C%2Fa%3E%2C%20Inc.%20%3Cbr%3E%20%20%20Gnash%20comes%20with%20NO%20WARRANTY%2C%20to%20the%20extent%20permitted%20by%20law.%20%20%20You%20may%20redistribute%20copies%20of%20Gnash%20under%20the%20terms%20of%20the%20%20%20%3Ca%20href%3D%22http%3A%2F%2Fwww.gnu.org%2Flicenses%2Fgpl.html%22%3EGNU%20General%20Public%20%20%20License%3C%2Fa%3E.%20For%20more%20information%20about%20Gnash%2C%20see%20%3Ca%20%20%20href%3D%22http%3A%2F%2Fwww.gnu.org%2Fsoftware%2Fgnash%2F%22%3E%20%20%20http%3A%2F%2Fwww.gnu.org%2Fsoftware%2Fgnash%3C%2Fa%3E.%20%20%20Compatible%20Shockwave%20Flash%209.0%20r999.&amp;url=http%3A%2F%2Fwww.bitrebels.com%2Fgeek%2Flost-inside-google-wave-5-waves-to-make-your-life-easier%2F&amp;dt=1258513238576&amp;correlator=1258513238578&amp;frm=0&amp;ga_vid=1321434809.1258513230&amp;ga_sid=1258513230&amp;ga_hid=1759684983&amp;ga_fc=1&amp;u_tz=300&amp;u_his=1&amp;u_java=1&amp;u_h=900&amp;u_w=1600&amp;u_ah=875&amp;u_aw=1600&amp;u_cd=24&amp;u_nplug=13&amp;u_nmime=351&amp;biw=1577&amp;bih=660&amp;ref=http%3A%2F%2Ftwitter.com%2F&amp;fu=0&amp;ifi=1&amp;dtd=223&amp;xpc=bzbonGxyqd&amp;p=http%3A//www.bitrebels.com -P allowscriptaccess=never -P flashvars=clickTAG=http://googleads.g.doubleclick.net/aclk%3Fsa%3Dl%26ai%3DB2KrK6uggS7eLJYq5jQfFwJTwDteKyowBsZ7IzgrAjbcBkE4QARgBIJD0zAo4AFDj0NFTYJEBoAHl-dr5A7IBEXd3dy5iaXRyZWJlbHMuY29tugEKMjUweDI1MF9hc8gBBNoBV2h0dHA6Ly93d3cuYml0cmViZWxzLmNvbS9nZWVrL2xvc3QtaW5zaWRlLWdvb2dsZS13YXZlLTUtd2F2ZXMtdG8tbWFrZS15b3VyLWxpZmUtZWFzaWVyL7gCGKgDAfUDAAAAhA%26num%3D1%26sig%3DAGiWqtyRVOXsNj9Q7HH3OPiRTjJRuSTKVg%26client%3Dca-pub-1352004480420876%26adurl%3Dhttp://uc.gamestotal.com/o_in_strategy.cfm%253Fref%253Dadworda_strategy_flash250uc2 -P height=250 -P id=google_flash_embed -P pluginspage=http://www.macromedia.com/go/getflashplayer -P src=http://pagead2.googlesyndication.com/pagead/imgad?id=CM-h38ij_5DanwEQ-gEY-gEyCDEGjWlZTOVn -P type=application/x-shockwave-flash -P width=250 -P wmode=opaque -</div>
<p>You think I have a large list of java apps running? look closely, it&#8217;s just two! One is <a href="http://www.nebeans.org">Netbeans</a>. Netbeans is a Sun project, so you have to expect it to behave weirdly but look at the second one. It&#8217;s Gnash; the open source replacement for the Adobe Flash player. That line is just massive. Looks like <a href="http://www.gnu.org/software/gnash/">Gnash</a> is adding all the HTTP variables into the environment. No hang on a second, Firefox is sending all the HTTP variables to Gnash through the command line. What the hell? is this how browser plugins are supposed to work? Surely this is not secure?</p>
<p>If you URL decode the out put of ps it&#8217;s double WTF.</p>
<div style="margin: 15px; overflow: auto; height: 200px;">raditha  11992 11899  0 Dec10 ?        00:13:52 /usr/bin/gtk-gnash -x 81788981 -j 250 -k 250 -u http://pagead2.googlesyndication.com/pagead/imgad?id=CM-h38ij_5DanwEQ-gEY-gEyCDEGjWlZTOVn -F 14 -U http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-1352004480420876&amp;output=html&amp;h=250&amp;slotname=3285550185&amp;w=250&amp;lmt=1258513226&amp;flash=9.0.999. Gnash 0.8.5, the GNU SWF Player.   Copyright © 2006, 2007, 2008 <a href="http://www.fsf.org">Free Software   Foundation</a>, Inc.<br />
Gnash comes with NO WARRANTY, to the extent permitted by law.   You may redistribute copies of Gnash under the terms of the   <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public   License</a>. For more information about Gnash, see <a href="http://www.gnu.org/software/gnash/"> http://www.gnu.org/software/gnash</a>.   Compatible Shockwave Flash 9.0 r999.&amp;url=http://www.bitrebels.com/geek/lost-inside-google-wave-5-waves-to-make-your-life-easier/&amp;dt=1258513238576&amp;correlator=1258513238578&amp;frm=0&amp;ga_vid=1321434809.1258513230&amp;ga_sid=1258513230&amp;ga_hid=1759684983&amp;ga_fc=1&amp;u_tz=300&amp;u_his=1&amp;u_java=1&amp;u_h=900&amp;u_w=1600&amp;u_ah=875&amp;u_aw=1600&amp;u_cd=24&amp;u_nplug=13&amp;u_nmime=351&amp;biw=1577&amp;bih=660&amp;ref=http://twitter.com/&amp;fu=0&amp;ifi=1&amp;dtd=223&amp;xpc=bzbonGxyqd&amp;p=http://www.bitrebels.com -P allowscriptaccess=never -P flashvars=clickTAG=http://googleads.g.doubleclick.net/aclk?sa=l&amp;ai=B2KrK6uggS7eLJYq5jQfFwJTwDteKyowBsZ7IzgrAjbcBkE4QARgBIJD0zAo4AFDj0NFTYJEBoAHl-dr5A7IBEXd3dy5iaXRyZWJlbHMuY29tugEKMjUweDI1MF9hc8gBBNoBV2h0dHA6Ly93d3cuYml0cmViZWxzLmNvbS9nZWVrL2xvc3QtaW5zaWRlLWdvb2dsZS13YXZlLTUtd2F2ZXMtdG8tbWFrZS15b3VyLWxpZmUtZWFzaWVyL7gCGKgDAfUDAAAAhA&amp;num=1&amp;sig=AGiWqtyRVOXsNj9Q7HH3OPiRTjJRuSTKVg&amp;client=ca-pub-1352004480420876&amp;adurl=http://uc.gamestotal.com/o_in_strategy.cfm%3Fref%3Dadworda_strategy_flash250uc2 -P height=250 -P id=google_flash_embed -P pluginspage=http://www.macromedia.com/go/getflashplayer -P src=http://pagead2.googlesyndication.com/pagead/imgad?id=CM-h38ij_5DanwEQ-gEY-gEyCDEGjWlZTOVn -P type=application/x-shockwave-flash -P width=250 -P wmode=opaque -</div>
<p>Even a copyright notice is passed as a parameter!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/gnash-wtf.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Twitter Search API inconsistency</title>
		<link>http://www.raditha.com/blog/archives/twitter-search-api-inconsistency.html</link>
		<comments>http://www.raditha.com/blog/archives/twitter-search-api-inconsistency.html#comments</comments>
		<pubDate>Sun, 29 Nov 2009 13:43:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[etc]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/twitter-search-api-inconsistency.html</guid>
		<description><![CDATA[In recent weeks, it seems like I spent most of my time finding bugs in the twitter API or third party libraries. Maybe I should get a job in their testing team. This latest bug was discovered in the twitter search API. The from_user and the from_user_id fields do not quite match. Here are some [...]]]></description>
			<content:encoded><![CDATA[<p>In recent weeks, it seems like I spent most of my time finding bugs in the <a href="http://apiwiki.twitter.com">twitter API</a> or third party libraries. Maybe I should get a job in their testing team. This latest bug was discovered in the twitter search API. The <em>from_user</em> and the <em>from_user_id</em> fields do not quite match. Here are some examples:</p>
<p style="padding-left: 30px;"><span style="color: #993300;">{&#8220;profile_image_url&#8221;:&#8221;http://a1.twimg.com/profile_images/311054570/SecuritySystemPlaza.comLogo_normal.jpg&#8221;,&#8221;created_at&#8221;:&#8221;Sun, 29 Nov 2009 12:39:51 +0000&#8243;,&#8221;from_user&#8221;:&#8221;SecurityPlaza&#8221;,&#8221;to_user_id&#8221;:null,&#8221;text&#8221;:&#8221;GE SECURITY &#8211; USA TX6010011 ONLY<br />
$78.66 AT WWW.SECURITYSYSTEMPLAZA.COM&#8221;,&#8221;id&#8221;:6168853273,&#8221;from_user_id&#8221;:28463195,&#8221;geo&#8221;:null,&#8221;iso_language_code&#8221;:&#8221;en&#8221;,&#8221;source&#8221;:&#8221;&amp;lt;a href=&amp;quot;http://apiwiki.<br />
twitter.com/&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;API&amp;lt;/a&amp;gt;&#8221;}</span></p>
<p>Here the from_user field is given as SecurityPlaza and the from_user_id field shows a value of 28463195, if you look at http://twitter.com/users/28463195.xml you will see that the user id of 28463195 corresponds to <a href="http://twitter.com/ballercoolkid">@ballercoolkid</a> on the other hand http://twitter.com/users/show.xml?screen_name=SecurityPlaza  gives a user id of 56297110 to &lt;a href=&#8221;http://twitter.com/SecurityPlaza&#8221;&gt;@SecurityPlaza&lt;/a&gt;.  So which one of these users sent out the tweet? it was @SecurityPlaza</p>
<p>Here is the second example:</p>
<p style="padding-left: 30px;"><span style="color: #993300;">{&#8220;profile_image_url&#8221;:&#8221;http://a1.twimg.com/profile_images/364463510/logo_normal.jpg&#8221;,&#8221;created_at&#8221;:&#8221;Sun, 29 Nov 2009 09:32:56 +0000&#8243;,&#8221;from_user&#8221;:&#8221;hindichannels&#8221;,&#8221;to_user_id&#8221;:null,&#8221;text&#8221;:&#8221;Sacked opposition party member to spearhead campaign against Genera<br />
l Fonseka: Nov 29, Colombo: A member of the main&#8230; http://bit.ly/8OBKwS&#8221;,&#8221;id&#8221;:6166287234,&#8221;from_user_id&#8221;:32271894,&#8221;geo&#8221;:null,&#8221;iso_language_code&#8221;:&#8221;en&#8221;,&#8221;source<br />
&#8220;:&#8221;&amp;lt;a href=&amp;quot;http://twitterfeed.com&amp;quot; rel=&amp;quot;nofollow&amp;quot;&amp;gt;twitterfeed&amp;lt;/a&amp;gt;&#8221;}</span></p>
<p>Here the user hindichannels has been associated with the userId of 32271894 where as that ID really belongs to <a href="http://twitter.com/mrsdraz">@mrsdraz</a> the correct id for <a href="http://twitter.com/hindichannels">@hindichannels</a> is 61683443 interestingly the results are easily reproducable. Two different searches produced the same errornous output (&#8216;<a href="http://search.twitter.com/search.json?q=colombo&amp;rpp=100&amp;show_user=true&amp;page=1">fonseka</a>&#8216; and &#8216;<a href="http://search.twitter.com/search.json?q=colombo&amp;rpp=100&amp;show_user=true&amp;page=1">colombo</a>&#8216;)</p>
<p>I tried these searches between 6:00-7:00pm on Nov 29th by the time that you try these web API calls on your own, the search results would have changed dramatically. So <a href="raditha.com/blog/images/twit-json-samples.tar.gz">here is a cached copy</a> for you. By the way, the search results may have contained other inaccuracies but these are the only ones that I noticed thanks to some safety checks we have in the <a href="http://pitupasa.com/">Pitupasa</a> code base.</p>
<p>The XML search results does not have this problem due to the simple fact that the user ids are not included in it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/twitter-search-api-inconsistency.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solving a Twitter OAuth and Incorrect Signatures Mystery</title>
		<link>http://www.raditha.com/blog/archives/solving-a-twitter-oauth-and-incorrect-signatures-mystery.html</link>
		<comments>http://www.raditha.com/blog/archives/solving-a-twitter-oauth-and-incorrect-signatures-mystery.html#comments</comments>
		<pubDate>Wed, 25 Nov 2009 10:28:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/solving-a-twitter-oauth-and-incorrect-signatures-mystery.html</guid>
		<description><![CDATA[If you see a Twitter or Facebook app that asks for your username and password you should run a mile. Admittedly OAuth is not anymore secure than CHAP authentication but there is a crucial difference; most people use the same username/password (or at least the same password ) on multiple websites, email addresses, memory cards [...]]]></description>
			<content:encoded><![CDATA[<p>If you see a <a href="http://twitter.com/">Twitter</a> or Facebook app that asks for your username and password you should run a mile. Admittedly <a href="http://oauth.net/">OAuth</a> is not anymore secure than CHAP authentication but there is a crucial difference; most people use the same username/password (or at least the same password ) on multiple websites, email addresses, memory cards and what have you. By necessity when a web app saves your password for Twitter or Facebook or any other site, it has to be encrypted with a symmetric key, which means the plain text version can be easily obtained.</p>
<p>Users don&#8217;t need any special effort for Oauth but developers do. Writing an application that uses OAuth instead of passwords is supposed to take just a wee bit more effort, (but all seasoned programmers know what exactly that means).</p>
<p>One of the issues we ran into was caused by Twitter returning an &#8216;Incorrect signature&#8217; error for List Delete member api calls. The signature was being generated using the <a href="http://github.com/abraham/twitteroauth">TwitterOauthLib</a>. The signature was correct. It worked fine for all other methods excepts for DELETE calls. If you passed in the same parameters to a different Oauth library, you would get the exact same signature so are we seeing a bug in the twitter API?  You might also suspect that this is because the underlying HTTP client library didn&#8217;t support the DELETE HTTP method. In this case it&#8217;s curl and the DELETE method is supported. Nevertheless I tried using an HTTP POST while sending the _method=DELETE parameter as suggested by the <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-DELETE-list-members">Twitter API documentation</a> with out any luck.</p>
<p>On further investigation I found that all the parameters were being posted for both DELETE and POST requests. <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html">RFC 2616</a> doesn&#8217;t specify how you should pass parameters (request body or query string) for DELETE requests. I decided to change the TwitterOauth code to include the parameters as query strings (get the <a href="http://www.raditha.com/blog/images/oauth-patch.txt">patch</a>). Sure enough twitter accepted the request without the incorrect signature error.  The modified code now looks like this:</p>
<div style="margin: 20px; overflow: auto; height: 200px;">
<pre>  function http($url, $method, $postfields = NULL) {

    $ci = curl_init();

    /* Curl settings */

    curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this-&gt;connecttimeout);

    curl_setopt($ci, CURLOPT_TIMEOUT, $this-&gt;timeout);

    curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);

    curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:'));

    curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this-&gt;ssl_verifypeer);

    switch ($method) {

      case 'POST':

        curl_setopt($ci, CURLOPT_URL, $url);

        curl_setopt($ci, CURLOPT_POST, TRUE);

        if (isset($postfields)) {

          curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);

        }

        break;

      case 'DELETE':

        curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');

        if (isset($postfields)) {

            curl_setopt($ci, CURLOPT_URL, "{$url}?{$postfields}");

        }

        else

        {

            curl_setopt($ci, CURLOPT_URL, $url);

        }

        break;

      default:

            curl_setopt($ci, CURLOPT_URL, $url);

            break;

    }

    $response = curl_exec($ci);

    $this-&gt;http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);

    $this-&gt;last_api_call = $url;

    curl_close ($ci);

    //if ($this-&gt;format === 'json' &amp;&amp; $this-&gt;decode_json) {

    //  return json_decode($response);

    //}

    return $response;

  }</pre>
</div>
<p>Also had to do a modification to the oAuthRequest method, which was automatically appending the twitterId to the url it&#8217;s not required (and in fact leads to an incorrect link for list methods). That means if you have been using an unpatched TwitterOauth library and have been passing in the twitterId as a parameter, you will have to change that.</p>
<p>Oh and btw, <a href="http://twitter.com/e4c5">follow me on twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/solving-a-twitter-oauth-and-incorrect-signatures-mystery.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fedora 12 Post Install Cleanup.</title>
		<link>http://www.raditha.com/blog/archives/fedora-12-post-install-cleanup..html</link>
		<comments>http://www.raditha.com/blog/archives/fedora-12-post-install-cleanup..html#comments</comments>
		<pubDate>Sat, 21 Nov 2009 08:24:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[lame]]></category>

		<guid isPermaLink="false">http://www.raditha.com/blog/archives/fedora-12-post-install-cleanup..html</guid>
		<description><![CDATA[Upgrading Fedora is easy. It&#8217;s the post upgrade clean up that kills you. As already mentioned, the move from version 11 to 12, left behind 581 packages from F11. These should ideally be removed to avoid unexpected segfaults, system crashes and inconsistent behavior. It shouldn&#8217;t happen but it does happen, if you don&#8217;t cleanup now, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Upgrading Fedora is easy. It&#8217;s the post upgrade clean up that kills you. As already mentioned, <a href="http://www.raditha.com/blog/archives/fedora-12-rant.html">the move from version 11 to 12,</a> left behind 581 packages from F11. These should ideally be removed to avoid unexpected segfaults, system crashes and inconsistent behavior. It shouldn&#8217;t happen but it does happen, if you don&#8217;t cleanup now, later you will have a hard time figuring out some programs will not start up or package updates cannot be applied.  `package-cleanup &#8211;cleandupes` is a good starting point. This command will remove the older version from the system when there are two versions of the same package. Well that&#8217;s what it&#8217;s supp<span style="color: #000000;">osed to do, but it choked:</span></p>
<p style="text-align: left; padding-left: 30px;"><span style="color: #ff0000;">service fuse does not support chkconfig<br />
error: %preun(fuse-2.7.4-3.fc11.x86_64) scriptlet failed, exit status 1</span></p>
<p style="text-align: left; padding-left: 30px;">
<p style="text-align: left;"><span style="color: #ff0000;"><span style="color: #000000;">Trying to manually remove the fuse package with yum gets you nowhere fast:</span></span></p>
<p style="text-align: left; padding-left: 30px;"><span style="color: #ff0000;">Running Transaction<br />
service fuse does not support chkconfig<br />
Error in PREUN scriptlet in rpm package fuse<br />
fuse-2.7.4-3.fc11.x86_64 was supposed to be removed but is not!</span></p>
<p style="text-align: left;">
<p style="text-align: left;"><span style="color: #ff0000;"><span style="color: #000000;">Using `rpm -e` produces the exact same error as package-cleanup (which is because package-cleanup was merely passing through the error message it received from rpm). Fortunately the &#8211;noscripts paramter to rpm can be used to force the uninstall.</span></span></p>
<p style="text-align: left; padding-left: 30px;">rpm -e &#8211;noscripts fuse-2.7.4-3.fc11.x86_64 fuse-2.8.1-1.fc11.x86_64</p>
<p style="text-align: left;">After the rpm command was executed in this manner, package-cleanup also would run to completion with out any errors. But it has a funny idea about what completion is; there are still 433  .fc11 rpms lying about. Most of these packages are from third party repos such as RPM fusion. A yum update ought to fix it and indeed the applying 684MB of updates resulted in all but 68 of the fedora 11 rpms disappearing from the system. Some of these are old kernels/kernels headers which can be removed with `package-cleanup &#8211;oldkernels` that still leaves around 60 rpms that you might have to manually uninstall and re install. You might also right the following simple command to remove them all en mass:</p>
<p style="text-align: left; padding-left: 30px;">yum remove `rpm -qa | grep fc11`</p>
<p style="text-align: left;">The only catch is that it might remove some other important packages but putting those back in might be easier than removing 60 rpms one at a time. BTW why are these rpms tagged as FC11 or FC12, with FC standing for Fedora Core when the OS itself is no longer called Fedora Core? That name hasn&#8217;t been used for ages. Now it&#8217;s just Fedora</p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;"><span style="color: #ff0000;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raditha.com/blog/archives/fedora-12-post-install-cleanup..html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)

Served from: www.raditha.com @ 2010-09-03 07:22:01 -->