<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/blog/templates/default/atom.css" type="text/css" ?>

<feed version="0.3" 
   xmlns="http://purl.org/atom/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://web.gnuer.org/blog/rss.php?version=atom0.3" rel="service.feed" title="/me on the net!" type="application/x.atom+xml" />
    <link href="http://web.gnuer.org/blog/"                        rel="alternate"    title="/me on the net!" type="text/html" />
    <link href="http://web.gnuer.org/blog/rss.php?version=2.0"     rel="alternate"    title="/me on the net!" type="application/rss+xml" />
    <title mode="escaped" type="text/html">/me on the net!</title>
    <tagline mode="escaped" type="text/html">Anurag's blog at web.gnuer.org</tagline>
    <id>http://web.gnuer.org/blog/</id>
    <modified>2011-12-14T19:10:37Z</modified>
    <generator url="http://www.s9y.org/" version="1.2">Serendipity 1.2 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>
    <info mode="xml" type="text/html">
        <div xmlns="http://www.w3.org/1999/xhtml">You are viewing an ATOM formatted XML site feed. Usually this file is inteded to be viewed in an aggregator or syndication software. If you want to know more about ATOM, please visist <a href="http://atomenabled.org/">Atomenabled.org</a></div>
    </info>

    <entry>
        <link href="http://web.gnuer.org/blog/archives/102-Tracing-ruby-programs-with-set_trace_func.html" rel="alternate" title="Tracing ruby programs with set_trace_func" type="text/html" />
        <author>
            <name>Anurag</name>
            <email>nospam@example.com</email>
        </author>
    
        <issued>2011-12-14T19:04:38Z</issued>
        <created>2011-12-14T19:04:38Z</created>
        <modified>2011-12-14T19:10:37Z</modified>
        <wfw:comment>http://web.gnuer.org/blog/wfwcomment.php?cid=102</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://web.gnuer.org/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=102</wfw:commentRss>
    
        <id>http://web.gnuer.org/blog/archives/102-guid.html</id>
        <title mode="escaped" type="text/html">Tracing ruby programs with set_trace_func</title>
        <content type="application/xhtml+xml" xml:base="http://web.gnuer.org/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                At times you may need to trace a ruby program's execution flow. Ruby's set_trace_func comes handy there.<br />
<br />
<script src="https://gist.github.com/1477993.js"> </script><br />
<br />
When saved in a file called trace.rb and executed with $ ruby trace.rb, it outputs<br />
<br />
<code>   2011-12-15 00:33:26 +0530 c-return trace.rb:3  set_trace_func   Kernel<br />
   2011-12-15 00:33:26 +0530     line trace.rb:5                     <br />
   2011-12-15 00:33:26 +0530   c-call trace.rb:5        puts   Kernel<br />
   2011-12-15 00:33:26 +0530   c-call trace.rb:5        puts       IO<br />
   2011-12-15 00:33:26 +0530   c-call trace.rb:5       write       IO<br />
*** Hello World<br />
   2011-12-15 00:33:26 +0530 c-return trace.rb:5       write       IO<br />
   2011-12-15 00:33:26 +0530 c-return trace.rb:5        puts       IO<br />
   2011-12-15 00:33:26 +0530 c-return trace.rb:5        puts   Kernel<br />
</code> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://web.gnuer.org/blog/archives/99-Whats-new-in-Firefox-5!.html" rel="alternate" title="What's new in Firefox 5!" type="text/html" />
        <author>
            <name>Anurag</name>
            <email>nospam@example.com</email>
        </author>
    
        <issued>2011-06-28T12:42:15Z</issued>
        <created>2011-06-28T12:42:15Z</created>
        <modified>2011-07-01T10:47:22Z</modified>
        <wfw:comment>http://web.gnuer.org/blog/wfwcomment.php?cid=99</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://web.gnuer.org/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=99</wfw:commentRss>
    
        <id>http://web.gnuer.org/blog/archives/99-guid.html</id>
        <title mode="escaped" type="text/html">What's new in Firefox 5!</title>

        
    </entry>
    <entry>
        <link href="http://web.gnuer.org/blog/archives/97-Convert-videos-for-Android-Samsung-Galaxy.html" rel="alternate" title="Convert videos for Android (Samsung Galaxy)" type="text/html" />
        <author>
            <name>Anurag</name>
            <email>nospam@example.com</email>
        </author>
    
        <issued>2011-02-21T18:51:30Z</issued>
        <created>2011-02-21T18:51:30Z</created>
        <modified>2011-03-19T19:44:12Z</modified>
        <wfw:comment>http://web.gnuer.org/blog/wfwcomment.php?cid=97</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://web.gnuer.org/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=97</wfw:commentRss>
    
        <id>http://web.gnuer.org/blog/archives/97-guid.html</id>
        <title mode="escaped" type="text/html">Convert videos for Android (Samsung Galaxy)</title>
        <content type="application/xhtml+xml" xml:base="http://web.gnuer.org/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                My <a href="http://www.gsmarena.com/samsung_galaxy_551-3515.php" title="Samsung Galaxy 551" target="_blank">Android phone</a> doesn'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.<br />
<br />
<blockquote><code>$ ffmpeg -i input_video.avi -f mp4 -vcodec libx264 -acodec libfaac -s 400x240 -ab 128k output_video.mp4</code></blockquote><br />
<br />
400x240 is the phone's screen resolution.<br />
<br />
[Edit] <a href="http://www.ffmpeg.org/faq.html#SEC23" title="FFMpeg FAQs">Good parameters for high quality MPEG4 encoding</a>:<br />
<blockquote><code>-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 </code></blockquote> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://web.gnuer.org/blog/archives/98-Rotten-tomatoes-rotten-TOS.html" rel="alternate" title="Rotten tomatoes' rotten TOS" type="text/html" />
        <author>
            <name>Anurag</name>
            <email>nospam@example.com</email>
        </author>
    
        <issued>2011-03-19T19:34:21Z</issued>
        <created>2011-03-19T19:34:21Z</created>
        <modified>2011-03-19T19:42:23Z</modified>
        <wfw:comment>http://web.gnuer.org/blog/wfwcomment.php?cid=98</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://web.gnuer.org/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=98</wfw:commentRss>
    
        <id>http://web.gnuer.org/blog/archives/98-guid.html</id>
        <title mode="escaped" type="text/html">Rotten tomatoes' rotten TOS</title>
        <content type="application/xhtml+xml" xml:base="http://web.gnuer.org/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <blockquote>3 (b) No Conflicting Uses.  <em><strong>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</strong></em>, 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.</blockquote><br />
Dear Rotten Tomatoes, what's the point of launching these <a href="http://developer.rottentomatoes.com/docs">APIs</a> then?  
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://web.gnuer.org/blog/archives/87-USD-INR-exchange-rates.html" rel="alternate" title="USD INR exchange rates" type="text/html" />
        <author>
            <name>Anurag</name>
            <email>nospam@example.com</email>
        </author>
    
        <issued>2009-01-05T10:18:18Z</issued>
        <created>2009-01-05T10:18:18Z</created>
        <modified>2010-12-08T14:15:04Z</modified>
        <wfw:comment>http://web.gnuer.org/blog/wfwcomment.php?cid=87</wfw:comment>
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://web.gnuer.org/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=87</wfw:commentRss>
    
        <id>http://web.gnuer.org/blog/archives/87-guid.html</id>
        <title mode="escaped" type="text/html">USD INR exchange rates</title>
        <content type="application/xhtml+xml" xml:base="http://web.gnuer.org/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I keep looking at stuff and try guessing its price in INR. Look around for calculator, check USD exchange rate and punch it in.<br />
<br />
<code>#!/usr/bin/env ruby<br />
require 'rubygems'<br />
require 'hpricot'<br />
require 'open-uri'<br />
<br />
FPAGE = 'http://finance.yahoo.com/q?s=USDINR=X'<br />
XPATH = '/html/body/div/div[2]/div[4]/div[2]/div/div[2]/table/tr/td/big/b/span/'<br />
<br />
amount = (ARGV.length == 1) ? ARGV[0].to_f : 1<br />
amount = 1 if amount == 0<br />
<br />
doc = Hpricot(URI.parse( FPAGE ).read)<br />
element = doc.search( XPATH )<br />
exchange_rate = element[0].to_s.to_f<br />
puts "#{amount} USD = #{amount * exchange_rate} INR"</code><br />
<br />
Now i no longer have to. Just running <strong>$ usdinr 197.21</strong> gives the amount in INR. Save this file in <strong>/usr/bin/usdinr</strong> and give execute permissions.<br />
<br />
[Update 2009-02-19: Updated the script with new XPath]<br />
[Update 2010-12-08: Updated the script with new Yahoo finance page and XPath] 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://web.gnuer.org/blog/archives/96-Mumbai,-Delhi,-Pune,-Ahmedabad-Autorickshaw-Taxi-fares.html" rel="alternate" title="Mumbai, Delhi, Pune, Ahmedabad - Autorickshaw Taxi fares" type="text/html" />
        <author>
            <name>Anurag</name>
            <email>nospam@example.com</email>
        </author>
    
        <issued>2010-08-26T08:39:32Z</issued>
        <created>2010-08-26T08:39:32Z</created>
        <modified>2010-08-26T15:11:56Z</modified>
        <wfw:comment>http://web.gnuer.org/blog/wfwcomment.php?cid=96</wfw:comment>
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://web.gnuer.org/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=96</wfw:commentRss>
    
        <id>http://web.gnuer.org/blog/archives/96-guid.html</id>
        <title mode="escaped" type="text/html">Mumbai, Delhi, Pune, Ahmedabad - Autorickshaw Taxi fares</title>
        <content type="application/xhtml+xml" xml:base="http://web.gnuer.org/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <div class="serendipity_imageComment_right" style="width: 73px"><div class="serendipity_imageComment_img"><a class='serendipity_image_link' href='http://web.gnuer.org/blog/uploads/screenshots/rickfare.png' target="_blank"><!-- s9ymdb:14 --><img width="73" height="110"  src="http://web.gnuer.org/blog/uploads/screenshots/rickfare.serendipityThumb.png" alt="" /></a></div><div class="serendipity_imageComment_txt">Rickshaw fares for Mumbai</div></div>Two months back Mumbai'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. <br />
<br />
I started <a href="http://rickfare.com" title="rickfare.com">http://rickfare.com</a> 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 <a href="http://rickfare.com" title="http://rickfare.com ">Rickfare.com</a> is accessed by thousands of commuters over a wide variety of mobile devices including iPhone, BlackBerry, Android, HTC and assorted Nokia handsets.<br />
<br />
I'd like to thank <a href="http://www.ashishmehta.com/blog/">Ashish Mehta</a>, <a href="http://atuljha.com/blog/">Atul Jha</a>, <a href="http://kartikm.wordpress.com/2010/07/20/rickfare/">Kartik Mistry</a> and <a href="http://eficacy.com">Kamaleshwar</a> for helping out with auto fares of their cities <img src="http://web.gnuer.org/blog/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://web.gnuer.org/blog/archives/95-Extract-mp3-audio-from-a-video-clip-using-mencoder.html" rel="alternate" title="Extract mp3 audio from a video clip using mencoder" type="text/html" />
        <author>
            <name>Anurag</name>
            <email>nospam@example.com</email>
        </author>
    
        <issued>2010-05-17T08:22:44Z</issued>
        <created>2010-05-17T08:22:44Z</created>
        <modified>2010-05-17T08:33:20Z</modified>
        <wfw:comment>http://web.gnuer.org/blog/wfwcomment.php?cid=95</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://web.gnuer.org/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=95</wfw:commentRss>
    
        <id>http://web.gnuer.org/blog/archives/95-guid.html</id>
        <title mode="escaped" type="text/html">Extract mp3 audio from a video clip using mencoder</title>
        <content type="application/xhtml+xml" xml:base="http://web.gnuer.org/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                This post is a note for self. I always keep forgetting how to extract mp3 audio file from any video clip.<br />
<blockquote><code>$ mencoder videofile.avi -of rawaudio -oac mp3lame -ovc copy -o audio-output.mp3</code></blockquote><br />
This is an awesome companion to the youtube video downloader - <a href="http://bitbucket.org/rg3/youtube-dl/wiki/Home" title="Youtube video downloader">youtube-dl.py</a> 
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://web.gnuer.org/blog/archives/77-here-comes-mGarlic.html" rel="alternate" title="here comes mGarlic" type="text/html" />
        <author>
            <name>Anurag</name>
            <email>nospam@example.com</email>
        </author>
    
        <issued>2008-05-26T09:22:06Z</issued>
        <created>2008-05-26T09:22:06Z</created>
        <modified>2010-05-11T11:07:40Z</modified>
        <wfw:comment>http://web.gnuer.org/blog/wfwcomment.php?cid=77</wfw:comment>
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://web.gnuer.org/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=77</wfw:commentRss>
    
        <id>http://web.gnuer.org/blog/archives/77-guid.html</id>
        <title mode="escaped" type="text/html">here comes mGarlic</title>
        <content type="application/xhtml+xml" xml:base="http://web.gnuer.org/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So, you've recieved an invite from one of your several friends about <a href="http://www.mginger.com" title="mGinger">mGinger</a> service that lets you do blah blah and blah with sms and all that. <br />
<br />
Talking of imitations, move over <a href="http://www.mginger.com" title="mGinger">mGinger</a>. here comes <a href="http://www.mgarlic.com" title="mGarlic">mGarlic</a>.  
            </div>
        </content>

        
    </entry>
    <entry>
        <link href="http://web.gnuer.org/blog/archives/94-Server-sent-unexpected-return-value-502-Bad-Gateway-in-response-to-COPY-request.html" rel="alternate" title="Server sent unexpected return value (502 Bad Gateway) in response to COPY request" type="text/html" />
        <author>
            <name>Anurag</name>
            <email>nospam@example.com</email>
        </author>
    
        <issued>2010-04-21T05:16:14Z</issued>
        <created>2010-04-21T05:16:14Z</created>
        <modified>2010-05-04T10:24:48Z</modified>
        <wfw:comment>http://web.gnuer.org/blog/wfwcomment.php?cid=94</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://web.gnuer.org/blog/rss.php?version=atom0.3&amp;type=comments&amp;cid=94</wfw:commentRss>
    
        <id>http://web.gnuer.org/blog/archives/94-guid.html</id>
        <title mode="escaped" type="text/html">Server sent unexpected return value (502 Bad Gateway) in response to COPY request</title>
        <content type="application/xhtml+xml" xml:base="http://web.gnuer.org/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                During the recent server migration, I shifted svn services from <em>http</em> to <em>https</em>. Everything seemed to work fine, except for this error while creating branches.<br />
<br />
<code>frodo$ svn cp https://svn.xinh.org/svn/project/UberCool/trunk https://svn.xinh.org/svn/project/UberCool/branches/1.0<br />
svn: Server sent unexpected return value (502 Bad Gateway) in response to COPY request for '/svn/project/!svn/bc/15/UberCool/trunk'<br />
svn: Your commit message was left in a temporary file:<br />
svn:    'svn-commit.tmp'<br />
frodo$ </code><br />
<br />
Googling around a bit helped. I'm using HTTPS over Apache + dav_svn module. This issue can be fixed by enabling <strong>mod_headers</strong> module in Apache and adding the following line at the end of your VirtualHost.<br />
<br />
<code>RequestHeader edit Destination ^https http early</code><br />
 
            </div>
        </content>

        
    </entry>
</feed>
