<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Inspirated</title>
	
	<link>http://inspirated.com</link>
	<description>krkhan's blog</description>
	<lastBuildDate>Mon, 10 Dec 2012 07:59:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Inspirated" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="inspirated" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">Inspirated</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Bro IDS on OpenWRT</title>
		<link>http://inspirated.com/2012/12/10/bro-ids-on-openwrt</link>
		<comments>http://inspirated.com/2012/12/10/bro-ids-on-openwrt#comments</comments>
		<pubDate>Mon, 10 Dec 2012 07:59:52 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Bro IDS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OpenWRT]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SysNet]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=381</guid>
		<description><![CDATA[While I was at SysNet, we had been working on a project we called &#8220;Shrimp&#8221; &#8212; Software-defined Home Router Intelligent Monitoring Point. The goal of the project was to provide a framework for easy programmatic access to network monitoring on low-cost, commodity, home router devices. One of the requirements was to have an IDS on [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>While I was at <a href="http://sysnet.org.pk/">SysNet</a>, we had been working on a project we called &#8220;Shrimp&#8221; &#8212; <em>Software-defined Home Router Intelligent Monitoring Point</em>. The goal of the project was to provide a framework for easy programmatic access to network monitoring on low-cost, commodity, home router devices. One of the requirements was to have an IDS on the home routers for which we chose Bro &#8212; the leading framework for semantic analysis of network traffic.</p>
<p>The OpenWRT OS was chosen as the target platform. Its SDK contained a cross-compile toolchain for CMake projects. However, during the compilation Bro tried to run the <code>binpac</code> and <code>bifcl</code> executables for processing intermediate files. The executables refused to run on the build platform if the target platform architecture was different (mostly the case, e.g., we were building on <code>x86-64</code> and target was <code>arm</code>).</p>
<p>The (not-so-pretty ™) workaround we used was to build Bro twice. Once for the host, and once for the target. The CMake files were then patched to first generate <code>binpac</code> and <code>bifcl</code> binaries if they weren&#8217;t provided and then use the provided binaries if they were defined at make time. The first compile generated the binaries on <code>x86-64</code> and the second compile (for <code>arm</code>) used the earlier binaries to process the <code>bif</code> files.</p>
<p>The Makefile and patches are available in this tarball: <a href="http://sysnet.org.pk/upload/rc_shrimpFiles/openwrt-bro.tar.gz">openwrt-bro.tar.gz</a>, while the compiled <a href="http://sysnet.org.pk/upload/rc_shrimpFiles/bro_2.0-1_ar71xx.ipk"><code>ipk</code> package</a> is also available for installation. Here is a test execution of Bro on OpenWRT:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;"># </span>bro –v</pre></td></tr></table></div>

<blockquote><pre>bro version 2.0</pre>
</blockquote>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;"># </span><span style="color: #c20cb9; font-weight: bold;">cat</span> test.bro</pre></td></tr></table></div>

<blockquote><pre>event bro_init()
{
	print "Hello World!";
}

event new_connection(c: connection)
{
	print "New connection created";
}
</pre>
</blockquote>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;"># </span>bro test.bro</pre></td></tr></table></div>

<blockquote><pre>Hello World!</pre>
</blockquote>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;"># </span>bro <span style="color: #660033;">-i</span> br-lan test.bro</pre></td></tr></table></div>

<blockquote><pre>Hello World!
New connection created
New connection created</pre>
</blockquote>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;"># </span><span style="color: #c20cb9; font-weight: bold;">ls</span></pre></td></tr></table></div>

<blockquote><pre>conn.log           notice_policy.log  reporter.log       weird.log
dns.log            packet_filter.log  test.bro</pre>
</blockquote>
<p>A heap of thanks to <a href="http://sysnet.org.pk/w/User:Zaafar">Zaafar</a> for dealing with my messy code and providing the links to hosted files <img src='http://inspirated.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  !</p>
<div class="shr-publisher-381"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2012/12/10/bro-ids-on-openwrt">Permalink</a> |
<a href="http://inspirated.com/2012/12/10/bro-ids-on-openwrt#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/bro-ids" rel="tag">Bro IDS</a>, <a href="http://inspirated.com/tag/linux" rel="tag">Linux</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/openwrt" rel="tag">OpenWRT</a>, <a href="http://inspirated.com/tag/security" rel="tag">Security</a>, <a href="http://inspirated.com/tag/sysnet" rel="tag">SysNet</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2012/12/10/bro-ids-on-openwrt/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Workflow sharing with Synergy</title>
		<link>http://inspirated.com/2012/11/14/workflow-sharing-with-synergy</link>
		<comments>http://inspirated.com/2012/11/14/workflow-sharing-with-synergy#comments</comments>
		<pubDate>Tue, 13 Nov 2012 23:33:11 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Cross-platform]]></category>
		<category><![CDATA[Dual-Head]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Synergy]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=379</guid>
		<description><![CDATA[It has been a while since I&#8217;ve posted around here and the reasons have been entirely mundane &#8212; got a job, moved to a different country and lost track of everything open-source during the transition. However, open-source is out there and every once a while you&#8217;re bound to stumble across gems that make life easier [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>It has been a while since I&#8217;ve posted around here and the reasons have been entirely mundane &#8212; got a job, moved to a different country and lost track of everything open-source during the transition.</p>
<p>However, open-source is out there and every once a while you&#8217;re bound to stumble across gems that make life easier (and fun) no matter which line of work you are in and that&#8217;s exactly what happened to me today. Let me admit first, I have a fetish for multiple screens. If it was up to me I would have a circle of screens and sit inside them all day long, just to make revolving chairs lot more exciting. Take that, 3D!</p>
<p>Anyways, the issue with multiple screens is not only having enough video outputs on your graphic card(s), but also the sharing of resources. I want three different machines with different processors, hard-disks, heck even different operating systems to share their I/O devices. One option would be the KVM switches, but that would restrict me to only one &#8220;active&#8221; machine at a time, plus the switching button is too much of a hindrance in the work flow. Aristotle famously claimed that the whole is greater than the sum of its parts, then cometh <a href="http://synergy-foss.org/">Synergy</a>:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/synergy.jpg"><img src="http://inspirated.com/uploads/synergy-thumb.jpg" alt="Synergy in action" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Three different machines sharing the keyboard, mouse and clipboard across five different screens and it even works across different platforms! Granted, there are some issues with the configuration which you have to take care about (especially on Windows 7+ platforms with UAC) but once it gets going it becomes one of those cute <em>plus</em> practical toys that make you wonder how you ever lived without them.</p>
<div class="shr-publisher-379"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2012/11/14/workflow-sharing-with-synergy">Permalink</a> |
<a href="http://inspirated.com/2012/11/14/workflow-sharing-with-synergy#comments">5 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/cross-platform" rel="tag">Cross-platform</a>, <a href="http://inspirated.com/tag/dual-head" rel="tag">Dual-Head</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/synergy" rel="tag">Synergy</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2012/11/14/workflow-sharing-with-synergy/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>slicehosts: Extract host-based traffic out of pcap dumps</title>
		<link>http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps</link>
		<comments>http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps#comments</comments>
		<pubDate>Sun, 18 Mar 2012 09:56:46 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Botnets]]></category>
		<category><![CDATA[BSG]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[glib]]></category>
		<category><![CDATA[libpcap]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pcap]]></category>
		<category><![CDATA[slicehosts]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=377</guid>
		<description><![CDATA[During the course of my work on botnet security we have had to deal with mammoth traffic traces captured at a local ISP. While analyzing the traffic we needed to extract traffic for some certain hosts out of large pcap files. An obvious solution would be to run tshark once for each host, filtering the [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>During the course of my work on botnet security we have had to deal with mammoth traffic traces captured at a local ISP. While analyzing the traffic we needed to extract traffic for some certain hosts out of large <code>pcap</code> files. An obvious solution would be to run <code>tshark</code> once for each host, filtering the traffic for that particular IP and writing it to a separate <code>pcap</code> file. However with the number of hosts approaching thousands and the pcap traces approaching terabytes in size <code>tshark</code> didn&#8217;t really fit the bill.</p>
<p>Initially I thought of writing a splitter in Python but my colleague&#8217;s aversion for <a href="http://etheryell.com/technical/playing-with-alot-of-network-traffic/">using Python on large network traces</a> coupled with lack of maintenance of <code>libpcap</code> bindings resulted in me going for C/<code>libpcap</code> directly. The new C-based slicer is available at <a href="https://github.com/krkhan/bsg/tree/master/slicehosts">our GitHub respository</a>. It needs <code>glib</code> to compile though, as I needed a hash table implementation for maintaining the list of hosts that need to be sliced. The <code>Makefile</code> in the repository should take care of compiling with the appropriate flags.</p>
<p>Onto the performance, the speed of slicing is only throttled by <code>libpcap</code>&#8216;s own read/write throughput as most of the remaining work is done in constant time. It took only 71 minutes (or 1.1 hours) to slice 1019 hosts out of a 180 GB pcap file on 2.5 GHz CPU. In simpler words, it&#8217;s <em>lightning</em> fast.</p>
<p>Right now the script does its job well enough. If someone needs to package it I&#8217;ll prefer removing the <code>glib</code> dependency in favor of perhaps <code>glibc</code>&#8216;s own hash table implementation (<code>search.h</code>). In any case, I hope it proves helpful for other people playing with large <code>pcap</code> files.</p>
<div class="shr-publisher-377"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps">Permalink</a> |
<a href="http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps#comments">3 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/botnets" rel="tag">Botnets</a>, <a href="http://inspirated.com/tag/bsg" rel="tag">BSG</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/glib" rel="tag">glib</a>, <a href="http://inspirated.com/tag/libpcap" rel="tag">libpcap</a>, <a href="http://inspirated.com/tag/networking" rel="tag">Networking</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pcap" rel="tag">Pcap</a>, <a href="http://inspirated.com/tag/slicehosts" rel="tag">slicehosts</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fix disappearing Compiz skydome at login</title>
		<link>http://inspirated.com/2011/12/11/fix-disappearing-compiz-skydome-at-login</link>
		<comments>http://inspirated.com/2011/12/11/fix-disappearing-compiz-skydome-at-login#comments</comments>
		<pubDate>Sun, 11 Dec 2011 08:49:17 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Compiz]]></category>
		<category><![CDATA[Cube]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Eye-candy]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Workaround]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=371</guid>
		<description><![CDATA[For a little while now I noticed that my Compiz skydome was disappearing whenever I logged in. I could bring it back by disabling and re-enabling the Cube plugin but from a cold-boot I was always greeted to an abysmal looking cube: (Click on the thumbnail for larger version.) A little bit of forensics revealed [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>For a little while now I noticed that my Compiz skydome was disappearing whenever I logged in. I could bring it back by disabling and re-enabling the Cube plugin but from a cold-boot I was always greeted to an abysmal looking cube:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/skydome-blank.png"><img src="http://inspirated.com/uploads/skydome-blank-thumb.jpg" alt="Compiz blank skydome" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>A little bit of forensics revealed that the issue lied with the loading order of Compiz plugins. At the moment Compiz does not try to resolve any plugin dependencies at startup, so while the skydome relied on the PNG plugin the latter wasn&#8217;t pre-loaded &#8212; resulting in a blank background.</p>
<p>The solution was to change the following line in config:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>core<span style="">&#93;</span></span>
<span style="color: #000099;">s0_active_plugins</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> core</span><span style="color: #666666; font-style: italic;">;composite;opengl;copytex;decor;vpswitch;mousepoll;firepaint;gnomecompat;resize;compiztoolbox;wobbly;cube;screensaver;shift;scale;regex;imgpng;splash;place;move;obs;animation;rotate;expo;workarounds;freewins;ezoom;session;staticswitcher;</span></pre></td></tr></table></div>

<p>To:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>core<span style="">&#93;</span></span>
<span style="color: #000099;">s0_active_plugins</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> core</span><span style="color: #666666; font-style: italic;">;composite;opengl;copytex;decor;vpswitch;mousepoll;firepaint;gnomecompat;imgpng;resize;compiztoolbox;wobbly;cube;screensaver;shift;scale;regex;splash;place;move;obs;animation;rotate;expo;workarounds;freewins;ezoom;session;staticswitcher;</span></pre></td></tr></table></div>

<p><code>imgpng</code> had to be loaded before <code>cube</code>, giving me back the pretty backdrop for all things 3D:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/skydome-drops.png"><img src="http://inspirated.com/uploads/skydome-drops-thumb.jpg" alt="Compiz PNG skydome" /></a><br />
(Click on the thumbnail for larger version.)</p>
<div class="shr-publisher-371"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/12/11/fix-disappearing-compiz-skydome-at-login">Permalink</a> |
<a href="http://inspirated.com/2011/12/11/fix-disappearing-compiz-skydome-at-login#comments">One comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/compiz" rel="tag">Compiz</a>, <a href="http://inspirated.com/tag/cube" rel="tag">Cube</a>, <a href="http://inspirated.com/tag/desktop" rel="tag">Desktop</a>, <a href="http://inspirated.com/tag/eye-candy" rel="tag">Eye-candy</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a>, <a href="http://inspirated.com/tag/workaround" rel="tag">Workaround</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/12/11/fix-disappearing-compiz-skydome-at-login/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Useless domains, Dynamic DNS and Netgear</title>
		<link>http://inspirated.com/2011/11/16/useless-domains-dynamic-dns-and-netgear</link>
		<comments>http://inspirated.com/2011/11/16/useless-domains-dynamic-dns-and-netgear#comments</comments>
		<pubDate>Wed, 16 Nov 2011 15:06:52 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Dynamic DNS]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[Netgear]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=369</guid>
		<description><![CDATA[A few weeks back I was renewing this blog&#8217;s domain name when I was given a coupon code which would grant me a 20%+ discount for orders >75 USD. Now my order was only touching 70, so grabbing a calculator and dutifully acting like a white-collar citizen made me realize that if I ordered another [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>A few weeks back I was renewing this blog&#8217;s domain name when I was given a coupon code which would grant me a 20%+ discount for orders >75 USD. Now my order was only touching 70, so grabbing a calculator and dutifully acting like a white-collar citizen made me realize that if I ordered another domain my total order would actually cost me <em>lesser</em> than what I already had. Classic case of &#8220;more is less&#8221; &#8212; I ended up with another domain and a total lack of ideas about what to do with it.</p>
<p>Until, I remembered about this picture from 2 years ago:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/the-three-musketeers.jpg"><img src="http://inspirated.com/uploads/the-three-musketeers-thumb.jpg" alt="The Three Musketeers" /></a><br />
&#8220;Say hello to my little friend!&#8221;<br />
(Click on the thumbnail for larger version.)</p>
<p>The ineffectual Eee PC finally found some practical use. Using Dynamic DNS to point <a href="http://expirated.com/">expirated.com</a> towards it, I configured lighttpd to serve the website. As for the content I wrote a few Python scripts to monitor the status of the Tor relay and internet connection at my home. Still not terribly useful, but at least the plots for latter give me a nice idea about how my internet is doing when I&#8217;m not at home.</p>
<p>The internet router (Netgear DG834) did not support SSH/SCP so I used Python&#8217;s <code>telnetlib</code> module to log in to the router and bring back the modem stats. The results are then fed to a maze of regexes, generating values which are finally plotted via matplotlib.</p>
<p>How I wish I had better things to do with a domain name.</p>
<div class="shr-publisher-369"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/11/16/useless-domains-dynamic-dns-and-netgear">Permalink</a> |
<a href="http://inspirated.com/2011/11/16/useless-domains-dynamic-dns-and-netgear#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/dns" rel="tag">DNS</a>, <a href="http://inspirated.com/tag/dynamic-dns" rel="tag">Dynamic DNS</a>, <a href="http://inspirated.com/tag/lighttpd" rel="tag">lighttpd</a>, <a href="http://inspirated.com/tag/netgear" rel="tag">Netgear</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/rants" rel="tag">Rants</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/11/16/useless-domains-dynamic-dns-and-netgear/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Summer of Code 2011 Memorabilia</title>
		<link>http://inspirated.com/2011/10/15/google-summer-of-code-2011-memorabilia</link>
		<comments>http://inspirated.com/2011/10/15/google-summer-of-code-2011-memorabilia#comments</comments>
		<pubDate>Fri, 14 Oct 2011 21:14:18 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[T-Shirts]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=368</guid>
		<description><![CDATA[I love code, I love cotton &#8230; : (Click on the thumbnail for larger version.) &#8230; as much as I loved them last year: (Click on the thumbnail for larger version.) Permalink &#124; 2 comments Post tags: EFF, Google, GSoC, Open Source, Rants, Summer of Code, T-Shirts]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I love code, I love cotton &#8230; :</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/GSoC-11-Memorabilia.jpg"><img src="http://inspirated.com/uploads/GSoC-11-Memorabilia-thumb.jpg" alt="GSoC 2011 Memorabilia" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>&#8230; as much as I loved them last year:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/GSoC-10-11-Memorabilia.jpg"><img src="http://inspirated.com/uploads/GSoC-10-11-Memorabilia-thumb.jpg" alt="GSoC 2010 &#038; 2011 Memorabilia" /></a><br />
(Click on the thumbnail for larger version.)</p>
<div class="shr-publisher-368"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/10/15/google-summer-of-code-2011-memorabilia">Permalink</a> |
<a href="http://inspirated.com/2011/10/15/google-summer-of-code-2011-memorabilia#comments">2 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/rants" rel="tag">Rants</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/t-shirts" rel="tag">T-Shirts</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/10/15/google-summer-of-code-2011-memorabilia/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BBC World Have Your Say: The death of Steve Jobs</title>
		<link>http://inspirated.com/2011/10/08/bbc-world-have-your-say-the-death-of-steve-jobs</link>
		<comments>http://inspirated.com/2011/10/08/bbc-world-have-your-say-the-death-of-steve-jobs#comments</comments>
		<pubDate>Fri, 07 Oct 2011 21:15:53 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Steve Jobs]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[World Have Your Say]]></category>
		<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=367</guid>
		<description><![CDATA[I recall three distinct things about my visit to BBC&#8217;s Islamabad Studios today. Kamil&#8217;s very friendly support (he kept reassuring me that everyone gets nervous for their first live appearance on television), a minor car accident right beneath the balcony I was standing in and prevalent general confusion about what to do with my hands [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I recall three distinct things about my visit to BBC&#8217;s Islamabad Studios today. Kamil&#8217;s very friendly support (he kept reassuring me that everyone gets nervous for their first live appearance on television), a minor car accident right beneath the balcony I was standing in and prevalent general confusion about what to do with my <em>hands</em> when I&#8217;m on air (I wasn&#8217;t sure if they were on screen so couldn&#8217;t decide whether to stuff them in my pockets or not). In any case, it was ultra fun:</p>
<div style="text-align:center"><object type="application/x-shockwave-flash" style="width: 425px; height: 350px;" data="http://www.youtube.com/v/RKfZ-5RAOos?version=3&#038;start=1576"><param name="movie" value="http://www.youtube.com/v/RKfZ-5RAOos?version=3&#038;start=1576"></param></object></div>
<div class="shr-publisher-367"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/10/08/bbc-world-have-your-say-the-death-of-steve-jobs">Permalink</a> |
<a href="http://inspirated.com/2011/10/08/bbc-world-have-your-say-the-death-of-steve-jobs#comments">8 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/apple" rel="tag">Apple</a>, <a href="http://inspirated.com/tag/bbc" rel="tag">BBC</a>, <a href="http://inspirated.com/tag/internet" rel="tag">Internet</a>, <a href="http://inspirated.com/tag/rants" rel="tag">Rants</a>, <a href="http://inspirated.com/tag/steve-jobs" rel="tag">Steve Jobs</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a>, <a href="http://inspirated.com/tag/video" rel="tag">Video</a>, <a href="http://inspirated.com/tag/world-have-your-say" rel="tag">World Have Your Say</a>, <a href="http://inspirated.com/tag/youtube" rel="tag">Youtube</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/10/08/bbc-world-have-your-say-the-death-of-steve-jobs/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Summing up Google Summer of Code 2011</title>
		<link>http://inspirated.com/2011/10/04/summing-up-gsoc-2011</link>
		<comments>http://inspirated.com/2011/10/04/summing-up-gsoc-2011#comments</comments>
		<pubDate>Tue, 04 Oct 2011 07:32:49 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>
		<category><![CDATA[Vidalia]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=363</guid>
		<description><![CDATA[Due to a number of commitments which I had pinned back during the summer for GSoC I was unable to attend much to the Internet over the past few weeks. Now that I&#8217;m back a summary of this year&#8217;s coding festival is in order: The Program This year I was working with Electronic Frontier Foundation/The [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Due to a number of commitments which I had pinned back during the summer for GSoC I was unable to attend much to the Internet over the past few weeks. Now that I&#8217;m back a summary of this year&#8217;s coding festival is in order:</p>
<h3>The Program</h3>
<p>This year I was working with Electronic Frontier Foundation/<a href="http://www.torproject.org/">The Tor Project</a> for improving the Anonymizing Relay Monitor (arm). The original proposal can be downloaded from <a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">this link</a> are accessed via a browser at <a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>. However, do note that not all of the goals from the proposal were met. Some were modified, some were removed altogether while some new ones were added &#8212; the details of which I&#8217;ll be explaining in the following sections.</p>
<p>Overall the program has been an extraordinarily enjoyable and learning experience for me. My involvement with Ubuntu last year had already taught me how invaluable it is to merge with your mentoring organizing&#8217;s developer community. This year most of my collaboration took place in <code>#tor-dev</code> on OFTC. Many times when I was stuck or heading towards an improper direction with my code the core Tor developers helped me and provided advice for design decisions as well as general guidance about the way things work in Tor. It wasn&#8217;t only a privilege to be helped by such rockstars, but was also vital as I can see in hindsight how disastrous it would have been if I had attempted to work through the program entirely on my own.</p>
<p>A <em>huge</em> thanks goes to my mentor <a href="http://www.atagar.com/">Damian</a>. Most of the credit for making this program an enjoyable and stimulating experience for me goes directly to him. He has one of the best combinations of code-people skills among people I&#8217;ve known. I would&#8217;ve loved meeting him and the Tor community in PETS &#8217;11 but couldn&#8217;t travel due to some paperwork fiasco which was entirely a result of my slothful attitude towards anything involving government offices. Nevertheless, I do hope to meet the guys next year in PETS &#8217;12.</p>
<h3>The Code</h3>
<p>In order to not sound repetitious, I&#8217;ll provide a quick summary of the milestones while linking to the posts which explain them in detail:</p>
<h4>Menus for arm CLI</h4>
<p>My first task was to <a href="http://inspirated.com/2011/06/01/summer-of-code-progress-cursing-with-python">add dropdown menus</a> for the curses interface to arm. Even though the menus were replaced by Damian&#8217;s rewrite, they went a long way in helping me assimilate myself with the arm codebase:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-menus.png"><img src="http://inspirated.com/uploads/arm-menus-thumb.jpg" alt="Drop-down menus for arm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<h4>Graphs and logs for arm GUI</h4>
<p>GTK+ was chosen as the toolkit for developing the arm GUI prototype. While GTK+ has its own disadvantages when compared to Qt (platform portability &#8212; or the lack thereof &#8212; being the foremost), it fared well in light-weight Unix environment such as Live CDs (e.g., <a href="http://tails.boum.org/">Tails</a>). <a href="http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid">Bandwidth graphs and logs</a> for various arm events were added to the prototype:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-cli.png"><img src="http://inspirated.com/uploads/arm-bwstats-cli-thumb.jpg" alt="CLI bandwidth stats for arm" /></a></p>
<p style="text-align: center; font-size: x-small"><img src="http://inspirated.com/uploads/down-arrow.jpg" alt="Down arrow" /></p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-gui.png"><img src="http://inspirated.com/uploads/arm-bwstats-gui-thumb.jpg" alt="GUI bandwidth stats for arm" /></a><br />
(Click on the thumbnails for larger version.)</p>
<h4>Connections and general stats for arm GUI</h4>
<p><a href="http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1">Moving on with the GUI</a>, next up was to improve its conformity with the rest of the user&#8217;s desktop:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-graphs.png"><img src="http://inspirated.com/uploads/garm-0.1-graphs-thumb.jpg" alt="Graphs panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>And then re-use arm&#8217;s CLI connection resolvers in order to display stats about Tor circuits and control connections:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-conn.png"><img src="http://inspirated.com/uploads/garm-0.1-conn-thumb.jpg" alt="Connections panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>A small addition was migration of the &#8220;sticky&#8221; panel from CLI which was moved under a &#8220;General&#8221; tab and provided miscellaneous info about Tor and arm:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-general.png"><img src="http://inspirated.com/uploads/garm-0.1-general-thumb.jpg" alt="General panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<h4>Configuration panel for GUI</h4>
<p>Another important panel in the arm CLI was its configuration interface which provided a nice and documented approach to altering Tor&#8217;s settings. It was <a href="http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration">migrated to GUI</a> with nice dialogs for validating user input:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-config.png"><img src="http://inspirated.com/uploads/garm-config-thumb.jpg" alt="Configuration panel for garm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Along with the configuration panel a few patches to Tor and Vidalia were developed which would allow arm to be notified of changes made by an external program via a <code>CONF_CHANGED</code> event. The support for <code>CONF_CHANGED</code> still isn&#8217;t solid in all Tor controllers yet which I plan on addressing in coming months.</p>
<h4>Exit node selector for arm CLI &#038; GUI</h4>
<p>A popular feature request among Tor users was to be able to select the country for their exit nodes. While I initially planned on providing them more fine-grained control over their circuits (such as path length), Tor developers advised against it and hence the selection was limited to the exit-node&#8217;s locale:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-exitnode-selector.png"><img src="http://inspirated.com/uploads/garm-exitnode-selector-thumb.jpg" alt="Exit node selector for garm" /></a><br />
<a href="http://inspirated.com/uploads/arm-exitnode-selector.png"><img src="http://inspirated.com/uploads/arm-exitnode-selector-thumb.jpg" alt="Exit node selector for arm" /></a><br />
(Click on the thumbnails for larger version.)</p>
<h3>The Nutshell</h3>
<blockquote><p>&#8220;It goes on forever &#8212; and &#8212; oh my God &#8212; it&#8217;s full of stars!&#8221;</p></blockquote>
<p>It&#8217;s just that awesome, seriously. Stars from the FLOSS strata gather around and help inexperienced and aspiring developers all over the globe for two months in order to bring more code and &#8212; more importantly &#8212; more people to the open-source world. The experience with GSoC not only helps me in general open-source development, but also proves to be <em>priceless</em> at my workplace for my research in software defined networks. If you&#8217;re even remotely interested in open-source do keep an eye on the <a href="http://code.google.com/soc/">program&#8217;s website</a> for future updates.</p>
<div class="shr-publisher-363"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/10/04/summing-up-gsoc-2011">Permalink</a> |
<a href="http://inspirated.com/2011/10/04/summing-up-gsoc-2011#comments">One comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a>, <a href="http://inspirated.com/tag/vidalia" rel="tag">Vidalia</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/10/04/summing-up-gsoc-2011/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: Exit node selection</title>
		<link>http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection</link>
		<comments>http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection#comments</comments>
		<pubDate>Sun, 04 Sep 2011 08:49:02 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=361</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log The final weeks of GSoC 2011 were spent by me working on exit node selection for Tor users. The GUI controller can now be used to define a list of countries, after which only those [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<p>The final weeks of GSoC 2011 were spent by me working on exit node selection for Tor users. The GUI controller can now be used to define a list of countries, after which only those exit nodes shall be used which lie in one of the specified territories:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-exitnode-selector.png"><img src="http://inspirated.com/uploads/garm-exitnode-selector-thumb.jpg" alt="Exit node selector for garm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>For the CLI, Damian decided that the general use case for exit node selection is specification of a <em>single</em> country so pressing &#8216;E&#8217; in the connections panel brings up a list from which one can be chosen:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-exitnode-selector.png"><img src="http://inspirated.com/uploads/arm-exitnode-selector-thumb.jpg" alt="Exit node selector for arm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Please note that the exit node restriction works only for circuits built <em>after</em> the selection. Therefore it might be a good idea to send a <code>NEWNYM</code> to Tor after specifying the countries &#8212; which you&#8217;ll have to do manually for the time being until I add the feature to (g)arm controllers.</p>
<p>In my next post I&#8217;ll cover a summary of my involvement with GSoC this year, that is, after I finish with the regular chores of code submission etc.</p>
<div class="shr-publisher-361"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection">Permalink</a> |
<a href="http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tarball generator for Git commits</title>
		<link>http://inspirated.com/2011/08/23/tarball-generator-for-git-commits</link>
		<comments>http://inspirated.com/2011/08/23/tarball-generator-for-git-commits#comments</comments>
		<pubDate>Mon, 22 Aug 2011 19:56:31 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Summer of Code]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=359</guid>
		<description><![CDATA[While working for GSoC last year I kept track of Bazaar patches I sent in for Arsenal. This year I was using Git and as the need arose to generate a submission tarball for my commits I wrote this small utility script: git-generate-tarball.py. To invoke the script, change into your Git repository and provide an [...]]]></description>
				<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>While working for GSoC last year I kept track of Bazaar patches I sent in for Arsenal. This year I was using Git and as the need arose to generate a submission tarball for my commits I wrote this small utility script: <a href="http://inspirated.com/uploads/git-generate-tarball.tar.gz">git-generate-tarball.py</a>.</p>
<p>To invoke the script, change into your Git repository and provide an author name and a file as an argument:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc tor<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>tor-gsoc-krkhan.tar.gz</pre></td></tr></table></div>

<blockquote><p>generating tarball for commits between Mon May 23 00:00:00 2011 +0000 and Mon Aug 22 19:00:00 2011 +0000<br />
generating patch for commit 5a801a8c8b71c9551a80913398135809cb10cecd<br />
&#8230;<br />
/home/krkhan/Downloads/tor-gsoc-krkhan.tar.gz created
</p></blockquote>
<p>The default starting and ending dates for the commits correspond to the schedule for GSoC 2011. You can specify a starting date for the commits you want to be packaged using the <code>--since</code> argument:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc arm<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #660033;">--since</span>=<span style="color: #ff0000;">&quot;August 1, 2011&quot;</span> <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>arm-gsoc-krkhan.tar.bz2</pre></td></tr></table></div>

<blockquote><p>generating tarball for commits between August 1, 2011 and Mon Aug 22 19:00:00 2011 +0000<br />
generating patch for commit 546ca73259d7863e3efe5e11e09c023c2790a2f6<br />
&#8230;<br />
/home/krkhan/Downloads/arm-gsoc-krkhan.tar.bz2 created</p></blockquote>
<p>Same goes for the <code>--before</code> argument:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc tor<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #660033;">--before</span>=<span style="color: #ff0000;">&quot;August 14, 2011&quot;</span> <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>tor-gsoc-krkhan.tar.gz</pre></td></tr></table></div>

<blockquote><p>generating tarball for commits between Mon May 23 00:00:00 2011 +0000 and August 14, 2011<br />
generating patch for commit 5a801a8c8b71c9551a80913398135809cb10cecd<br />
&#8230;<br />
/home/krkhan/Downloads/tor-gsoc-krkhan.tar.gz created
</p></blockquote>
<p>Or a combination of both:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc arm<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #660033;">--since</span>=<span style="color: #ff0000;">&quot;August 1, 2011&quot;</span> <span style="color: #660033;">--before</span>=<span style="color: #ff0000;">&quot;August 14, 2011&quot;</span> <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>arm-gsoc-krkhan.tar.gz</pre></td></tr></table></div>

<blockquote><p>generating tarball for commits between August 1, 2011 and August 14, 2011<br />
generating patch for commit 546ca73259d7863e3efe5e11e09c023c2790a2f6<br />
&#8230;<br />
/home/krkhan/Downloads/arm-gsoc-krkhan.tar.gz created
</p></blockquote>
<p>If you want to leave the dates undefined you can leave the arguments empty. For example, the following command shall process <em>all</em> commits before June 1, 2011:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc arm<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #660033;">--since</span>= <span style="color: #660033;">--before</span>=<span style="color: #ff0000;">&quot;June 1, 2011&quot;</span> <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>arm-gsoc-krkhan.tar.gz</pre></td></tr></table></div>

<blockquote><p>generating tarball for commits before June 1, 2011<br />
generating patch for commit 8b4dc162f75d5129e41f028c7253b7b265c8af76<br />
&#8230;<br />
/home/krkhan/Downloads/arm-gsoc-krkhan.tar.gz created</p></blockquote>
<p>Hope this helps fellow GSoCers.</p>
<div class="shr-publisher-359"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/08/23/tarball-generator-for-git-commits">Permalink</a> |
<a href="http://inspirated.com/2011/08/23/tarball-generator-for-git-commits#comments">5 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/git" rel="tag">Git</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/08/23/tarball-generator-for-git-commits/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
