<?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>The House of Ding</title>
	
	<link>http://www.houseofding.com</link>
	<description>Technology, programming, design, and everything in-between.</description>
	<lastBuildDate>Fri, 30 Oct 2009 03:09:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/houseofding" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="houseofding" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Press enter to search.</title>
		<link>http://www.houseofding.com/2009/10/press-enter-to-search/</link>
		<comments>http://www.houseofding.com/2009/10/press-enter-to-search/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 03:09:04 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=250</guid>
		<description><![CDATA[It looks like Google has updated their search page again (second time in the past few months). This appears to the be most dramatic single change to the search page I can ever remember. It&#8217;s amazing how something so simple has room to be simplified even more. Pure usability. Love&#160;it. This also looks like the [...]]]></description>
			<content:encoded><![CDATA[<p>It looks like Google has updated their search page again (second time in the past few months). This appears to the be most dramatic single change to the search page I can ever remember. It&#8217;s amazing how something so simple has room to be simplified even more. Pure usability. Love&nbsp;it.</p>
<p>This also looks like the death of the &#8220;I&#8217;m feeling lucky&#8221; button. I never thought about it, but it cost Google quite a bit of advertising revenue—$110 million according to a 2007 <a href="http://marketplace.publicradio.org/display/web/2007/11/19/face_of_google/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://marketplace.publicradio.org/display/web/2007/11/19/face_of_google/');">Marketplace&nbsp;interview</a>.</p>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/WiHGNAGxhw4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/10/press-enter-to-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The night sky</title>
		<link>http://www.houseofding.com/2009/08/the-night-sky/</link>
		<comments>http://www.houseofding.com/2009/08/the-night-sky/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 21:40:31 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[astronomy]]></category>
		<category><![CDATA[cabin]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=242</guid>
		<description><![CDATA[It&#8217;s been so long since I stared for hours at a starry sky and realized how truly insignificant we are. The light pollution and distractions of the city make it difficult to appreciate what&#8217;s up there. This past weekend ‘Nes, some friends and I made a trip up to my family&#8217;s cabin to do just [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been so long since I stared for hours at a starry sky and realized how truly insignificant we are. The light pollution and distractions of the city make it difficult to appreciate what&#8217;s up there. This past weekend ‘Nes, some friends and I made a trip up to my family&#8217;s cabin to do just that—stare at the&nbsp;sky. </p>
<p>The weather was perfectly clear and uncharacteristically calm and I got the chance to take some long exposures of the stars (I&#8217;ve been wanting to do that for so long!). A few actually turned out&nbsp;decent:</p>
<p><a href="http://www.flickr.com/photos/84315541@N00/3851104766/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/84315541@N00/3851104766/');" title="A starry night at the cabin by cdinger, on Flickr"><img src="http://farm4.static.flickr.com/3442/3851104766_6f3123a328.jpg" width="500" height="333" alt="A starry night at the cabin" /></a><br />
Facing south; Milky Way visible through the center of the&nbsp;sky</p>
<p><a href="http://www.flickr.com/photos/84315541@N00/3851235362/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/84315541@N00/3851235362/');" title="Jupiter and the milky way by cdinger, on Flickr"><img src="http://farm4.static.flickr.com/3489/3851235362_bf6ff9153b.jpg" width="500" height="358" alt="Jupiter and the milky way" /></a><br />
South again at a wider-angle; Jupiter is that bright spot above the&nbsp;cabin</p>
<p><a href="http://www.flickr.com/photos/84315541@N00/3850310119/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/84315541@N00/3850310119/');" title="Stars over Lake Traverse by cdinger, on Flickr"><img src="http://farm4.static.flickr.com/3425/3850310119_07f3ac5ed0.jpg" width="500" height="327" alt="Stars over Lake Traverse" /></a><br />
Looking north over Lake Traverse; light pollution from a small&nbsp;town</p>
<p>We spent a lot of time looking through <a href="http://www.flickr.com/photos/28912335@N07/sets/72157614512429547/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.flickr.com/photos/28912335@N07/sets/72157614512429547/');">Jeff&#8217;s telescope</a> and imagers (I&#8217;m really fighting the urge to go out an buy one!). It was so dark and clear the <a href="http://xelar2.tumblr.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://xelar2.tumblr.com/');">Alex</a> was even able to pick out the Andromeda galaxy with his naked eye. I really hope to return soon and do some more&nbsp;exploring.</p>
<p><em>Photos in this post &copy; Christian Dinger—all rights&nbsp;reserved.</em></p>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/fH1wt_XLvzQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/08/the-night-sky/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My iTunes veto list</title>
		<link>http://www.houseofding.com/2009/08/my-itunes-veto-list/</link>
		<comments>http://www.houseofding.com/2009/08/my-itunes-veto-list/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 14:15:19 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=237</guid>
		<description><![CDATA[I&#8217;ve actually been using this iTunes veto script for a few months now and it&#8217;s been so satisfying to hear silence every time these songs are played on the&#160;radio: Green Day - Know Your&#160;Enemy Green Day - Horseshoes and&#160;Handgrenades U2 - I&#8217;ll Go Crazy If I Don&#8217;t Go Crazy&#160;Tonight Bob Dylan - It&#8217;s All&#160;Good Bob [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve actually been using <a href="http://www.houseofding.com/2009/06/itunes-veto-avoid-those-overplayed-new-songs/" >this iTunes veto script</a> for a few months now and it&#8217;s been so satisfying to hear silence every time these songs are played on the&nbsp;radio:</p>
<ul>
<li>Green Day - Know Your&nbsp;Enemy</li>
<li>Green Day - Horseshoes and&nbsp;Handgrenades</li>
<li>U2 - I&#8217;ll Go Crazy If I Don&#8217;t Go Crazy&nbsp;Tonight</li>
<li>Bob Dylan - It&#8217;s All&nbsp;Good</li>
<li>Bob Dylan - Beyond Here Lies&nbsp;Nothin&#8217;</li>
<li>Iron and Wine - Love&nbsp;Vigilantes</li>
<li>Discovery - Orange&nbsp;Shirt</li>
</ul>
<p>Ahh&#8230;</p>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/k6FwK_xQohE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/08/my-itunes-veto-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone 3.0 upgrade: Google Sync contacts and calender gone!</title>
		<link>http://www.houseofding.com/2009/06/iphone-3-0-upgrade-google-sync-contacts-and-calender-gone/</link>
		<comments>http://www.houseofding.com/2009/06/iphone-3-0-upgrade-google-sync-contacts-and-calender-gone/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 05:03:48 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=228</guid>
		<description><![CDATA[I just updated my iPhone to the new 3.0 operating system it looks like it emptied the iPhone&#8217;s local cache of contacts and calendar entries from Google Sync. To get them synced up and working again just go to &#8216;Settings&#8217; > &#8216;Mail, Contacts, Calendars&#8217; > [Your Google Sync account] and turn off Contacts and Calendars. [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated my iPhone to the new 3.0 operating system it looks like it emptied the iPhone&#8217;s local cache of contacts and calendar entries from <a href="http://www.google.com/mobile/default/sync.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.google.com/mobile/default/sync.html');">Google Sync</a>. To get them synced up and working again just go to &#8216;Settings&#8217; > &#8216;Mail, Contacts, Calendars&#8217; > [Your Google Sync account] and turn off Contacts and Calendars. Your phone is ask you if you want to delete all local contacts and calendar entries (this is <span class="caps">OK</span>, there are none to delete anyway). Then, turn these both back on. This performs the initial sync to pull all of your contacts and calendar&nbsp;entries.</p>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/8O8ufta8phk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/06/iphone-3-0-upgrade-google-sync-contacts-and-calender-gone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iTunes Veto: avoid those overplayed new songs</title>
		<link>http://www.houseofding.com/2009/06/itunes-veto-avoid-those-overplayed-new-songs/</link>
		<comments>http://www.houseofding.com/2009/06/itunes-veto-avoid-those-overplayed-new-songs/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 19:10:18 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=217</guid>
		<description><![CDATA[I listen to a stream of The Current almost all day, every day. I love this station, but I cringe every time they play that new Green Day song or when I hear Bono sing, well, anything. No longer! I&#8217;ve written a set of Ruby scripts that&#8217;ll let me veto away the ugliness so that [...]]]></description>
			<content:encoded><![CDATA[<p>I listen to a stream of <a href="http://minnesota.publicradio.org/tools/play/streams/the_current.pls" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://minnesota.publicradio.org/tools/play/streams/the_current.pls');">The Current</a> almost all day, every day. I love this station, but I cringe every time they play that new Green Day song or when I hear Bono sing, well, anything. No longer! I&#8217;ve written a set of Ruby scripts that&#8217;ll let me veto away the ugliness so that I&#8217;ll never get nasty songs stuck in my head&nbsp;again.</p>
<p>I should point out that these scripts assume you&#8217;re running Mac <span class="caps">OS</span> X 10.5 with Developer Tools installed. Both scripts use the <code>osx/cocoa</code> library to interact with&nbsp;iTunes.</p>
<h3>veto</h3>
<p>the <code>veto</code> script pulls the track title that iTunes is currently streaming and appends it to&nbsp;<code>~/.itunes_vetoes_songs</code>.</p>
<pre>
#!/usr/bin/env ruby -w

require 'osx/cocoa'
include OSX
OSX.require_framework 'ScriptingBridge'

itunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")
`echo "#{itunes.currentStreamTitle}" >> ~/.itunes_vetoed_songs`
</pre>
<h3>veto_watcher</h3>
<p><code>veto_watcher</code> runs in the background and looks for vetoes songs to appear the iTunes stream. When they do, it turns down the volume and spares your ears. When the vetoed track is done, the volume goes back up. Note: this <em>should</em> return the volume to it&#8217;s previous setting, but the instance variable kept breaking, so it just goes back up to&nbsp;100%&thinsp;&mdash;&thinsp;careful!</p>
<pre>
#!/usr/bin/env ruby -w

# start a new thread
pid = fork do

  require 'osx/cocoa'
  include OSX
  OSX.require_framework 'ScriptingBridge'

  @itunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")

  def itunes_is_running?
    return !`ps -A -o comm | grep iTunes.app`.empty?
  end

  def mute
    @itunes.soundVolume = 0 if @itunes.soundVolume > 0
  end

  def unmute
    @itunes.soundVolume = 100 if @itunes.soundVolume == 0
  end

  def check_for_veto
    vetoes = `cat ~/.itunes_vetoed_songs`.split("\n")

    if vetoes.index(@itunes.currentStreamTitle)
      mute
    elsif @itunes.soundVolume == 0
      unmute
    end
  end

  # main loop: check for a veto every 5 seconds
  loop do
    check_for_veto if itunes_is_running?
    sleep(5)
  end

end

Process.detach(pid)
</pre>
<p>I have the <code>veto_watcher</code> script start up when I log in and I&#8217;ve set up a Quicksilver trigger to run the <code>veto</code> script. What&#8217;s up now,&nbsp;Bono?</p>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/r0lsISL43Vg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/06/itunes-veto-avoid-those-overplayed-new-songs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://minnesota.publicradio.org/tools/play/streams/the_current.pls" length="0" type="audio/x-scpls" />
		</item>
		<item>
		<title>Controlling execution order of Drupal modules</title>
		<link>http://www.houseofding.com/2009/06/controlling-execution-order-of-drupal-modules/</link>
		<comments>http://www.houseofding.com/2009/06/controlling-execution-order-of-drupal-modules/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 01:07:51 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[drupal php]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=207</guid>
		<description><![CDATA[So lately, this had become a &#8216;stuff that breaks at work&#8217; blog, but I fear that if I don&#8217;t document these, they&#8217;ll likely bite me again. And, if the solutions help someone else, then that&#8217;s&#160;great. Our team recently launched a large website in Drupal that uses many home-grown modules. I discovered that with certain modules, [...]]]></description>
			<content:encoded><![CDATA[<p>So lately, this had become a &#8216;stuff that breaks at work&#8217; blog, but I fear that if I don&#8217;t document these, they&#8217;ll likely bite me again. And, if the solutions help someone else, then that&#8217;s&nbsp;great.</p>
<p>Our team recently launched a large website in Drupal that uses many home-grown modules. I discovered that with certain modules, the execution order is very important; especially authentication modules. We&#8217;d developed a module that interacts with the University&#8217;s single sign-on service and automatically creates or loads a Drupal&nbsp;user.</p>
<h3>Order&nbsp;matters</h3>
<p>Everything worked perfectly in testing except 403 handling. Specifically, when an unauthenticated user encounters a page that requires authentication or a certain role (via the privacy by role module), the user would expect to be routed to the single sign-on form, authenticate, and then be returned to the resource they originally requested. This wasn&#8217;t happening. The user would click a protected link, login, and then encounter the default 403 page: &#8216;Access Denied.&#8217; The giveaway was that if you refreshed the page, the protected page would appear. After hours of debugging, I discovered that it was indeed the execution order. Our authentication module was being executed <em>after</em> the node&nbsp;load.</p>
<h3>System.weight</h3>
<p>Some Googling revealed the nearly undocumented &#8216;weight&#8217; column in the system table. This column allows you to control the order/priority in which modules are executed.  Most module will default to 0. To increase the priority, decrease the weight; to decrease the priority, increase the weight. With 90% of our modules at 0, and, assuming that we&#8217;d always want authentication to run first (even before the Node module), we set its weight to -1. This caused the authentication to fire before the node load and  successfully load the requested&nbsp;page.</p>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/IKwbxsmofzM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/06/controlling-execution-order-of-drupal-modules/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu + Rails + Passenger + OCI8 = Sad</title>
		<link>http://www.houseofding.com/2009/05/ubuntu-rails-passenger-oci8-sad/</link>
		<comments>http://www.houseofding.com/2009/05/ubuntu-rails-passenger-oci8-sad/#comments</comments>
		<pubDate>Thu, 21 May 2009 14:40:45 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[oci8]]></category>
		<category><![CDATA[passenger]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=199</guid>
		<description><![CDATA[LoadError (Oracle/OCI libraries could not be loaded: libclntsh.so.11.1: cannot open shared object file: No such file or directory -&#160;/usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so) Have you seen this error in your Rails application? Do you hate it as much as I do? I&#8217;ve spent the past two days troubleshooting this and I finally found a solution. It&#8217;s ugly and hacky, [...]]]></description>
			<content:encoded><![CDATA[<h3>LoadError (Oracle/<span class="caps">OCI</span> libraries could not be loaded: libclntsh.so.11.1: cannot open shared object file: No such file or directory -&nbsp;/usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so)</h3>
<p>Have you seen this error in your Rails application? Do you hate it as much as I do? I&#8217;ve spent the past two days troubleshooting this and I finally found a solution. It&#8217;s ugly and hacky, but it appears to be&nbsp;working.</p>
<p>There are actually quite a few posts out there regarding this error and they all get down to the root problem: the LD_LIBRARY_PATH environment variable is not available to the Apache user (www-data in this case). Most solutions I&#8217;ve found involve setting this variable in /etc/bash.bashrc or /etc/profile to make the variable available to all users. This fixed part of the problem for me, but it was still failing when executed from Apache via&nbsp;Passenger.</p>
<h3>The&nbsp;&ldquo;solution&rdquo;</h3>
<p>The hacktastic solution was to modify the /etc/init.d/apache2 startup script and explicitly set the LD_LIBRARY_PATH variable when Apache is started. Specifically,&nbsp;change </p>
<p><code>ENV="env -i LANG=C&nbsp;PATH=/usr/local/bin:/usr/bin:/bin"</code></p>
<p>to </p>
<p><code>ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin&nbsp;LD_LIBRARY_PATH=/opt/oracle/instantclient"</code></p>
<p>Note that this solution assumes you&#8217;re using the Oracle InstantClient; if you&#8217;re using the full Oracle client, you may try setting the ORACLE_HOME path instead of&nbsp;LD_LIBRARY_PATH.</p>
<p>I hope this helps&nbsp;somebody!</p>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/4ATyp1zr4Bo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/05/ubuntu-rails-passenger-oci8-sad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kamus Kecil</title>
		<link>http://www.houseofding.com/2009/03/kamus-kecil/</link>
		<comments>http://www.houseofding.com/2009/03/kamus-kecil/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 01:54:39 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[indonesian]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=181</guid>
		<description><![CDATA[I created www.kamuskecil.com today during lunch as I ate last night&#8217;s leftovers in my cube. It&#8217;s a stupid-simple, no-frills Indonesian-English dictionary. I&#8217;ve been sitting on this data for years now and once had a grand vision for it, but let&#8217;s face it; it&#8217;s just a dictionary. And, I really only expect one user&#8201;&#8212;&#8201;myself. So if [...]]]></description>
			<content:encoded><![CDATA[<div class="pic three right">
<a href="http://www.kamuskecil.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.kamuskecil.com/');"><img src="http://www.houseofding.com/wp-content/uploads/2009/03/kamus_kecil.png" alt="kamus_kecil" title="kamus_kecil" width="310" height="223" class="alignnone size-full wp-image-185" /></a>
</div>
<p>
I created <a href="http://www.kamuskecil.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.kamuskecil.com/');">www.kamuskecil.com</a> today during lunch as I ate last night&#8217;s leftovers in my cube. It&#8217;s a stupid-simple, no-frills Indonesian-English dictionary. I&#8217;ve been sitting on this data for years now and once had a grand vision for it, but let&#8217;s face it; it&#8217;s just a dictionary. And, I really only expect one user&thinsp;&mdash;&thinsp;myself. So if you ever need to know the definition of <a href="http://www.kamuskecil.com/search/kamus" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.kamuskecil.com/search/kamus');">kamus</a>, give it a&nbsp;try. </p>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/VFeY8UOZDOs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/03/kamus-kecil/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Create an RSS feed of your git commits</title>
		<link>http://www.houseofding.com/2009/03/create-an-rss-feed-of-your-git-commits/</link>
		<comments>http://www.houseofding.com/2009/03/create-an-rss-feed-of-your-git-commits/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 21:33:08 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=166</guid>
		<description><![CDATA[It&#8217;s sometimes hard to stay up-to-date on changes your development team makes to projects. Especially when there&#8217;s a flurry of activity. To deal with this, I&#8217;ve written a ruby script that takes output from git log and transforms it into a valid RSS feed. It includes name, commit notes, and affected files but it can [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s sometimes hard to stay up-to-date on changes your development team makes to projects. Especially when there&#8217;s a flurry of activity. To deal with this, I&#8217;ve written a ruby script that takes output from <code>git log</code> and transforms it into a valid RSS feed. It includes name, commit notes, and affected files but it can be easily modified to include more (or&nbsp;less).</p>
<p>Because git&#8217;s built-in hooks system is only available client-side, this is set to run via a cron task. One <em>could</em> implement some sort of push system pretty easily with client-side hooks, but the hook scripts would have to be distributed to each of the developers. That seems like a pain. This script is meant to be executed on the server that holds your git&nbsp;repositories.</p>
<h3>gitrss.rb</h3>
<p>gitrss.rb takes one argument: the path to the&nbsp;repository.</p>
<pre>
repository_path = $*[0]

git_history = `cd #{repository_path} &amp;&amp; git log --max-count=10 --name-status`
entries = git_history.split(&quot;\ncommit &quot;)

rss = &quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
  &lt;rss version=&quot;2.0&quot;&gt;

  &lt;channel&gt;
  &lt;title&gt;your_repository commits&lt;/title&gt;
  &lt;description&gt;Git commits to your_repository&lt;/description&gt;
  &lt;link&gt;http://example.com/your_respository.xml&lt;/link&gt;
  &lt;lastBuildDate&gt;#{Time.now}&lt;/lastBuildDate&gt;
  &lt;pubDate&gt;#{Time.now}&lt;/pubDate&gt;
&quot;

entries.each do |entry|
  guid = entry.gsub(/^.*commit /ms, '').gsub(/\n.*$/ms, '')
  author_name = entry.gsub(/^.*Author: /ms, '').gsub(/ &lt;.*$/ms, '')
  date = entry.gsub(/^.*Date: +/ms, '').gsub(/\n.*$/ms, '')
  comments = entry.gsub(/^.*Date[^\n]*/ms, '')

  rss += &quot;
    &lt;item&gt;
      &lt;title&gt;Commit by #{author_name}&lt;/title&gt;
      &lt;description&gt;#{author_name} made a commit on #{date}&lt;/description&gt;
      &lt;content&gt;&lt;![CDATA[
        &lt;h2&gt;#{author_name}&lt;/h2&gt;
        &lt;p&gt;#{date}&lt;/p&gt;
        &lt;pre&gt;#{comments}&lt;/pre&gt;
      ]]&gt;&lt;/content&gt;
      &lt;link&gt;&lt;/link&gt;
      &lt;guid isPermaLink=&quot;false&quot;&gt;#{guid}&lt;/guid&gt;
      &lt;pubDate&gt;#{date}&lt;/pubDate&gt;
    &lt;/item&gt;&quot;
end 

rss += &quot;
  &lt;/channel&gt;
&lt;/rss&gt;&quot;

puts rss
</pre>
<h3>cron</h3>
<p>The gitrss.rb script only outputs the <span class="caps">RSS</span> <span class="caps">XML</span>; we&#8217;ll have to redirect the output in cron. Here&#8217;s an example cron task that runs this every 30&nbsp;minutes:</p>
<pre>
*/30 * * * * root ruby /var/git/gitrss.rb /var/git/your_repository.git > /var/www/your_repository.xml
</pre>
<p>This cron task will run the gitrss.rb script every 30 minutes and redirect its output to a file called&nbsp;your_repository.xml</p>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/whbtOdz4JIo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/03/create-an-rss-feed-of-your-git-commits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Victory!</title>
		<link>http://www.houseofding.com/2009/03/victory/</link>
		<comments>http://www.houseofding.com/2009/03/victory/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 14:36:50 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.houseofding.com/?p=156</guid>
		<description><![CDATA[I am a hard-core trivia geek. Every March I travel to the middle of Wisconsin to meet 15 or so people I only see once a year to participate in a six-hour radio trivia contest. The group has been playing for the last 20 years (I've only been involved for five).]]></description>
			<content:encoded><![CDATA[<p>I am a hard-core trivia geek. Every March I travel to the middle of Wisconsin to meet 15 or so people I only see once a year to participate in a six-hour radio trivia contest. The group has been playing for the last 20 years (I&#8217;ve only been involved for&nbsp;five). </p>
<p>This year our team name was &#8220;Don&#8217;t forget the pickles&#8221;. I&#8217;m sure it means something to someone. I liked the name we used last year, &#8220;The science of winning&#8221;. Much&nbsp;cockier.</p>
<p>This year was another victory (fourth consecutive year!). We trailed in fourth place until the last 30 minutes and finally won in a lightning round tie breaker. Good&nbsp;times.</p>
<div class="picture left inset four">
<img src="http://www.houseofding.com/wp-content/uploads/2009/03/trivia_2009_s.jpg" alt="Trivia 2009" /></p>
<p class="caption">My &#8216;sconny friends: team &#8220;Don&#8217;t forget the pickles&#8221;; 14 Mar&nbsp;2009.</p>
</div>
<img src="http://feeds.feedburner.com/~r/houseofding/~4/Kln2GjUHEi4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.houseofding.com/2009/03/victory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
