<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>international geographic</title>
	<atom:link href="http://www.chetanislazy.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chetanislazy.com/blog</link>
	<description>ooh, shiny!</description>
	<lastBuildDate>Fri, 23 Jul 2010 15:34:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Running mlocate on Mac OS X</title>
		<link>http://www.chetanislazy.com/blog/2010/06/25/running-mlocate-on-mac-os-x/</link>
		<comments>http://www.chetanislazy.com/blog/2010/06/25/running-mlocate-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 21:02:19 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[computers suck]]></category>
		<category><![CDATA[findutils]]></category>
		<category><![CDATA[mlocate]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=163</guid>
		<description><![CDATA[After suffering through yet another morning of &#8216;find&#8217; pegging my CPU and grinding my sad little laptop hard drive for a couple of hours, I finally decided to rectify the situation. Most Linux distributions these days ship mlocate by default, and so I decided to give it a go on OS X. Unfortunately, it doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>After suffering through yet another morning of &#8216;find&#8217; pegging my CPU and grinding my sad little laptop hard drive for a couple of hours, I finally decided to rectify the situation. Most Linux distributions these days ship <a href="http://carolina.mff.cuni.cz/~trmac/blog/mlocate/">mlocate</a> by default, and so I decided to give it a go on OS X. Unfortunately, it doesn&#8217;t quite support OS X out of the box yet. I&#8217;ll spare you all the miserable details (it was an epic struggle getting this compiled), but I finally managed to get it working. </p>
<p>Here&#8217;s how:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># first we get the source and patch it</span>
$ hg clone http:<span style="color: #000000; font-weight: bold;">//</span>hg.fedorahosted.org<span style="color: #000000; font-weight: bold;">/</span>hg<span style="color: #000000; font-weight: bold;">/</span>mlocate
$ <span style="color: #7a0874; font-weight: bold;">cd</span> mlocate
$ <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #ff0000;">'https://fedorahosted.org/mlocate/attachment/ticket/15/mlocate-mountlist-hg.2.diff?format=raw'</span> <span style="color: #660033;">-O</span> mlocate-mountlist-hg.2.diff
$ hg import mlocate-mountlist-hg.2.diff
&nbsp;
<span style="color: #666666; font-style: italic;"># prep</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..
$ git clone git:<span style="color: #000000; font-weight: bold;">//</span>git.savannah.gnu.org<span style="color: #000000; font-weight: bold;">/</span>gnulib.git
$ <span style="color: #7a0874; font-weight: bold;">cd</span> mlocate
$ ..<span style="color: #000000; font-weight: bold;">/</span>gnulib<span style="color: #000000; font-weight: bold;">/</span>gnulib-tool <span style="color: #660033;">--import</span>
$ <span style="color: #c20cb9; font-weight: bold;">mv</span> gnulib<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>stat-time.h~ gnulib<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>stat-time.h
$ <span style="color: #c20cb9; font-weight: bold;">cp</span> ..<span style="color: #000000; font-weight: bold;">/</span>gnulib<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>canonicalize.h gnulib<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>
$ autoreconf <span style="color: #660033;">--install</span> <span style="color: #660033;">--force</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># install</span>
$ .<span style="color: #000000; font-weight: bold;">/</span>configure
$ <span style="color: #c20cb9; font-weight: bold;">make</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Ok, now we have the binaries in place; we&#8217;re almost there! One last thing to do, and that&#8217;s create a new user account and group for mlocate. After running updatedb it will try to chown the locate db as the user &#8216;mlocate&#8217;, so we need to make sure this users exists. Unfortunately, there&#8217;s no adduser command in OS X and it&#8217;s a little bit of a pain, so I wrote this little <a href="http://gist.github.com/453339">script</a> to take care of it for you. Grab it <a href="http://gist.github.com/453339">here</a>.</p>
<p>Simply run it like so:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ adduser 
adduser<span style="color: #000000; font-weight: bold;">!</span>
&nbsp;
username: mlocate
home <span style="color: #c20cb9; font-weight: bold;">dir</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">default</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>empty<span style="color: #7a0874; font-weight: bold;">&#93;</span>: 
group <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">default</span>=<span style="color: #000000;">700</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
user <span style="color: #c20cb9; font-weight: bold;">id</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">default</span>=<span style="color: #000000;">700</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:
real name <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">default</span>=daemon<span style="color: #7a0874; font-weight: bold;">&#41;</span>: 
shell: <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">default</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">false</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:</pre></div></div>

<p>All done! Now let&#8217;s try updating the db -</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">updatedb</span></pre></div></div>

<p>And that should be it. I still ran into a couple of problems with permissions so your best bet is to fix them every time you run updatedb (just stick it in cron):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">664</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>mlocate<span style="color: #000000; font-weight: bold;">/</span>mlocate.db</pre></div></div>

<p>Now wasn&#8217;t that easy? </p>
<p>PS. If you don&#8217;t have Mercurial (hg) or Git installed, get them here:<br />
Mercurial: <a href="http://mercurial.selenic.com/">http://mercurial.selenic.com/</a><br />
Git: <a href="http://code.google.com/p/git-osx-installer/">http://code.google.com/p/git-osx-installer/</a></p>
<hr/>
<strong>Updated (July 23, 2010)</strong>: You may need newer versions of automake and autoconf as well. I had problems with 1.5 and 2.63 respectively but upgrading to 1.11 and 2.65 (with fink) worked fine. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2010/06/25/running-mlocate-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Launching srchmvn.com</title>
		<link>http://www.chetanislazy.com/blog/2010/03/30/launching-srchmvn/</link>
		<comments>http://www.chetanislazy.com/blog/2010/03/30/launching-srchmvn/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 03:06:13 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=147</guid>
		<description><![CDATA[Today I&#8217;m launching my latest personal project, srchmvn.com, to help Java developers find Maven artifacts. It&#8217;s also the first project I&#8217;ve finished* and released in a very long time.
The Problem
While Maven is, at it&#8217;s core, a build system, one of the most valuable features it offers is it&#8217;s centralized repository and transitive dependency management for [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m launching my latest personal project, <a href="http://srchmvn.com/">srchmvn.com</a>, to help Java developers find <a href="http://maven.apache.org/">Maven</a> artifacts. It&#8217;s also the first project I&#8217;ve finished* and released in a very long time.</p>
<h3>The Problem</h3>
<p>While Maven is, at it&#8217;s core, a build system, one of the most valuable features it offers is it&#8217;s centralized repository and transitive dependency management for your projects. You can simply include an artifact definition and Maven will, at build time, download and provide not only the selected artifact, but all it&#8217;s dependencies as well. </p>
<p>The problem is actually finding definitions for your artifacts, specifically when you already know the name of the library or project. You would think that a popular project like Spring would include this information somewhere on their <a href="http://www.springsource.org/download">download</a> page, but for some odd reason they don&#8217;t and neither do most other opensource projects. </p>
<h3>Existing attempts</h3>
<p>As it turns out, I&#8217;m not the only one with this problem; I found <a href="http://www.google.com/search?q=maven+repository+search">at least <strong>7</strong></a> different sites that try to solve it. All of them appear to have taken a similar approach and yet offer wildly different results. </p>
<p>As a test, try searching for &#8220;struts&#8221; on each of them and see if you can locate the correct artifact id for the latest version. </p>
<p>Were you able to find Struts 2.1.8.1? I wasn&#8217;t.</p>
<h3>My Solution</h3>
<p>Enter <a href="http://srchmvn.com/">srchmvn.com</a>, my attempt at building a search engine for Maven artifacts. With srchmvn I offer two key improvements over existing solutions: a clean, speedy interface and an improved search algorithm. Specifically, rather than relying solely on a simple keyword search, I also take into account a given artifact&#8217;s &#8220;popularity&#8221; in much the same way that Google determines Page Rank. In this case, I&#8217;m using Maven&#8217;s own dependency system to determine which artifacts are referenced more often than others. </p>
<p>Now let&#8217;s <a href="http://srchmvn.com/struts">try that search again</a>, shall we? </p>
<p>Ah, much better. Exactly what I was looking for. The latest versions of both Struts 1.x and 2.x in the top 3 results, followed by several other popular artifacts.</p>
<h3>Fun Bits</h3>
<p>Other than scratching an itch I&#8217;ve had for the last couple projects I&#8217;ve worked on, building srchmvn gave me a chance to play with things I generally haven&#8217;t had a chance to use at work, like Rails 3 beta, nginx, Capistrano, and jquery. </p>
<p>I&#8217;ve had a love/hate relationship with Rails over the years and I was hoping to find out if any of the &#8220;hates&#8221; had been addressed in this latest version. I can&#8217;t say I&#8217;ve done much more than simply kick the tires on this thing, but so far I&#8217;m not blown away. The rails team has done a remarkable job in refactoring the monolithic codebase that rails had grown into, but my biggest complaint has always been the use of [generally] undocumented &#8220;magic&#8221; behaviors, and they&#8217;re still here, for better or worse. </p>
<p>Surprisingly, the area that gave me the most trouble, and where I spent the most time, was in trying to correctly parse the Maven project (POM) files. Of course, anyone who has ever had to write or maintain one will know exactly why that is&#8230; :-)</p>
<h3>*Not Quite Finished</h3>
<p>Ok, so it&#8217;s not quite finished. I have a few ideas on ways to improve various bits of the app, but more than anything, I&#8217;d appreciate some feedback. I&#8217;ve so far been able to quickly find every artifact I&#8217;ve thrown at it, but if you happen to find some cases where you get weird results, please let me know. I&#8217;ve got some ideas on improving the search as well, but unless I see a need to tinker with it, it probably won&#8217;t be changing for now. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2010/03/30/launching-srchmvn/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using MySQL with JRuby</title>
		<link>http://www.chetanislazy.com/blog/2010/02/23/using-mysql-with-jruby/</link>
		<comments>http://www.chetanislazy.com/blog/2010/02/23/using-mysql-with-jruby/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 01:35:02 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=139</guid>
		<description><![CDATA[For some reason, I had a relatively hard time finding this info all in one spot, so here it is:
Using MySQL with JRuby is actually pretty easy (and no annoying arch issues on OS X! :-)
Install GEMs (DBI, JDBC driver, DBI adapter):

$ jgem install dbi jdbc-mysql dbd-jdbc

Then use it!

require 'dbi'
require 'jdbc/mysql'
dbh = DBI.connect&#40;'dbi:jdbc:mysql://localhost:3306/test', 'root', '', [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason, I had a relatively hard time finding this info all in one spot, so here it is:</p>
<p>Using MySQL with JRuby is actually pretty easy (and no annoying arch issues on OS X! :-)</p>
<p>Install GEMs (DBI, JDBC driver, DBI adapter):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ jgem install dbi jdbc-mysql dbd-jdbc</pre></div></div>

<p>Then use it!</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'dbi'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'jdbc/mysql'</span>
dbh = DBI.<span style="color:#9900CC;">connect</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'dbi:jdbc:mysql://localhost:3306/test'</span>, <span style="color:#996600;">'root'</span>, <span style="color:#996600;">''</span>, 
                  <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">&quot;driver&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;com.mysql.jdbc.Driver&quot;</span> <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2010/02/23/using-mysql-with-jruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hooking app exit in Firefox extensions</title>
		<link>http://www.chetanislazy.com/blog/2010/02/10/hooking-app-exit-in-firefox-extensions/</link>
		<comments>http://www.chetanislazy.com/blog/2010/02/10/hooking-app-exit-in-firefox-extensions/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 23:44:16 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=126</guid>
		<description><![CDATA[I&#8217;ve spent the last few days since joining Better Advertising working on a new feature for a Firefox extension called Ghostery. We&#8217;ll be announcing the new feature soon, but until then I thought I&#8217;d share some of what I&#8217;ve learned so far. 
I&#8217;ve never worked on an extension before but as it turns out, it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the last few days since joining <a href="http://www.betteradvertising.com/">Better Advertising</a> working on a new feature for a Firefox extension called <a href="http://www.ghostery.com/">Ghostery</a>. We&#8217;ll be announcing the new feature soon, but until then I thought I&#8217;d share some of what I&#8217;ve learned so far. </p>
<p>I&#8217;ve never worked on an extension before but as it turns out, it&#8217;s really quite easy to pick up; some fairly simple XML (aka XUL) for composing the UI and JavaScript for the rest. One of the trickier bits has to do with scope. After doing some testing I figured out that the entry point into an extension is via the browser window; that is, your extension code will be executed each time you open a new window and that means that all your code is basically scoped to a single window. </p>
<p>In developing the new Ghostery feature I needed a way to run some code when the user quits Firefox. Luckily, the extension architecture is extremely flexible (if poorly documented at times) and I didn&#8217;t have to jump through any hoops to do it. Almost anything, it seems can be either chained or hooked in some way. In this case, the <a href="https://developer.mozilla.org/en/NsIObserverService">nsIObserverService</a> gives us access to the necessary <a href="https://developer.mozilla.org/en/Observer_Notifications">shutdown</a> event to which we can attach an observer using a simple interface. </p>
<p>The problem, then, was that since our code is run every time a new window is created, I needed a way to register the hook only once to avoid firing multiple times on exit. My first thought was to try to register the hook outside of the window scope (e.g. using a different chrome overlay) but that appeared to be a dead end. Using a globally scoped variable as a lock was also a dead end. In the end I settled on something I already knew how to use: preferences. Essentially, I created a simple lock around a preference variable which, while I don&#8217;t need to store it between sessions, is in fact a global storage area that can be accessed from different windows. </p>
<p>Check out the code below for an example implementation. I left out the actual <a href="https://developer.mozilla.org/en/Code_snippets/Preferences">preferences</a> code since it&#8217;s not crucial to understanding the solution.</p>
<p><script src="http://gist.github.com/300959.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2010/02/10/hooking-app-exit-in-firefox-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best concerts of 2009</title>
		<link>http://www.chetanislazy.com/blog/2009/12/31/best-concerts-of-2009/</link>
		<comments>http://www.chetanislazy.com/blog/2009/12/31/best-concerts-of-2009/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 05:02:09 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[music]]></category>
		<category><![CDATA[best of]]></category>
		<category><![CDATA[lollapalooza]]></category>
		<category><![CDATA[newport]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=113</guid>
		<description><![CDATA[
This year was something of an anomaly for me: I only went to five shows. Two of those shows, however, were music festivals and easily made up for the otherwise quiet concert calendar &#8212; Lollapalooza with a staggering 35 shows in three days and the Newport Folk Festival with another 6.
I also went to 3 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://chetanislazy.com/images/blog/mattkim.jpg" /></p>
<p>This year was something of an anomaly for me: I only went to <strong>five</strong> shows. Two of those shows, however, were music festivals and easily made up for the otherwise quiet concert calendar &#8212; Lollapalooza with a staggering <strong>35 shows</strong> in <em>three</em> days and the Newport Folk Festival with another 6.</p>
<p>I also went to 3 free shows at Madison Square Park: Jonatha Brooke, Raul Malo, and the John Scofield Trio. I&#8217;m a huge fan of Raul Malo and the Mavericks so we ended up braving some of the worst rain of the summer to see him. It rained through most of his shortened set, but it was still worth it.<br />
<span id="more-113"></span><br />
With so few real shows this year they all made the list, but here they are in order:</p>
<ol>
<li>Matt &#038; Kim &#8211; at the Music Hall of Williamsburg</li>
<li>The Thermals &#8211; at Bowery Ballroom (my favorite venue)</li>
<li>Warren G &#8211; at the Music Hall of Williamsburg</li>
<li>Raul Malo &#8211; in the rain at MadSqPark</li>
<li>Jonatha Brooke &#8211; at MadSqPark</li>
<li>The John Scofield Trio &#8211; at MadSqPark</li>
</ol>
<h3>Lollapalooza</h3>
<p>The name of the game at lolla was coverage: we tried to see as many shows as humanly possible with the size of the venue, the crowds and the weather (from soaking rain to blazing heat) all working against us. Some shows we stopped at were simply on the way to a must-see show, while others we went to because they were starting on a nearby stage. All in all, we saw a ton of great shows, but these were the best:</p>
<ol>
<li>Dan Deacon &#8211; I&#8217;m actually not a very big fan of his [albums], but his live set was just amazing</li>
<li>Passion Pit</li>
<li>Depeche Mode</li>
<li>Lykke Li &#8211; another surprisingly great set</li>
</ol>
<p>Full list of shows:</p>
<h3>Lollapalooza</h3>
<h4>DAY 1:</h4>
<p>Heartless Bastards<br />
Thievery Corporation<br />
Peter Bjorn &#038; John<br />
Depeche Mode</p>
<h4>DAY 2:</h4>
<p>Miike Snow<br />
Ida Maria<br />
Los Campesinos!<br />
Joe Pug<br />
Carebears on Fire<br />
Gomez<br />
Coheed and Cambria<br />
No Age<br />
Glasvegas<br />
Lykke Li<br />
Animal Collective<br />
Tool<br />
Yeah Yeah Yeahs</p>
<h4>DAY 3:</h4>
<p>Friendly Fires<br />
Portugal. The Man<br />
Car Stereo Wars<br />
The Greencards<br />
The Kaiser Chiefs<br />
He Say, She Say<br />
Neon Hitch<br />
Gang Gang Dance<br />
Dan Deacon<br />
Vampire Weekend<br />
Passion Pit<br />
Cold War Kids<br />
Deerhunter<br />
MSTRKRFT<br />
Band of Horses<br />
Jane&#8217;s Addiction<br />
Deadmau5<br />
The Killers</p>
<h3>Newport Folk Festival</h3>
<p>Ramblin&#8217; Jack Elliot<br />
Ben Kweller<br />
The Avett Brothers<br />
Gillian Welch<br />
Fleet Foxes<br />
The Decemberists</p>
<p>They were all great shows at Newport, but the main stage was just too crowded by the time we arrived and the sound was sorely lacking at the further reaches of the field. We ended up sitting on the grass at just about the furthest possible point from the stage, save for the boats just off shore, on the only patch of grass that was not yet covered by blankets.  </p>
<p>We had a terrific time, but the shows we caught on the smaller tented stages were far better, so I have to give the best in show prize here to Ben Kweller, whom I&#8217;m a big fan of. We also caught the last couple songs of Ramblin&#8217; Jack&#8217;s set, which was just amazing. We even got to sing him happy birthday as he was celebrating his 78th birthday at the festival. </p>
<p>The weather was beautiful and it turned out to be a perfect day for outdoor music. What the shows lacked, the weather and the scenery more than made up for. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2009/12/31/best-concerts-of-2009/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Best music of 2009</title>
		<link>http://www.chetanislazy.com/blog/2009/12/31/best-music-of-2009/</link>
		<comments>http://www.chetanislazy.com/blog/2009/12/31/best-music-of-2009/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 05:01:26 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[music]]></category>
		<category><![CDATA[best of]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=96</guid>
		<description><![CDATA[I&#8217;ve been procrastinating publishing this latest post for several weeks now. I&#8217;ve had ample time to write it; that&#8217;s not the problem at all. No, I simply find it painfully, frustratingly difficult to narrow my collection down to only a handful of records, especially in a year with so many fantastic releases to choose from.

I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been procrastinating publishing this latest post for several weeks now. I&#8217;ve had ample time to write it; that&#8217;s not the problem at all. No, I simply find it painfully, frustratingly difficult to narrow my collection down to only a handful of records, especially in a year with so many fantastic releases to choose from.<br />
<span id="more-96"></span><br />
I began making a mental draft a couple of weeks ago and sketched out my initial list a week later. Since then I&#8217;ve revised it six or seven times (and grew the list from five spots to ten in the process), but I think I&#8217;ve finally locked it down. Here, then, are my picks for the 10 best albums of 2009 (sorted alphabetically):</p>
<ol>
<li>The Avett Brothers &#8211; I and Love and You</li>
<li>Black Joe Lewis &#038; The Honeybears &#8211; Tell &#8216;Em What Your Name Is!</li>
<li>Discovery &#8211; LP</li>
<li>Girls &#8211; Album</li>
<li>Monsters of Folk &#8211; Monsters of Folk</li>
<li>Passion Pit &#8211; Manners</li>
<li>Phoenix &#8211; Wolfgang Amadeus Phoenix</li>
<li>The Thermals &#8211; Now We Can See</li>
<li>Wilco &#8211; Wilco (the album)</li>
<li>The xx &#8211; xx</li>
</ol>
<p>A lot of the folk/rock influence comes from listening to NYC&#8217;s best music radio station, <a href="http://www.wfuv.org/">WFUV</a>, and indeed, four of my top 10 albums are also on the <a href="http://www.wfuv.org/music/best/bestof09.html">listener&#8217;s best of 2009 poll</a>. I&#8217;m actually a little surprised that Black Joe Lewis didn&#8217;t make it into their top 50, given how much they played it over the summer, but there&#8217;s still lots more great music on there. </p>
<p>Here&#8217;s some more of mine that didn&#8217;t make it the top 10 but were also in heavy rotation this year: </p>
<ul>
<li>Andrew Bird &#8211; Noble Beast</li>
<li>Bell X1 &#8211; Blue Lights on the Runway</li>
<li>Ben Kweller &#8211; Changing Horses</li>
<li>The BPA &#8211; I Think We&#8217;re Gonna Need a Bigger Boat</li>
<li>Camera Obscura &#8211; My Maudlin Career</li>
<li>The Decemberists &#8211; The Hazards of Love</li>
<li>Fanfarlo &#8211; Reservoir</li>
<li>Felice Brothers &#8211; Yonder is the Clock</li>
<li>Gomez &#8211; A New Tide</li>
<li>Grizzly Bear &#8211; Veckatimest</li>
<li>Heartless Bastards &#8211; the Mountain</li>
<li>The Low Anthem &#8211; Oh My God, Charlie Darwin</li>
<li>Miike Snow &#8211; Miike Snow</li>
<li>Mos Def &#8211; The Ecstatic</li>
<li>Röyksopp &#8211; Junior</li>
<li>Them Crooked Vultures &#8211; Them Crooked Vultures</li>
<li>Yeah Yeah Yeahs &#8211; It&#8217;s Blitz!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2009/12/31/best-music-of-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading the Mac Pro: Adding a 2nd GPU</title>
		<link>http://www.chetanislazy.com/blog/2009/12/16/upgrading-the-mac-pro-adding-a-2nd-gpu/</link>
		<comments>http://www.chetanislazy.com/blog/2009/12/16/upgrading-the-mac-pro-adding-a-2nd-gpu/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 04:42:17 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[computers suck]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[mac pro]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=95</guid>
		<description><![CDATA[tl;dr- Yes, you can add a 2nd GPU; OS X will ignore it; Windows will use it. Make sure to disable the card in the 1st slot to use it for gaming.
Apple makes great hardware, there&#8217;s no doubt about it. However, occasionally they make decisions that not only boggle the mind but are completely infuriating. [...]]]></description>
			<content:encoded><![CDATA[<p><em>tl;dr- Yes, you <strong>can</strong> add a 2nd GPU; OS X will ignore it; Windows will use it. Make sure to disable the card in the 1st slot to use it for gaming.</em></p>
<p>Apple makes great hardware, there&#8217;s no doubt about it. However, occasionally they make decisions that not only boggle the mind but are completely infuriating. Like putting <a href="http://en.wikipedia.org/wiki/Mini-DVI">non-standard ports</a> on a laptop and charging twenty bucks for the proper adapter cable! </p>
<p>A similar problem I ran into recently is the issue of the graphics card in the Mac Pro: only specially branded &#8220;Mac-compatible&#8221; GPUs will work in OS X. What&#8217;s the problem with that you ask? Availability and pricing. </p>
<p><span id="more-95"></span></p>
<h3>Availability</h3>
<p>The current generation Mac Pro as of this writing offers a whopping <strong>two</strong> GPU options at the Apple store: the NVIDIA GeForce GT 120 512mb or the ATI Radeon HD 4870 512MB. I also managed to find and EVGA GeForce GTX 285 PCIe 1GB at a third-party retailer, bringing our total to three. Compare that with a whopping 380 PCIe x16 cards available right now on <a href="http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&#038;N=40000048%201069633099&#038;name=PCI%20Express%202.0%20x16&#038;ActiveSearchResult=True">Newegg</a>.</p>
<h3>Pricing</h3>
<p>This one should be pretty obvious if you&#8217;ve ever bought an Apple computer product: there is a steep markup on these specially branded cards. Where the Radeon HD 4870 costs about <a href="http://www.smalldog.com/product/73308">$349</a> a similar PC card costs about $150 and you get 1GB of memory to boot!</p>
<h3>Who cares?</h3>
<p>Ok, so upgrading the GPU is looking like it&#8217;s going to cost an arm and a leg for an OS X compatible part. Is it worth it? Truth is, it&#8217;s not. Gaming on the Mac is in a sad state of affairs with a severe shortage of available titles and when they <strong>do</strong> appear, it&#8217;s often long, long after the PC version (e.g., <a href="http://en.wikipedia.org/wiki/Call_of_Duty_4:_Modern_Warfare">CoD4: Modern Warfare</a> which suffered a delay of nearly 11 months). </p>
<p>So why all the fuss, then? Well, if you&#8217;re a Mac gamer, then you&#8217;re running Windows via Bootcamp to get your fix, like I am. </p>
<h3>Solution</h3>
<p>After much research, and some helpful replies to queries posted on the Apple community boards, I finally found my answer. A second &#8220;PC&#8221; GPU added to the Mac Pro will be safely ignored by OS X and properly recognized by Windows (see screenshots below). Just be sure to disable the original GPU in Windows once you&#8217;ve got the second card all setup or else you won&#8217;t be able to use it for gaming. </p>
<p>I still ran into one minor issue: the Mac Pro has a unique PCIe x16 power connector requiring, you guessed it, a special <a href="http://chetanislazy.com/images/blog/PCIe_cable.jpg" rel="lightbox[95]">Mac-only power cable</a>! Fortunately there are plenty of them <a href="http://shop.ebay.com/i.html?_nkw=pcie+power+cable+mac+pro">available on eBay</a> for under 20 bucks so you should still be able to pull off a rather &#8220;cheap&#8221; upgrade. </p>
<p><a href="http://chetanislazy.com/images/blog/MacOSX_2nd_GPU.png" rel="lightbox[95]"><img src="http://chetanislazy.com/images/blog/MacOSX_2nd_GPU.png" alt="Mac OS X with 2nd GPU" width="248" /></a> <a href="http://chetanislazy.com/images/blog/WinXP_2nd_GPU.png" rel="lightbox[95]"><img src="http://chetanislazy.com/images/blog/WinXP_2nd_GPU.png" alt="Windows XP with 2nd GPU" width="248" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2009/12/16/upgrading-the-mac-pro-adding-a-2nd-gpu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Classmates.com just earned a spot on my blacklist</title>
		<link>http://www.chetanislazy.com/blog/2009/07/23/classmates-blacklisted/</link>
		<comments>http://www.chetanislazy.com/blog/2009/07/23/classmates-blacklisted/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 20:02:14 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=93</guid>
		<description><![CDATA[Just fixed another longstanding pet peeve of mine: I finally added classmates.com and cmates.com to my email server&#8217;s blacklist. How these guys have managed to stay in business for so long is beyond. They don&#8217;t even try to hide the fact that they&#8217;re spammers. They even sign all their messages with a valid domain keys [...]]]></description>
			<content:encoded><![CDATA[<p>Just fixed another longstanding pet peeve of mine: I finally added classmates.com and cmates.com to my email server&#8217;s blacklist. How these guys have managed to stay in business for so long is beyond. They don&#8217;t even <em>try</em> to hide the fact that they&#8217;re spammers. They even sign all their messages with a valid domain keys signature!</p>
<pre>
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=classmates.com;
     s=prod20081009.key.pem; t=1248374724; bh=PH2W8/WWF0Eq5UeHS7xrebJL9l
     g=; h=Date:from:to:Subject:Mime-Version:Content-Type:Message-Id;
     b=IMICZJvpMfW9pEWFSGX9gnScTOsQb0sI3edRgw7jHekqAK8OuJoFkmGBYcLC8IhpD
     mnoepYufrgbzzCEUWiYwpqCNSJ7PkqiyDs5n9upo4qtyEa29vgv6rXb39vQ+FjymKV+
     E39Tuzsm2MuXTTO+e0C7LlOozzqnSfh30yovIOI=
</pre>
<p>Gotta love the sheer audacity of it.. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2009/07/23/classmates-blacklisted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing SquirrelMail&#8217;s weird reply behavior</title>
		<link>http://www.chetanislazy.com/blog/2009/07/23/fixing-squirrelmail-replies/</link>
		<comments>http://www.chetanislazy.com/blog/2009/07/23/fixing-squirrelmail-replies/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 18:00:44 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=92</guid>
		<description><![CDATA[After years of being annoyed by the fact that SquirrelMail, an otherwise fine product, doesn&#8217;t include the date and name of the sender when replying to emails like just about every other email client on the planet, I finally broke down and fixed it. Below is the simple 1 line patch against SquirrelMail 1.4.19. It [...]]]></description>
			<content:encoded><![CDATA[<p>After years of being annoyed by the fact that <a href="http://squirrelmail.org/">SquirrelMail</a>, an otherwise fine product, doesn&#8217;t include the date and name of the sender when replying to emails like just about every other email client on the planet, I finally broke down and fixed it. Below is the simple 1 line patch against SquirrelMail 1.4.19. It will most likely work on older 1.4.x versions  as well. </p>
<p><a href="http://www.pixelcop.org/~chetan/files/squirrelmail-1.4.19-reply_body.patch">Download patch</a> (squirrelmail-1.4.19-reply_body.patch)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">---</span> squirrelmail<span style="color: #339933;">-</span>1<span style="color: #339933;">.</span>4<span style="color: #339933;">.</span>19<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>compose<span style="color: #339933;">.</span>php	<span style="color: #cc66cc;">2009</span><span style="color: #339933;">-</span><span style="color: #208080;">05</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">14</span> <span style="color: #208080;">06</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">26</span><span style="color: #339933;">:</span><span style="color:#800080;">29.000000000</span> <span style="color: #339933;">+</span><span style="color: #208080;">0000</span>
<span style="color: #339933;">+++</span> squirrelmail<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>compose<span style="color: #339933;">.</span>php	<span style="color: #cc66cc;">2009</span><span style="color: #339933;">-</span><span style="color: #208080;">07</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">23</span> <span style="color: #cc66cc;">16</span><span style="color: #339933;">:</span><span style="color:#800080;">09</span><span style="color: #339933;">:</span><span style="color:#800080;">59.000000000</span> <span style="color: #339933;">+</span><span style="color: #208080;">0000</span>
<span style="color: #339933;">@@</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">856</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">7</span> <span style="color: #339933;">+</span><span style="color: #cc66cc;">856</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">7</span> <span style="color: #339933;">@@</span>
                 <span style="color: #000088;">$rewrap_body</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                 <span style="color: #000088;">$from</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$orig_header</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$orig_header</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$orig_header</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$orig_header</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from</span><span style="color: #339933;">;</span>
                 sqUnWordWrap<span style="color: #009900;">&#40;</span><span style="color: #000088;">$body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">-</span>                <span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #339933;">+</span>                <span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>On &quot;</span> <span style="color: #339933;">.</span> getLongDateString<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$orig_header</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">date</span><span style="color: #339933;">,</span> <span style="color: #000088;">$orig_header</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">date_unparsed</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; <span style="color: #006699; font-weight: bold;">{$send_to}</span> wrote:<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// MOD BY chetan</span>
                 <span style="color: #000088;">$cnt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rewrap_body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                 <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$cnt</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                     sqWordWrap<span style="color: #009900;">&#40;</span><span style="color: #000088;">$rewrap_body</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$editor_size</span><span style="color: #339933;">,</span> <span style="color: #000088;">$default_charset</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2009/07/23/fixing-squirrelmail-replies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Google Gears on Mac OS X</title>
		<link>http://www.chetanislazy.com/blog/2009/07/14/installing-google-gears-on-mac-os-x/</link>
		<comments>http://www.chetanislazy.com/blog/2009/07/14/installing-google-gears-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 04:09:55 +0000</pubDate>
		<dc:creator>chetan</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://www.chetanislazy.com/blog/?p=90</guid>
		<description><![CDATA[If you&#8217;re looking to install Google Gears on OS X, installation order can be somewhat important. The Safari version installs as a standard OS X browser plugin and will be picked up by all the browsers on your system. Sounds good, except that the Firefox version is actually a standard Firefox XPI extension and the [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking to install <a href="http://gears.google.com/">Google Gears</a> on OS X, installation order can be somewhat important. The Safari version installs as a standard OS X browser plugin and will be picked up by all the browsers on your system. Sounds good, except that the Firefox version is actually a standard Firefox XPI extension and the two will conflict &#8212; you actually won&#8217;t be able to install the XPI unless you first disable the plugin via the Tools > Add-ons > Plugins menu option. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.chetanislazy.com/blog/2009/07/14/installing-google-gears-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
