<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>Coherent    Blah&apos;s</title>
        <link>http://samya.indiangeek.com/new/blog/</link>
        <description></description>
        <language>en</language>
        <copyright>Copyright 2008</copyright>
        <lastBuildDate>Mon, 10 Nov 2008 00:56:12 -0800</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>ffmpeg recipe: Convert to WMV</title>
            <description><![CDATA[Converting Video/Audio on Linux is a breeze, and there is no shortage of tools. Especially between <a href="http://ffmpeg.mplayerhq.hu/">ffmpeg</a> and <a href="http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html">mencoder</a>, I can't think of any conversion that's not possible.<br />However, the problem is finding the right parameters suited for a specific task. There are multiple "wrapper" tools (e.g. <a href="http://fixounet.free.fr/avidemux/">Avidemux</a>, <a href="http://handbrake.fr/">HandBrake</a>) that make life a lot easier. However, sometimes, knowing the actual conversion parameters help.<br /><br />I was trying to convert some videos so that they play on Windows without need for any extra codecs etc. WMV format is the way to go for this. The following ffmpeg recipe seems to be working fine:<br /><i><br />ffmpeg -i &lt;input_file_name&gt;&nbsp; -s &lt;output_resolution&gt; -b &lt;video_bitrate&gt; -vcodec wmv2 -acodec wmav2 -ar 44100 -ab &lt;audio_bitrate&gt; -ac 1 -y &lt;output.wmv&gt;</i><br /><br />Example:<br /><i>ffmpeg -i output.avi&nbsp; -s 180x120 -b 300k -vcodec wmv2 -acodec wmav2 -ar 44100 -ab 48000 -ac 1 -y movie.wmv</i><br /> ]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/11/ffmpeg-recipe-convert-to-wmv.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/11/ffmpeg-recipe-convert-to-wmv.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Linux</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Tips n Tricks</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">ffmpeg</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">video conversion</category>
            
            <pubDate>Mon, 10 Nov 2008 00:56:12 -0800</pubDate>
        </item>
        
        <item>
            <title>Using python to search google</title>
            <description><![CDATA[<p>&nbsp; Recently I was playing with couple of link scraping libraries, and was impressed by the simplicity of the <a href="http://wwwsearch.sourceforge.net/mechanize/">mechanize</a> toolkit. The only problem they have is lack of documentation.<br />&nbsp; Following is an example script written in python that can do a google search and scrape the result links (of class ‘l’) in a few lines of code.<br /><br /></p><blockquote><i>import re</i><br /><i>import sys</i><br /><i>from mechanize import Browser,DefaultFactory</i><br /><i>import mechanize;</i><br /><br /><i>br = mechanize.Browser( factory=DefaultFactory(i<em>want</em>broken<em>xhtml</em>support=True))</i><br /><i>br.addheaders = [ (“User-agent”, “Mozilla/5.0 (compatible)”) ]</i><br /><i>br.set<em>handle</em>robots(False)</i><br /><br /><i>br.open(‘http://www.google.com/search?q=’+sys.argv[1])</i><br /><br /><i>def arr<em>to</em>named(arr):</i><br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ret = {};</i><br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for x in arr:</i><br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ret[x[0]] = x[1];</i><br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ret;</i><br /><i># follow second link with element text matching regular expression</i><br /><i>for link in br.links():</i><br /><i>&nbsp;&nbsp;&nbsp; hash = arr<em>to</em>named(link.attrs);</i><br /><i>&nbsp;&nbsp;&nbsp; if hash.has_key(‘class’):</i><br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (hash[‘class’] == ‘l’):</i><br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print link.url+’[‘+link.text+’]’</i><br /><br /></blockquote><p><br />A sample output for the script is:</p><blockquote><i>$ python goog.py samya</i><br /><i>http://www.thinkbabynames.com/meaning/0/Samya[Samya - meaning of Samya name]</i><br /><i>http://www.samyatech.com/[SAMYA Technology : Green Power Expert! 祥業科技股份有限公司: 綠色 ...]</i><br /><i>http://www.yawiktionary.com/s/1148371572412.html[samya - definition of samya - yawiktionary.com]</i><br /><i>http://samya.indiangeek.com/[[ IndianGeek ] Welcome to Samya's HomePage]</i><br /><i>http://www.hossamramzy.com/stars/starsofegypt_samya.htm[The Stars of Egypt ® | Hossam Ramzy]</i><br /><i>http://www.belly-dance.org/samia-gamal.html[Samya Gamaal - the queen of raqs sharki]</i><br /><i>http://www.samya.ca/[Samya Therapies Splash Page]</i><br /><i>http://samya-photography.deviantart.com/[Samya-Photography on deviantART]</i><br /><i>http://www.facebook.com/people/Samya_Badraoui/1434855400[Samya Badraoui | Facebook]</i><br /><i>http://www.healthgrades.com/directory_search/physician/profiles/dr-md-reports/Dr-Samya-Nasr-MD-EB461FD0.cfm[Dr. Samya Z. Nasr, MD, Pediatric Pulmonology, Pediatrics, located ...]</i><br /></blockquote><p><br /></p><code></code>]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/11/using-python-to-search-google.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/11/using-python-to-search-google.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Tips n Tricks</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">google</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">mechanize</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">python</category>
            
            <pubDate>Sun, 02 Nov 2008 14:30:06 -0800</pubDate>
        </item>
        
        <item>
            <title>Writing বাংলা (Bengali) in Linux</title>
            <description><![CDATA[On my impending trip to India, I'm planning to move my family from using Windows to Linux. I have Kubuntu Intrepid Ibex in mind as the distro.<br />The primary applications for my parents are Email (Thunderbird) &amp; Web browsing (Firefox), both of them work like charm on Linux.<br />However, my father being a writer, he needs an editor that allows him to write in bengali, a regional language. Now, there is of course the keyboard layouts available for writing in bengali, and generate unicode output, it's not that useful as it doesn't support phonetic input. So, the writer will have to remember the keyboard layout.<br />Then I found Bhasha, a Java stand-alone application that allows writing in bengali phonetically, and produces unicode output. Problem solved.<br />Here is a screenshot.<br /><br /> 
<a href="http://picasaweb.google.com/lh/photo/2l0IpnWn7OWeiX4sIG7JnA?authkey=N4cdrJVYeOc"><img src="http://lh5.ggpht.com/_xpEoNhjOtrY/SQ1DA6Y8ZoI/AAAAAAAABV4/Yfpxi74FAsw/s800/Bhasha.jpg" /></a>]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/11/writing-bengali-in-linux.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/11/writing-bengali-in-linux.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Tips n Tricks</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">bengali</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">linux</category>
            
            <pubDate>Sat, 01 Nov 2008 16:54:16 -0800</pubDate>
        </item>
        
        <item>
            <title>Another amazing Video on TedTalk... this one about brain.</title>
            <description><![CDATA[This video is about how our brain works... well, some parts of it. This is by an Indian, and it's simply amazing. 

<!--cut and paste--><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="432" height="285" id="VE_Player" align="middle"><param name="movie" value="http://static.videoegg.com/ted/flash/loader.swf"><PARAM NAME="FlashVars" VALUE="bgColor=FFFFFF&file=http://static.videoegg.com/ted/movies/VILAYANURRAMACHANDRAN-2007-2_high.flv&autoPlay=false&fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&forcePlay=false&logo=&allowFullscreen=true"><param name="quality" value="high"><param name="allowScriptAccess" value="always"><param name="bgcolor" value="#FFFFFF"><param name="scale" value="noscale"><param name="wmode" value="window"><embed src="http://static.videoegg.com/ted/flash/loader.swf" FlashVars="bgColor=FFFFFF&file=http://static.videoegg.com/ted/movies/VILAYANURRAMACHANDRAN-2007-2_high.flv&autoPlay=false&fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&forcePlay=false&logo=&allowFullscreen=true" quality="high" allowScriptAccess="always" bgcolor="#FFFFFF" scale="noscale" wmode="window" width="432" height="285" name="VE_Player" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>


<br /><a href="http://www.ted.com/index.php/talks/vilayanur_ramachandran_on_your_mind.html">Link to Talk</a>]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/09/another-amazing-video-on-tedta.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/09/another-amazing-video-on-tedta.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">brain</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">tedtalk</category>
            
            <pubDate>Mon, 29 Sep 2008 12:31:01 -0800</pubDate>
        </item>
        
        <item>
            <title>Location based reminders?</title>
            <description><![CDATA[&nbsp; With pretty much all smart phones these days coming with a GPS and Location based services, a cool thing will be to have adaptive Event Reminders based on location. When we add an event to a calendar, normally we specify a time before the event when the reminder will fire. It's not really useful if you are mobile. For example, I have a meeting at my office, and I have set a reminder at 5 minutes before the meeting. However, I went to a Starbucks to grab a latte, and the starbucks is, say, 10 mins from my office. A 5 minute reminder is not going to do me any good, right (unless I have a <a href="http://blog.wired.com/cars/2008/09/fusionmans-jet.html">jetpack</a>). <br />&nbsp; However, the phone I have reminder in knows exactly where I am, and has the ability to calculate the distance and time to reach my office (assuming the event location is also geotagged). So, it should add that time to the reminder and fire it based on that. This will be a cool addition for the Android/I-Phone.<br />]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/09/location-based-reminders.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/09/location-based-reminders.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Idea!!</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">gps</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">idea</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">location based reminder</category>
            
            <pubDate>Mon, 29 Sep 2008 11:05:43 -0800</pubDate>
        </item>
        
        <item>
            <title>DNA to ... uhm... cellphone?</title>
            <description><![CDATA[This talk was simply amazing.<br /><br /> 
<!--cut and paste--><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="432" height="285" id="VE_Player" align="middle"><param name="movie" value="http://static.videoegg.com/ted2/flash/loader.swf"><PARAM NAME="FlashVars" VALUE="bgColor=FFFFFF&file=http://static.videoegg.com/ted/movies/PaulRothemund_2008-embed-[None]_high.flv&autoPlay=false&fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&forcePlay=false&logo=&allowFullscreen=true"><param name="quality" value="high"><param name="allowScriptAccess" value="always"><param name="bgcolor" value="#FFFFFF"><param name="scale" value="noscale"><param name="wmode" value="window"><embed src="http://static.videoegg.com/ted2/flash/loader.swf" FlashVars="bgColor=FFFFFF&file=http://static.videoegg.com/ted/movies/PaulRothemund_2008-embed-[None]_high.flv&autoPlay=false&fullscreenURL=http://static.videoegg.com/ted/flash/fullscreen.html&forcePlay=false&logo=&allowFullscreen=true" quality="high" allowScriptAccess="always" bgcolor="#FFFFFF" scale="noscale" wmode="window" width="432" height="285" name="VE_Player" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/09/dna-to-uhm-cellphone.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/09/dna-to-uhm-cellphone.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">tedtalk</category>
            
            <pubDate>Tue, 16 Sep 2008 18:34:29 -0800</pubDate>
        </item>
        
        <item>
            <title>Firefox high cpu usage and flashblock</title>
            <description><![CDATA[I've been noticing Firefox using up a lot of CPU lately. At any given time, I normally have about 3 to 4 firefox windows with about 5-6 tabs in each open. But with no activity in them, there should not be much CPU usage. On a hunch, I installed <a href="http://flashblock.mozdev.org/">flashblock</a>, a firefox plugin to disable showing flash apps automatically. Instead, it shows a blank rectangle, with a play button in the middle to start the flash app. Installing this made a dramatic effect, and soon I realized this is due to the n number of flash advertisements in different websites. I probably had about 10-15 flash apps playing at the same time, none of them really useful to me. Would highly recomment this add-on.&nbsp; ]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/08/firefox-high-cpu-usage-and-fla.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/08/firefox-high-cpu-usage-and-fla.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Tips n Tricks</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">firefox</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">flashblock</category>
            
            <pubDate>Mon, 25 Aug 2008 00:37:20 -0800</pubDate>
        </item>
        
        <item>
            <title>Searching source directories</title>
            <description><![CDATA[&nbsp; As part of my job, I work with a huge source tree structure. In last count, the tree has more than twenty five thousand directories and subdirectories. To get from one part to another in the tree, I use a set of aliases and bash functions. One of them is the following "goto" function.<br />&nbsp; The idea here is, there are a set of source directories that I normally go to, or work under directly. Then there are some directories that are more then one level deeper but are under these same source directories. Then there is the rest of the tree where I need to go from time to time.<br />&nbsp;&nbsp; So when I run "goto xyzd", I want it to run the search in three phases:<br />1. Check if xyzd is there as the first level subdirectory under any of the common directories I work on. This should be the most common scenario.<br />2. If not found, do a "find" based search on the specific commonly used source directories only.<br />3. If pass 2 also fails, do a complete search from root of the tree.<br />4. In any of the passes, if a directory is found, cd to it.<br /><br />This works out well for me. There are enhancements that can be done (like, if more than one name is found, giving options), but so far I didn't find any need for it.<br /><br />The script looks like the following. You will need to change the DEV_ROOT and SDIRS variables to match your tree. <br /><br /><blockquote>function goto() {\<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Searching for $1 ...";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEV_ROOT="root/dir/for/tree"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SDIRS="src/xxxx/usr.bin:src/xxxx/usr.sbin:src/xxxx/yyyy/common:src/xxxx/sbin";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Pass 1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for i in&nbsp; `echo $SDIRS|sed 's/:/ /g'` ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ -d $DEV_ROOT/$i/$1 ];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd $DEV_ROOT/$i/$1;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; done;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Couldn't find $1 in first pass... Trying second pass...";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Pass 2<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for i in&nbsp; `echo $SDIRS|sed 's/:/ /g'` ;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Searching in $DEV_ROOT/$i..."<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DIRPATH=`find $DEV_ROOT/$i -type d -name $1`<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ "$DIRPATH" != '' ];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $DIRPATH<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd $DIRPATH<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; done;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Couldn't find $1 in second pass... Trying full search ...";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Pass 3<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DIRPATH=`find $DEV_ROOT/src -type d -name $1`<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if [ "$DIRPATH" != '' ];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cd $DIRPATH<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "Failed to find directory $1."<br />}<br /></blockquote><br />]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/06/searching-source-directories.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/06/searching-source-directories.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Tips n Tricks</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">bash</category>
            
            <pubDate>Thu, 12 Jun 2008 14:53:04 -0800</pubDate>
        </item>
        
        <item>
            <title>Quickposting to Movable Type blog</title>
            <description><![CDATA[&nbsp;&nbsp; One of the applications that I find lacking in Linux is a full featured blogging client. There are a few like BloGTK, blokkal etc. but they are far from being fully featured. There are some plug-in based variants, like Scribus, but I'm not much of a fan of it. The online native posting is still more fully featured than any of these.<br />&nbsp;&nbsp; Here comes an easy trick for quickly posting to your blog from within firefox (or any other browser), without leaving the current page. You can create a bookmark in firefox with the following link (remember to change your blog's mt.cgi path)<br />http://&lt;path to mt.cgi&gt;?__mode=view&amp;qp=1&amp;_type=entry&amp;blog_id=1<br /><br />&nbsp; In the "Properties" for the bookmark, remember to select "Load this bookmark in the sidebar" checkbox. Now, if you remain logged in to the blog, you can just start blogging by clicking on this bookmar. Here is how it looks in Firefox while I'm writing this post.<br /><span class="mt-enclosure mt-enclosure-image"><img alt="mt_Quickpost.jpg" src="http://samya.indiangeek.com/new/blog/2008/06/02/mt_Quickpost.jpg" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="488" width="460" /></span><br /><br /><div><br /></div>]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/06/quickposting-to-movable-type-b.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/06/quickposting-to-movable-type-b.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Tips n Tricks</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">blog</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">movable type</category>
            
            <pubDate>Mon, 02 Jun 2008 11:25:49 -0800</pubDate>
        </item>
        
        <item>
            <title>The Netflix Player by Roku, and why I don&apos;t want it!!</title>
            <description><![CDATA[&nbsp;&nbsp; <a href="http://www.netflix.com/">Netflix</a> now has a set-top box named "<a href="http://www.roku.com/netflixplayer/">Netflix Player</a>" with the coveted "Watch Now" in collaboration with Roku. The idea is good, the price, at 99$, is right, but the problem is, the home entertainment real estate is very limited, and it's just not feasible to add one box for each specialized application. Let's look at it. A normal home theater setup will have a DVD/B-Ray player, a Cable/Sat settop-box, a Game console, an Audio receiver and possibly a DVR like Tivo.That's four to five boxes already. Who wants to add another box to the mix, especially if it looks so ugly:<br /><br />
<div align="center"><img src="http://www.roku.com/netflixplayer/wp-content/uploads/2008/05/home_content_box.jpg" /><br /><div align="left">&nbsp; The best thing for Netflix would be to get in collaboration with one or more of the set top boxes/game consoles. I'd love if they provide a "Watch Now" client for XBOX 360, and use it more often.<br /><br />&nbsp; There is, however, a flip side to Roku's player. This player runs a variant of Linux. However, the "Watch Now" feature of Netflix is completely unavailable for&nbsp;  Linux based PCs. I wonder how long before someone will reverse engineer Roku to write a client for Linux. Especially, because of GPL, it'd be perfectly legal to ask Roku to give out the source code for its player. I'd love to see that happen too.<br /><br /></div></div>]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/06/the-netflix-player-by-roku-and.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/06/the-netflix-player-by-roku-and.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">netflix</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">roku</category>
            
            <pubDate>Sun, 01 Jun 2008 09:38:18 -0800</pubDate>
        </item>
        
        <item>
            <title>Citicards.com problem with Firefox</title>
            <description><![CDATA[For some time now, the smarties at <a href="http://citicards.com/">citicards.com</a> have written some oh-so-cool javascript on their front page that stops it from loading well in Firefox or Konquerer , at least not without disabling Javascript. I can understand a mistake or two here and there, but the frontpage? That also for months? What are those folks thinking!! <br />Here is how it looks on Konquerer after loading.<br /><span class="mt-enclosure mt-enclosure-image"><img alt="Citicard_b.jpg" src="http://samya.indiangeek.com/new/blog/2008/05/29/Citicard_b.jpg" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="423" width="515" /></span><br /><br />There are two workarounds.<br />1. Disable Javascript while visiting citicards.com. Lame!!<br />2. Instead of citicards.com, use <a href="https://www.accountonline.com/">https://www.accountonline.com/</a>. It's the real site that's used behind citicards.com. If you login to citicards.com, you will get forwarded to https://www.accountonline.com/. By going to that site directly, you bypass the front page, and the great browser-independent Javascript.<br /><br />Also, call Citicards, and tell them you'll close your account if they don't fix it ASAP<br /><div><br /></div><div><br /></div><div><br /></div>]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/05/citicardscom-problem-with-fire.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/05/citicardscom-problem-with-fire.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Others</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">firefox</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">javascript</category>
            
            <pubDate>Thu, 29 May 2008 00:30:58 -0800</pubDate>
        </item>
        
        <item>
            <title>Blackle is _not_ Google</title>
            <description><![CDATA[Got this in mail:<br /><blockquote><font style="font-size: 1em;" color="#008000" size="5"><b>Lets Go Green…. Conserve
Energy</b></font><font style="font-size: 1em;" size="3"> </font><p><font style="font-size: 1em;" color="#008000" size="3">Google is the second Brain to many of us.
We use it frequently. It uses white screen which consumes high power.</font><font style="font-size: 1em;" size="3">
</font>
</p><p><font style="font-size: 1em;" color="#008000" size="3">Read the following.........</font><font style="font-size: 1em;" size="3">
</font><font style="font-size: 1em;" color="#008000" size="3"><br />
If Google had a black screen, taking in account the huge number of page
views, according to calculations, 750 mega watts/hour per year would be
saved..!!!!!! </font>
</p><p><font style="font-size: 1em;" color="#008000" size="3">In response, Google created a black version
of its search engine, called Blackle, with the exact same functions as
the white version, but obviously with lower energy consumption: </font>
</p><p><font style="font-size: 1em;" color="#008000" size="3">well done Google!!!!! </font>
</p><p><font style="font-size: 1em;" color="#008000" size="3">Help spread the word. Please use &nbsp;</font><font style="font-size: 1em;" size="3">
</font>
</p><font style="font-size: 1em;" color="blue" size="3"><u><a href="http://www.blackle.com/" target="_blank">www.blackle.com</a></u></font><br /></blockquote>
The first search results page raised my suspicion:<br /><span class="mt-enclosure mt-enclosure-image"><img alt="Blackle.jpg" src="http://samya.indiangeek.com/new/blog/2008/05/12/Blackle.jpg" class="mt-image-center" style="margin: 0pt auto 20px; text-align: center; display: block;" height="453" width="684" /></span>Now, Google displays its ads to the right of the page, not top, and does not call them "Ads by Google". Instead they are called "Sponsored Results".<br /><br />Next thing was checking the whois entry for the domain:<br /><br /><blockquote>Registrant:<br />Update: I made a mistake in the registrant... although it doesn't change the end result:<br />The real registrant of blackle is:<br />Registrant:<br />&nbsp;&nbsp; Heap Media<br />&nbsp;&nbsp; PO Box 4078<br />&nbsp;&nbsp; Castlecrag, New South Wales 2068<br />&nbsp;&nbsp; Australia<br /><br /><strike>Navigation Catalyst Systems, Inc<br />2141 Rosecrans Ave.<br />Suite 2020<br />El Segundo, CA 90245<br />Email: domainadmin@navigationcatalyst.com<br />Phone: 3106471592<br />Fax: 3106476001<br /><br />Domain Name: BLACKEL.COM<br /></strike></blockquote><br />Hmm, and where exactly is Google here? Seems like a Google rip-off!!<br /><br />BTW, having the screen black doesn't save you much power. For LCDs, most of the power is consumed by the backlight, which remains on no matter the pixel is black or white.<br /><div><br /></div>]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/05/blackle-is--not--google.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/05/blackle-is--not--google.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">blackle</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">google</category>
            
            <pubDate>Mon, 12 May 2008 11:14:44 -0800</pubDate>
        </item>
        
        <item>
            <title>Reading Anandabazar on Firefox/Linux</title>
            <description><![CDATA[&nbsp;&nbsp;&nbsp; One of my major gripes after moving to full-time Linux was, I can't read the Bengali newspaper <a href="http://www.anandabazar.com/">Anandabazar</a> online anymore. They, absolutely utterly moronically, use a proprietary font (I'm sure someone there paid for it), which does not offer ANY extra advantage over using Unicode Bengali!!<br />&nbsp;&nbsp;&nbsp;&nbsp; I started working on a python script that can translate those fonts to Unicode, and it was going well. But halfway through, I realized someone has already done this, and it is already available as a Mozilla extension. <br />&nbsp;&nbsp;&nbsp;&nbsp; The extension is named <a href="http://padma.mozdev.org/">padma</a>, and it's targeting different Indian languages. Works great on Firefox. The download page is <a href="http://padma.mozdev.org/installation.html">here</a>. You'll need to restart Firefox after installing the extension.<br />]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/04/reading-anandabazaar-on-firefo.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/04/reading-anandabazaar-on-firefo.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Linux</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Tips n Tricks</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">anandabazar</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">bengali</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">firefox</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">linux</category>
            
            <pubDate>Fri, 18 Apr 2008 12:00:19 -0800</pubDate>
        </item>
        
        <item>
            <title>Grocery list on Bluetooth phone</title>
            <description><![CDATA[&nbsp;&nbsp;&nbsp; Okay, confession time. However much I try to, I cannot remember the grocery list after I reach the store. The best I can do is, count the number of items before leaving home, remember that, and try to come up with as many items at the store to meet that number, and then call wifey to fill up the gaps. I blame NPR that I listen to on my way for this temporary amnesia. It's just more interesting than my grocery list.<br />&nbsp;&nbsp;&nbsp; So what's the big deal!! Write the list down, and take it with me? Unfortunately, pen and paper is not that handy, especially with a two year old running around trying his best to snatch away each and every pen he can.<br />    &nbsp;&nbsp;&nbsp; Okay, pen and paper is not the problem, the problem is, I needed an excuse to do something geeky about the grocery list. What I wanted to do is, quickly type up the list on a [shell|vim|editor] window, and quickly send the list to my cell phone over bluetooth. <br />    &nbsp;&nbsp;&nbsp; Now, there are many apps available for similar thing, but I find almost all of them too heavyweight for just this. Especially, if I have to fire up a GUI for this, it's too many mouse clicks to be simple enough.<br />    Then again, what are shells for (personally, I think, the coolest thing in a *nix environment is its shell and scripting prowess).<br /><br />    Here is what I did:<i><b><br /></b></i><ul><li>First, I need the necessary stuff installed for my Ubuntu Laptop. Just do: <br /></li></ul><blockquote>sudo apt-get install obexftp</blockquote><ul><li>Now, I need to find my phone. Run the following command:<br /></li></ul><blockquote>~$ obexftp -b<br /></blockquote>         and you should see output like:<br /><blockquote>Scanning ...<br />Using   00:18:xx:xx:xx:xx       W810i<br /></blockquote>        identify the line by name that is your phone.<br /><ul><li>Test out you can really send a file across. Create a file, say, grocery.txt, and send it to the phone by the following command:</li></ul><blockquote>~$ obexftp -b 00:18:xx:xx:xx:xx -p grocery.txt<br /></blockquote><br />        The interesting thing to note here is, different phones store the file in different locations, based on their make and configuration. For example, on my Sony Ericcson W810i, it stores on the memory stick under Webpages/Saved pages category.<br /><br />        Why is this important? Because, when you create a new grocery list, you should be able to replace (remove + add) the older list. For that, knowing the location is necessary.<br /><ul><li>Find the real location on the phone. The phone, on its interface, can show a different UI to access the file than the real directory structure that it exposes over bluetooth. Use the obexftp's -l command to browse the directory structure. For example, see the session below:</li></ul><blockquote><b><small>:~$ obexftp -b 00:18:xx:xx:xx:xx -l</small></b><br /><small>Browsing 00:18:xx:xx:xx:xx ...</small><br /><small>Channel: 7</small><br /><small>Connecting...done</small><br /><small>Receiving "(null)"... &amp;amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;amp;gt;</small><br /><small>&amp;amp;lt;!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd"&amp;amp;gt;</small><br /><small>&amp;amp;lt;!--</small><br /><small> XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB</small><br /><small>--&amp;amp;gt;</small><br /><small>&amp;amp;lt;folder-listing version="1.0"&amp;amp;gt;&amp;amp;lt;folder name="Phone memory"/&amp;amp;gt;</small><br /><small>&amp;amp;lt;<b>folder name="Memory Stick"</b>/&amp;amp;gt;</small><br /><small>&amp;amp;lt;/folder-listing&amp;amp;gt;</small><br /><small>done</small><br /><small>Disconnecting...done</small><br /><b><small>:~$ obexftp -b 00:18:xx:xx:xx:xx -l "Memory Stick"</small></b><br /><small>Browsing 00:18:xx:xx:xx:xx ...</small><br /><small>Channel: 7</small><br /><small>Connecting...done</small><br /><small>Receiving "Memory Stick"... &amp;amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;amp;gt;</small><br /><small>&amp;amp;lt;!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd"&amp;amp;gt;</small><br /><small>&amp;amp;lt;!--</small><br /><small> XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB</small><br /><small>--&amp;amp;gt;</small><br /><small>&amp;amp;lt;folder-listing version="1.0"&amp;amp;gt;&amp;amp;lt;parent-folder/&amp;amp;gt;</small><br /><small>&amp;amp;lt;file name="MEMSTICK.IND" size="0"/&amp;amp;gt;</small><br /><small>&amp;amp;lt;file name="MSTK_PRO.IND" size="0"/&amp;amp;gt;</small><br /><small>&amp;amp;lt;folder name="DCIM"/&amp;amp;gt;</small><br /><small>&amp;amp;lt;folder name="MP3"/&amp;amp;gt;</small><br /><b><small>&amp;amp;lt;folder name="MSSEMC"/&amp;amp;gt;</small></b><br /><small>&amp;amp;lt;/folder-listing&amp;amp;gt;</small><br /><small>done</small><br /><small>Disconnecting...done</small><br /><b><small><br />...<br /><br /></small></b><small></small><b><small>:~$ obexftp -b 00:18:xx:xx:xx:xx -l "Memory Stick/MSSEMC/Media files/webpage/saved_pages"</small></b><br /><small>Browsing 00:18:xx:xx:xx:xx ...</small><br /><small>Channel: 7</small><br /><small>Connecting...done</small><br /><small>Receiving "Memory Stick/MSSEMC/Media files/webpage/saved_pages"... Sending "Memory Stick"... Sending "MSSEMC"... Sending "Media files"... Sending "webpage"... done</small><br /><small>&amp;amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;amp;gt;</small><br /><small>&amp;amp;lt;!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd"&amp;amp;gt;</small><br /><small>&amp;amp;lt;!--</small><br /><small> XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB</small><br /><small>--&amp;amp;gt;</small><br /><small>&amp;amp;lt;folder-listing version="1.0"&amp;amp;gt;&amp;amp;lt;parent-folder/&amp;amp;gt;</small><br /><small>&amp;amp;lt;file name="todo.txt" size="0"/&amp;amp;gt;</small><br /><b><small>&amp;amp;lt;file name="grocery.txt" size="11"/&amp;amp;gt;</small></b><br /><small>&amp;amp;lt;/folder-listing&amp;amp;gt;</small><br /><small>done</small><br /><small>Disconnecting...done</small><br /></blockquote>        So, at this point of time, I know that my grocery.txt has been sent to the directory "Memory Stick/MSSEMC/Media files/webpage/saved_pages"<br /><br /><ul><li>Now, your script should be like the following. Running it would fire up a vi to enter the list. Replace that line with whatever your favorite editor is (Kate??). Also, remember to replace the PHONE_ADDRESS with bluetooth address of your phone, and the PHONE_PATH with the path you discovered (the one below should work for W810i's with a memory stick). Good Luck!!<br /></li></ul><blockquote><small><i>#!/bin/bash<br />export GROCERY_FILE="grocery.txt"<br />export PHONE_ADDRESS="00:18:xx:xx:xx:xx"<br />export PHONE_PATH="Memory Stick/MSSEMC/Media files/webpage/saved_pages/$GROCERY_FILE"<br />export EDITOR=vim<br /># First create the grocery list.<br />#<br />if [ -f $GROCERY_FILE ]<br />then<br />   echo "File $GROCERY_FILE exists... Re-Editing";<br />fi<br /><br />$EDITOR $GROCERY_FILE<br /><br />if [ -f $GROCERY_FILE ]<br />then<br />   echo "Removing $GROCERY_FILE from phone location $PHONE_PATH";<br />   obexftp -b $PHONE_ADDRESS -k "$PHONE_PATH" 2&amp;amp;gt; /dev/null<br />   echo "Adding $GROCERY_FILE to phone";<br />   obexftp -b $PHONE_ADDRESS -p $GROCERY_FILE 2&amp;amp;gt; /dev/null<br />   if [ $? -eq 0 ]<br />   then<br />      echo "Added file to phone successfully. Go Shop!!"<br />   else<br />      echo "Failed to add list to phone. Search for paper and pen!!"<br />   fi<br /><br />else<br />   echo "File $GROCERY_FILE Does not exist... Aborting.";<br />fi</i></small><br /></blockquote>]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/03/grocery-list-on-bluetooth-phon.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/03/grocery-list-on-bluetooth-phon.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Linux</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Technology</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">bluetooth</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">w810i</category>
            
            <pubDate>Mon, 24 Mar 2008 19:08:09 -0800</pubDate>
        </item>
        
        <item>
            <title>Namesake</title>
            <description><![CDATA[  <p>After a long long time, yesterday I watched a movie that does justice to the book it's based on, if not supersedes. It's <a href="http://www.foxsearchlight.com/thenamesake/">NameSake</a> by <a href="http://en.wikipedia.org/wiki/Mira_Nair">Mira Nair</a>.</p>

  <p>I have read <a href="http://books.google.com/books?id=Nx-vY7ac1OcC&dq=namesake">the book</a> before watching the movie, and expected the movie to be slow. However, I came out quite surprised. It was a reasonably fast movie, with awesome acting and reasonably good editing. <a href="http://en.wikipedia.org/wiki/Tabbu">Tabbu</a> and <a href="http://en.wikipedia.org/wiki/Irfan_Khan_%28actor%29">Irfan Khan</a> were superb, so was <a href="http://en.wikipedia.org/wiki/Kal_Penn">Kal Penn</a> (of <a href="http://en.wikipedia.org/wiki/Harold_&_Kumar_Go_to_White_Castle">Harold and Kumar</a> fame). A must watch.</p>
]]></description>
            <link>http://samya.indiangeek.com/new/blog/2008/03/namesake.html</link>
            <guid>http://samya.indiangeek.com/new/blog/2008/03/namesake.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Movies</category>
            
            
            <pubDate>Thu, 20 Mar 2008 13:10:59 -0800</pubDate>
        </item>
        
    </channel>
</rss>
