Jekyll2022-05-29T03:18:21+00:00https://mandar.dev/feed.xmlMandar’s Blog~command line graphing: gnuplot2013-01-22T07:23:37+00:002013-01-22T07:23:37+00:00https://mandar.dev/2013/01/22/command-line-graphing-gnuplot<p><img src="https://64.media.tumblr.com/cca31e1a4430db99a48f488a70077d8a/tumblr_inline_mh0jkxILV41rn6683.jpg" alt="" /></p>
<p><strong>Who needs charts on the command line?</strong></p>
<p>If you have ever been stuck at an ssh prompt staring a bunch of data gnuplot is a must have tool. I was looking at response times over an ssh prompt and realized how I missed MS Excel. All this data would make much more sense as a chart! Apparently there are others who would agree with me and that’s the reason gnuplot exists.</p>
<p><strong>Enter gnuplot</strong></p>
<p><a href="http://en.wikipedia.org/wiki/Gnuplot">gnuplot</a> is a command line tool that generates complex plots from data. It has a lot of options and can generate the plots as PNG, SVG etc. But most importantly it can plot your data as an ASCII chart :).</p>
<p><strong>Bonus points</strong></p>
<p>I use gnuplot to check my nodejs logs:</p>
<blockquote>
<p>tail –lines=1000 ~/.forever/*.log | grep ‘Time: ’ | sed ’s/.* Time: l: //’ > data<br />
gnuplot> set terminal dumb<br />
gnuplot> plot “data”</p>
</blockquote>
<p>This is a static plot but you can even plot animated graphs like <a href="http://filipivianna.blogspot.in/2011/11/more-trickery-with-gnuplot-dumb.html">this</a>: </p>
<p><img src="http://1.bp.blogspot.com/-6m29LnS1AR0/Ts0tJUar0EI/AAAAAAAAAwo/9lGnM2wA8sk/s1600/screenshot.gif" alt="Animated memory usage" /></p>Cloud9: IDE in the cloud2013-01-09T12:00:00+00:002013-01-09T12:00:00+00:00https://mandar.dev/2013/01/09/cloud9-ide-in-the-cloud<p><a href="http://c9.io/">Cloud9</a> is a cloud based IDE that works completely within the browser. It even provides a full linux terminal within the browser. It is ideal to try out some open source language/framework quickly without doing the full setup.</p>
<p>Currently it supports nodejs, PHP, python and ruby out of the box. There are plans to support .Net in the future. It allows one-click deployment to cloud platforms like Azure, CloudFoundry and Heroku. PFB screenshot of my attempt at a simple nodejs program :).</p>
<p><img src="https://64.media.tumblr.com/d7228f17b3688772c57936b516d6ecaf/tumblr_inline_mgcuinlXNZ1rn6683.gif" alt="Cloud9 screenshot" /></p>Cloud9 is a cloud based IDE that works completely within the browser. It even provides a full linux terminal within the browser. It is ideal to try out some open source language/framework quickly without doing the full setup.@benguild: Leaked screenshots of native Google Maps (Alpha) for iOS 6.2012-10-15T04:03:45+00:002012-10-15T04:03:45+00:00https://mandar.dev/2012/10/15/benguild-leaked-screenshots-of-native-google<p><a href="http://benguild.com/post/33553036078/leaked-screenshots-of-native-google-maps-alpha-for">@benguild: Leaked screenshots of native Google Maps (Alpha) for iOS 6.</a></p>
<p><a href="http://benguild.com/post/33553036078/leaked-screenshots-of-native-google-maps-alpha-for">benguild</a>:</p>
<blockquote>
<p>Oh boy! <strong>Here we go.</strong></p>
<ul>
<li>It’s vector-based.</li>
<li>It’s got two-finger rotation to any angle.</li>
<li>It’s super fast.</li>
<li>4-inch height of the iPhone 5 is supported!</li>
</ul>
<p>Here are some blurry photos. Ever since iOS 6 came out, we lost <a href="http://maps.google.com">Google Maps</a>. However, Google has been rumored to be hard at work on their own…</p>
</blockquote>@benguild: Leaked screenshots of native Google Maps (Alpha) for iOS 6.google mobile partner day they are really2012-09-28T13:34:00+00:002012-09-28T13:34:00+00:00https://mandar.dev/2012/09/28/google-mobile-partner-day-they-are-really<p><img src="/tumblr_files/tumblr_mb289tMFo11rt5pkuo1_1280.jpg" alt="" /></p>
<p>@ Google Mobile Partner Day - they are really pushing mobile ads in India!</p>Download Youtube subscriptions on a schedule2012-09-08T04:37:00+00:002012-09-08T04:37:00+00:00https://mandar.dev/2012/09/08/download-youtube-subscriptions-on-a-schedule<p><img src="https://64.media.tumblr.com/tumblr_m9wy14vW9l1rn6683.jpg" alt="" /></p>
<p>My BSNL broadband plan gives me unlimited data between 2 AM and 8 AM. I thought this would be a great time to download all my YouTube subscriptions. I could watch the videos the next day without using my download quota!</p>
<p>I found a couple of great scripts to get the job done. I had to make a few changes to get them working on windows:</p>
<p><a href="https://github.com/mandarl/download-youtube-subscriptions"><img src="https://64.media.tumblr.com/tumblr_ma0hn7MNnT1rn6683.jpg" alt="" /></a></p>
<p><a href="https://github.com/mandarl/youtube-dl"><img src="https://64.media.tumblr.com/tumblr_ma0hnjVnK51rn6683.jpg" alt="" /></a></p>
<p><strong>Prerequisites:</strong></p>
<ol>
<li>Cygwin or another shell for windows.</li>
<li>Python </li>
</ol>
<p>Just run the subscriptions script like so:</p>
<blockquote>
<p>./download-youtube-subscriptions.sh mandarlimaye</p>
</blockquote>
<p>Put this command in a batch file and schedule it to run whenever you like.</p>edinburgh castle taken with instagram2012-04-15T18:55:39+00:002012-04-15T18:55:39+00:00https://mandar.dev/2012/04/15/edinburgh-castle-taken-with-instagram<p><img src="/tumblr_files/tumblr_m2j8grYDJs1rt5pkuo1_640.jpg" alt="" /></p>
<p>Edinburgh Castle (Taken with <a href="http://instagr.am">instagram</a>)</p>glasgow taken with instagram2012-04-15T09:01:06+00:002012-04-15T09:01:06+00:00https://mandar.dev/2012/04/15/glasgow-taken-with-instagram<p><img src="/tumblr_files/tumblr_m2igxuoFDU1rt5pkuo1_640.jpg" alt="" /></p>
<p>Glasgow (Taken with <a href="http://instagr.am">instagram</a>)</p>torrential rain taken with instagram2012-04-12T19:12:07+00:002012-04-12T19:12:07+00:00https://mandar.dev/2012/04/12/torrential-rain-taken-with-instagram<p><img src="/tumblr_files/tumblr_m2dp87FvUc1rt5pkuo1_640.jpg" alt="" /></p>
<p>Torrential rain (Taken with <a href="http://instagr.am">instagram</a>)</p>covent garden london taken with instagram2012-04-12T15:33:51+00:002012-04-12T15:33:51+00:00https://mandar.dev/2012/04/12/covent-garden-london-taken-with-instagram<p><img src="/tumblr_files/tumblr_m2df4fFBiR1rt5pkuo1_640.jpg" alt="" /></p>
<p>Covent Garden, London (Taken with <a href="http://instagr.am">instagram</a>)</p>regents canal camden taken with instagram2012-04-11T20:00:31+00:002012-04-11T20:00:31+00:00https://mandar.dev/2012/04/11/regents-canal-camden-taken-with-instagram<p><img src="/tumblr_files/tumblr_m2bwswZ2wt1rt5pkuo1_640.jpg" alt="" /></p>
<p>Regent’s canal, Camden (Taken with <a href="http://instagr.am">instagram</a>)</p>