<?xml version="1.0" encoding="utf-8" ?>

<rss version="0.91" >
<channel>
<title>/me on the net!</title>
<link>http://web.gnuer.org/blog/</link>
<description>Anurag's blog at web.gnuer.org</description>
<language>en</language>
<image>
        <url>http://web.gnuer.org/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: /me on the net! - Anurag's blog at web.gnuer.org</title>
        <link>http://web.gnuer.org/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Tracing ruby programs with set_trace_func</title>
    <link>http://web.gnuer.org/blog/archives/102-Tracing-ruby-programs-with-set_trace_func.html</link>

    <description>
        At times you may need to trace a ruby program&#039;s execution flow. Ruby&#039;s set_trace_func comes handy there.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/1477993.js&quot;&gt; &lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
When saved in a file called trace.rb and executed with $ ruby trace.rb, it outputs&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;   2011-12-15 00:33:26 +0530 c-return trace.rb:3  set_trace_func   Kernel&lt;br /&gt;
   2011-12-15 00:33:26 +0530     line trace.rb:5                     &lt;br /&gt;
   2011-12-15 00:33:26 +0530   c-call trace.rb:5        puts   Kernel&lt;br /&gt;
   2011-12-15 00:33:26 +0530   c-call trace.rb:5        puts       IO&lt;br /&gt;
   2011-12-15 00:33:26 +0530   c-call trace.rb:5       write       IO&lt;br /&gt;
*** Hello World&lt;br /&gt;
   2011-12-15 00:33:26 +0530 c-return trace.rb:5       write       IO&lt;br /&gt;
   2011-12-15 00:33:26 +0530 c-return trace.rb:5        puts       IO&lt;br /&gt;
   2011-12-15 00:33:26 +0530 c-return trace.rb:5        puts   Kernel&lt;br /&gt;
&lt;/code&gt; 
    </description>
</item>
<item>
    <title>What's new in Firefox 5!</title>
    <link>http://web.gnuer.org/blog/archives/99-Whats-new-in-Firefox-5!.html</link>

</item>
<item>
    <title>Convert videos for Android (Samsung Galaxy)</title>
    <link>http://web.gnuer.org/blog/archives/97-Convert-videos-for-Android-Samsung-Galaxy.html</link>

    <description>
        My &lt;a href=&quot;http://www.gsmarena.com/samsung_galaxy_551-3515.php&quot; title=&quot;Samsung Galaxy 551&quot; target=&quot;_blank&quot;&gt;Android phone&lt;/a&gt; doesn&#039;t support DivX/XviD. To play videos on it. I need to convert them to MP4. Taking a note for myself if I need it later.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;code&gt;$ ffmpeg -i input_video.avi -f mp4 -vcodec libx264 -acodec libfaac -s 400x240 -ab 128k output_video.mp4&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
400x240 is the phone&#039;s screen resolution.&lt;br /&gt;
&lt;br /&gt;
[Edit] &lt;a href=&quot;http://www.ffmpeg.org/faq.html#SEC23&quot; title=&quot;FFMpeg FAQs&quot;&gt;Good parameters for high quality MPEG4 encoding&lt;/a&gt;:&lt;br /&gt;
&lt;blockquote&gt;&lt;code&gt;-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 &lt;/code&gt;&lt;/blockquote&gt; 
    </description>
</item>
<item>
    <title>Rotten tomatoes' rotten TOS</title>
    <link>http://web.gnuer.org/blog/archives/98-Rotten-tomatoes-rotten-TOS.html</link>

    <description>
        &lt;blockquote&gt;3 (b) No Conflicting Uses.  &lt;em&gt;&lt;strong&gt;You may not use the Flixster API to develop (or instruct any third party to develop) a service that may reasonably be deemed to be directly competitive with Flixster’s products and services&lt;/strong&gt;&lt;/em&gt;, unless you have been specifically permitted to do so in a separate written agreement with Flixster prior to the undertaking of the development and launch of such service.&lt;/blockquote&gt;&lt;br /&gt;
Dear Rotten Tomatoes, what&#039;s the point of launching these &lt;a href=&quot;http://developer.rottentomatoes.com/docs&quot;&gt;APIs&lt;/a&gt; then?  
    </description>
</item>
<item>
    <title>USD INR exchange rates</title>
    <link>http://web.gnuer.org/blog/archives/87-USD-INR-exchange-rates.html</link>

    <description>
        I keep looking at stuff and try guessing its price in INR. Look around for calculator, check USD exchange rate and punch it in.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;#!/usr/bin/env ruby&lt;br /&gt;
require &#039;rubygems&#039;&lt;br /&gt;
require &#039;hpricot&#039;&lt;br /&gt;
require &#039;open-uri&#039;&lt;br /&gt;
&lt;br /&gt;
FPAGE = &#039;http://finance.yahoo.com/q?s=USDINR=X&#039;&lt;br /&gt;
XPATH = &#039;/html/body/div/div[2]/div[4]/div[2]/div/div[2]/table/tr/td/big/b/span/&#039;&lt;br /&gt;
&lt;br /&gt;
amount = (ARGV.length == 1) ? ARGV[0].to_f : 1&lt;br /&gt;
amount = 1 if amount == 0&lt;br /&gt;
&lt;br /&gt;
doc = Hpricot(URI.parse( FPAGE ).read)&lt;br /&gt;
element = doc.search( XPATH )&lt;br /&gt;
exchange_rate = element[0].to_s.to_f&lt;br /&gt;
puts &quot;#{amount} USD = #{amount * exchange_rate} INR&quot;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Now i no longer have to. Just running &lt;strong&gt;$ usdinr 197.21&lt;/strong&gt; gives the amount in INR. Save this file in &lt;strong&gt;/usr/bin/usdinr&lt;/strong&gt; and give execute permissions.&lt;br /&gt;
&lt;br /&gt;
[Update 2009-02-19: Updated the script with new XPath]&lt;br /&gt;
[Update 2010-12-08: Updated the script with new Yahoo finance page and XPath] 
    </description>
</item>
<item>
    <title>Mumbai, Delhi, Pune, Ahmedabad - Autorickshaw Taxi fares</title>
    <link>http://web.gnuer.org/blog/archives/96-Mumbai,-Delhi,-Pune,-Ahmedabad-Autorickshaw-Taxi-fares.html</link>

    <description>
        &lt;div class=&quot;serendipity_imageComment_right&quot; style=&quot;width: 73px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a class=&#039;serendipity_image_link&#039; href=&#039;http://web.gnuer.org/blog/uploads/screenshots/rickfare.png&#039; target=&quot;_blank&quot;&gt;&lt;!-- s9ymdb:14 --&gt;&lt;img width=&quot;73&quot; height=&quot;110&quot;  src=&quot;http://web.gnuer.org/blog/uploads/screenshots/rickfare.serendipityThumb.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Rickshaw fares for Mumbai&lt;/div&gt;&lt;/div&gt;Two months back Mumbai&#039;s autorickshaw and taxi drivers went on a strike, demanding a steep increase in fares. While earlier the fare calculation was simple, after the new fare structure came in place, autorickshaw fare calculations became relatively complex. &lt;br /&gt;
&lt;br /&gt;
I started &lt;a href=&quot;http://rickfare.com&quot; title=&quot;rickfare.com&quot;&gt;http://rickfare.com&lt;/a&gt; on the day new fares came into effect after seeing the new complicated fare structure. Over time, friends pitched in for their cities and I added New Delhi, Ahmedabad, Pune and Navi Mumbai. Today &lt;a href=&quot;http://rickfare.com&quot; title=&quot;http://rickfare.com &quot;&gt;Rickfare.com&lt;/a&gt; is accessed by thousands of commuters over a wide variety of mobile devices including iPhone, BlackBerry, Android, HTC and assorted Nokia handsets.&lt;br /&gt;
&lt;br /&gt;
I&#039;d like to thank &lt;a href=&quot;http://www.ashishmehta.com/blog/&quot;&gt;Ashish Mehta&lt;/a&gt;, &lt;a href=&quot;http://atuljha.com/blog/&quot;&gt;Atul Jha&lt;/a&gt;, &lt;a href=&quot;http://kartikm.wordpress.com/2010/07/20/rickfare/&quot;&gt;Kartik Mistry&lt;/a&gt; and &lt;a href=&quot;http://eficacy.com&quot;&gt;Kamaleshwar&lt;/a&gt; for helping out with auto fares of their cities &lt;img src=&quot;http://web.gnuer.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </description>
</item>
<item>
    <title>Extract mp3 audio from a video clip using mencoder</title>
    <link>http://web.gnuer.org/blog/archives/95-Extract-mp3-audio-from-a-video-clip-using-mencoder.html</link>

    <description>
        This post is a note for self. I always keep forgetting how to extract mp3 audio file from any video clip.&lt;br /&gt;
&lt;blockquote&gt;&lt;code&gt;$ mencoder videofile.avi -of rawaudio -oac mp3lame -ovc copy -o audio-output.mp3&lt;/code&gt;&lt;/blockquote&gt;&lt;br /&gt;
This is an awesome companion to the youtube video downloader - &lt;a href=&quot;http://bitbucket.org/rg3/youtube-dl/wiki/Home&quot; title=&quot;Youtube video downloader&quot;&gt;youtube-dl.py&lt;/a&gt; 
    </description>
</item>
<item>
    <title>here comes mGarlic</title>
    <link>http://web.gnuer.org/blog/archives/77-here-comes-mGarlic.html</link>

    <description>
        So, you&#039;ve recieved an invite from one of your several friends about &lt;a href=&quot;http://www.mginger.com&quot; title=&quot;mGinger&quot;&gt;mGinger&lt;/a&gt; service that lets you do blah blah and blah with sms and all that. &lt;br /&gt;
&lt;br /&gt;
Talking of imitations, move over &lt;a href=&quot;http://www.mginger.com&quot; title=&quot;mGinger&quot;&gt;mGinger&lt;/a&gt;. here comes &lt;a href=&quot;http://www.mgarlic.com&quot; title=&quot;mGarlic&quot;&gt;mGarlic&lt;/a&gt;.  
    </description>
</item>
<item>
    <title>Server sent unexpected return value (502 Bad Gateway) in response to COPY request</title>
    <link>http://web.gnuer.org/blog/archives/94-Server-sent-unexpected-return-value-502-Bad-Gateway-in-response-to-COPY-request.html</link>

    <description>
        During the recent server migration, I shifted svn services from &lt;em&gt;http&lt;/em&gt; to &lt;em&gt;https&lt;/em&gt;. Everything seemed to work fine, except for this error while creating branches.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;frodo$ svn cp https://svn.xinh.org/svn/project/UberCool/trunk https://svn.xinh.org/svn/project/UberCool/branches/1.0&lt;br /&gt;
svn: Server sent unexpected return value (502 Bad Gateway) in response to COPY request for &#039;/svn/project/!svn/bc/15/UberCool/trunk&#039;&lt;br /&gt;
svn: Your commit message was left in a temporary file:&lt;br /&gt;
svn:    &#039;svn-commit.tmp&#039;&lt;br /&gt;
frodo$ &lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Googling around a bit helped. I&#039;m using HTTPS over Apache + dav_svn module. This issue can be fixed by enabling &lt;strong&gt;mod_headers&lt;/strong&gt; module in Apache and adding the following line at the end of your VirtualHost.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;RequestHeader edit Destination ^https http early&lt;/code&gt;&lt;br /&gt;
 
    </description>
</item>

</channel>
</rss>

