<?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>Eigenjoy &#187; tips</title>
	<atom:link href="http://eigenjoy.com/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://eigenjoy.com</link>
	<description>a programming blog</description>
	<lastBuildDate>Wed, 14 Dec 2011 18:22:45 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>fixing the disabled snapshot button in vmware fusion</title>
		<link>http://eigenjoy.com/2009/07/17/fixing-the-disabled-snapshot-button-in-vmware-fusion/</link>
		<comments>http://eigenjoy.com/2009/07/17/fixing-the-disabled-snapshot-button-in-vmware-fusion/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 18:22:55 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2009/07/17/fixing-the-disabled-snapshot-button-in-vmware-fusion/</guid>
		<description><![CDATA[I recently created a new CentOS 5 vmware image. Unfortunately the &#8220;Take Snapshot&#8221; button was disabled while the system was running. After searching around I found this post.
What you need to do is open up your vmx file and comment out (disable) the following line:

scsi0:0.mode = &#34;independent-persistent&#34;

Others have also reported finding the following line in [...]]]></description>
			<content:encoded><![CDATA[<p>I recently created a new CentOS 5 vmware image. Unfortunately the &#8220;Take Snapshot&#8221; button was disabled while the system was running. After searching around I found <a href="http://communities.vmware.com/message/589046#589046">this post</a>.</p>
<p>What you need to do is open up your <code>vmx</code> file and comment out (disable) the following line:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">scsi0:0.mode = <span style="color: #ff0000;">&quot;independent-persistent&quot;</span></pre></div></div>

<p>Others have also reported finding the following line in their <code>vmx</code> file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">snapshot.disabled = <span style="color: #ff0000;">&quot;TRUE&quot;</span></pre></div></div>

<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F17%2Ffixing-the-disabled-snapshot-button-in-vmware-fusion%2F&amp;title=fixing%20the%20disabled%20snapshot%20button%20in%20vmware%20fusion&amp;notes=I%20recently%20created%20a%20new%20CentOS%205%20vmware%20image.%20Unfortunately%20the%20%22Take%20Snapshot%22%20button%20was%20disabled%20while%20the%20system%20was%20running.%20After%20searching%20around%20I%20found%20this%20post.%0D%0A%0D%0AWhat%20you%20need%20to%20do%20is%20open%20up%20your%20vmx%20file%20and%20comment%20out%20%28disable%29%20th" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F17%2Ffixing-the-disabled-snapshot-button-in-vmware-fusion%2F&amp;title=fixing%20the%20disabled%20snapshot%20button%20in%20vmware%20fusion" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F17%2Ffixing-the-disabled-snapshot-button-in-vmware-fusion%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=fixing%20the%20disabled%20snapshot%20button%20in%20vmware%20fusion%20-%20http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F17%2Ffixing-the-disabled-snapshot-button-in-vmware-fusion%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F17%2Ffixing-the-disabled-snapshot-button-in-vmware-fusion%2F&amp;t=fixing%20the%20disabled%20snapshot%20button%20in%20vmware%20fusion" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F17%2Ffixing-the-disabled-snapshot-button-in-vmware-fusion%2F&amp;title=fixing%20the%20disabled%20snapshot%20button%20in%20vmware%20fusion&amp;annotation=I%20recently%20created%20a%20new%20CentOS%205%20vmware%20image.%20Unfortunately%20the%20%22Take%20Snapshot%22%20button%20was%20disabled%20while%20the%20system%20was%20running.%20After%20searching%20around%20I%20found%20this%20post.%0D%0A%0D%0AWhat%20you%20need%20to%20do%20is%20open%20up%20your%20vmx%20file%20and%20comment%20out%20%28disable%29%20th" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F17%2Ffixing-the-disabled-snapshot-button-in-vmware-fusion%2F&amp;t=fixing%20the%20disabled%20snapshot%20button%20in%20vmware%20fusion" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F17%2Ffixing-the-disabled-snapshot-button-in-vmware-fusion%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2009/07/17/fixing-the-disabled-snapshot-button-in-vmware-fusion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>automate installing tripwire using expect</title>
		<link>http://eigenjoy.com/2009/07/10/automate-installing-tripwire-using-expect/</link>
		<comments>http://eigenjoy.com/2009/07/10/automate-installing-tripwire-using-expect/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 21:48:06 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2009/07/10/automate-installing-tripwire-using-expect/</guid>
		<description><![CDATA[tripwire is a handy part of an intrusion detection system. It&#8217;s a nice piece of software but the installer is interactive which makes it a pain to install automatically (e.g. when using PoolParty/EC2). Below is a simple expect script I whipped up to solve the make install problem. Hopefully this will save someone two or [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sourceforge.net/projects/tripwire/"><tt>tripwire</tt></a> is a handy part of an intrusion detection system. It&#8217;s a nice piece of software but the installer is interactive which makes it a pain to install automatically (e.g. when using PoolParty/EC2). Below is a simple <tt>expect</tt> script I whipped up to solve the <tt>make install</tt> problem. Hopefully this will save someone two or three minutes.</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"># Usage: expect install-tripwire.tcl pass1 pass2 
set PASS1 [lindex $argv 0]
set PASS2 [lindex $argv 1]
&nbsp;
spawn make install
&nbsp;
expect &quot;Press ENTER to view the License Agreement.&quot;
send &quot;\r&quot;
send &quot;q&quot;
expect &quot;license agreement. \[do not accept\]&quot;
send &quot;accept\r&quot;
expect &quot;Continue with installation? \[y/n\]&quot;
send &quot;y\r&quot;
&nbsp;
expect &quot;Enter the site keyfile passphrase:&quot;
send &quot;$PASS1\r&quot;
expect &quot;Verify the site keyfile passphrase:&quot;
send &quot;$PASS1\r&quot;
&nbsp;
expect &quot;Enter the local keyfile passphrase:&quot;
send &quot;$PASS2\r&quot;
expect &quot;Verify the local keyfile passphrase:&quot;
send &quot;$PASS2\r&quot;
&nbsp;
expect &quot;Please enter your site passphrase:&quot;
send &quot;$PASS1\r&quot;
&nbsp;
expect &quot;Please enter your site passphrase:&quot;
send &quot;$PASS1\r&quot;</pre></div></div>

<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F10%2Fautomate-installing-tripwire-using-expect%2F&amp;title=automate%20installing%20tripwire%20using%20expect&amp;notes=tripwire%20is%20a%20handy%20part%20of%20an%20intrusion%20detection%20system.%20It%27s%20a%20nice%20piece%20of%20software%20but%20the%20installer%20is%20interactive%20which%20makes%20it%20a%20pain%20to%20install%20automatically%20%28e.g.%20when%20using%20PoolParty%2FEC2%29.%20Below%20is%20a%20simple%20expect%20script%20I%20whipped%20up%20to%20" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F10%2Fautomate-installing-tripwire-using-expect%2F&amp;title=automate%20installing%20tripwire%20using%20expect" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F10%2Fautomate-installing-tripwire-using-expect%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=automate%20installing%20tripwire%20using%20expect%20-%20http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F10%2Fautomate-installing-tripwire-using-expect%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F10%2Fautomate-installing-tripwire-using-expect%2F&amp;t=automate%20installing%20tripwire%20using%20expect" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F10%2Fautomate-installing-tripwire-using-expect%2F&amp;title=automate%20installing%20tripwire%20using%20expect&amp;annotation=tripwire%20is%20a%20handy%20part%20of%20an%20intrusion%20detection%20system.%20It%27s%20a%20nice%20piece%20of%20software%20but%20the%20installer%20is%20interactive%20which%20makes%20it%20a%20pain%20to%20install%20automatically%20%28e.g.%20when%20using%20PoolParty%2FEC2%29.%20Below%20is%20a%20simple%20expect%20script%20I%20whipped%20up%20to%20" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F10%2Fautomate-installing-tripwire-using-expect%2F&amp;t=automate%20installing%20tripwire%20using%20expect" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2009%2F07%2F10%2Fautomate-installing-tripwire-using-expect%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2009/07/10/automate-installing-tripwire-using-expect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>adding macruby to multiruby versions</title>
		<link>http://eigenjoy.com/2009/05/22/adding-macruby-to-multiruby-versions/</link>
		<comments>http://eigenjoy.com/2009/05/22/adding-macruby-to-multiruby-versions/#comments</comments>
		<pubDate>Fri, 22 May 2009 21:11:20 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2009/05/22/adding-macruby-to-multiruby-versions/</guid>
		<description><![CDATA[Modified from Rob Seaman&#8217;s post.
multiruby is a great way to make sure your ruby code runs on the multitude of ruby versions (it&#8217;s part of ZenTest). It doesn&#8217;t install macruby by default. Here are instructions on how to set it up.
Since I installed macruby from the package installer my macruby files are in /Library/Frameworks/MacRuby.framework/Versions/0.4/. If [...]]]></description>
			<content:encoded><![CDATA[<p>Modified from <a href="http://blog.robseaman.com/2008/12/21/adding-jruby-to-multiruby-versions">Rob Seaman&#8217;s post</a>.</p>
<p>multiruby is a great way to make sure your ruby code runs on the multitude of ruby versions (it&#8217;s part of ZenTest). It doesn&#8217;t install macruby by default. Here are instructions on how to set it up.</p>
<p>Since I installed macruby from the <a href="http://www.macruby.org/">package installer</a> my macruby files are in <code>/Library/Frameworks/MacRuby.framework/Versions/0.4/</code>. If your macruby files are somewhere else, adjust accordingly.</p>
<p>First make sure you already have multiruby setup for other versions (don&#8217;t proceed if this doesn&#8217;t work):<br />
<code><br />
multiruby_setup the_usual<br />
</code></p>
<p>One problem I had with the above command was that I had <code>RUBYOPT</code> set in my .profile. This was calling each of these ruby versions with <code>RUBYOPT=rubygems</code> when trying to install. This won&#8217;t work because rubygems is one of the things you&#8217;re trying to install. Make sure you unset this variable etc. before trying to setup multiruby.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">ln <span style="color:#006600; font-weight:bold;">-</span>s <span style="color:#006600; font-weight:bold;">/</span>Library<span style="color:#006600; font-weight:bold;">/</span>Frameworks<span style="color:#006600; font-weight:bold;">/</span>MacRuby.<span style="color:#9900CC;">framework</span><span style="color:#006600; font-weight:bold;">/</span>Versions<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">0.4</span><span style="color:#006600; font-weight:bold;">/</span>usr ~<span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#9900CC;">multiruby</span><span style="color:#006600; font-weight:bold;">/</span>install<span style="color:#006600; font-weight:bold;">/</span>macruby<span style="color:#006600; font-weight:bold;">-</span>0.0.4
sudo ln <span style="color:#006600; font-weight:bold;">-</span>s ~<span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#9900CC;">multiruby</span><span style="color:#006600; font-weight:bold;">/</span>install<span style="color:#006600; font-weight:bold;">/</span>macruby<span style="color:#006600; font-weight:bold;">-</span>0.0.4<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>macruby ~<span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#9900CC;">multiruby</span><span style="color:#006600; font-weight:bold;">/</span>install<span style="color:#006600; font-weight:bold;">/</span>macruby<span style="color:#006600; font-weight:bold;">-</span>0.0.4<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>ruby
sudo ln <span style="color:#006600; font-weight:bold;">-</span>s ~<span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#9900CC;">multiruby</span><span style="color:#006600; font-weight:bold;">/</span>install<span style="color:#006600; font-weight:bold;">/</span>macruby<span style="color:#006600; font-weight:bold;">-</span>0.0.4<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>macgem ~<span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#9900CC;">multiruby</span><span style="color:#006600; font-weight:bold;">/</span>install<span style="color:#006600; font-weight:bold;">/</span>macruby<span style="color:#006600; font-weight:bold;">-</span>0.0.4<span style="color:#006600; font-weight:bold;">/</span>bin<span style="color:#006600; font-weight:bold;">/</span>gem
touch ~<span style="color:#006600; font-weight:bold;">/</span>.<span style="color:#9900CC;">multiruby</span><span style="color:#006600; font-weight:bold;">/</span>versions<span style="color:#006600; font-weight:bold;">/</span>macruby<span style="color:#006600; font-weight:bold;">-</span>0.0.4.<span style="color:#9900CC;">tar</span>.<span style="color:#9900CC;">gz</span> <span style="color:#008000; font-style:italic;"># fake-out</span></pre></div></div>

<p>Now try:<br />
<code><br />
multiruby -e "p 1+1"<br />
</code></p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F22%2Fadding-macruby-to-multiruby-versions%2F&amp;title=adding%20macruby%20to%20multiruby%20versions&amp;notes=Modified%20from%20Rob%20Seaman%27s%20post.%0D%0A%0D%0Amultiruby%20is%20a%20great%20way%20to%20make%20sure%20your%20ruby%20code%20runs%20on%20the%20multitude%20of%20ruby%20versions%20%28it%27s%20part%20of%20ZenTest%29.%20It%20doesn%27t%20install%20macruby%20by%20default.%20Here%20are%20instructions%20on%20how%20to%20set%20it%20up.%0D%0A%0D%0ASince%20I%20insta" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F22%2Fadding-macruby-to-multiruby-versions%2F&amp;title=adding%20macruby%20to%20multiruby%20versions" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F22%2Fadding-macruby-to-multiruby-versions%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=adding%20macruby%20to%20multiruby%20versions%20-%20http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F22%2Fadding-macruby-to-multiruby-versions%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F22%2Fadding-macruby-to-multiruby-versions%2F&amp;t=adding%20macruby%20to%20multiruby%20versions" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F22%2Fadding-macruby-to-multiruby-versions%2F&amp;title=adding%20macruby%20to%20multiruby%20versions&amp;annotation=Modified%20from%20Rob%20Seaman%27s%20post.%0D%0A%0D%0Amultiruby%20is%20a%20great%20way%20to%20make%20sure%20your%20ruby%20code%20runs%20on%20the%20multitude%20of%20ruby%20versions%20%28it%27s%20part%20of%20ZenTest%29.%20It%20doesn%27t%20install%20macruby%20by%20default.%20Here%20are%20instructions%20on%20how%20to%20set%20it%20up.%0D%0A%0D%0ASince%20I%20insta" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F22%2Fadding-macruby-to-multiruby-versions%2F&amp;t=adding%20macruby%20to%20multiruby%20versions" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F22%2Fadding-macruby-to-multiruby-versions%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2009/05/22/adding-macruby-to-multiruby-versions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>tweet twitter util &#8211; cli feedback on tweet length</title>
		<link>http://eigenjoy.com/2009/05/21/tweet-twitter-util-cli-feedback-on-tweet-length/</link>
		<comments>http://eigenjoy.com/2009/05/21/tweet-twitter-util-cli-feedback-on-tweet-length/#comments</comments>
		<pubDate>Thu, 21 May 2009 15:01:21 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2009/05/21/tweet-twitter-util-cli-feedback-on-tweet-length/</guid>
		<description><![CDATA[One of the nice things about the Twitter web-interface is that it gives you feedback on the number of characters you&#8217;ve typed so far.

 Since I use the command-line twitter gem (by John Nunemaker) I miss out on this feature and find myself using echo and wc to make sure I&#8217;m not over the limit.
To [...]]]></description>
			<content:encoded><![CDATA[<p>One of the nice things about the Twitter web-interface is that it gives you feedback on the number of characters you&#8217;ve typed so far.<a href='http://www.xcombinator.com/wp-content/uploads/2009/05/twitter-warning.png' title='twitter-warning.png'><img src='http://www.xcombinator.com/wp-content/uploads/2009/05/twitter-warning.thumbnail.png' alt='twitter-warning.png' /></a>
</p>
<p> Since I use the command-line <a href="http://twitter.rubyforge.org/"><tt>twitter</tt> gem</a> (by John Nunemaker) I miss out on this feature and find myself using <tt>echo</tt> and <tt>wc</tt> to make sure I&#8217;m not over the limit.</p>
<p>To fix this problem, I&#8217;ve written a small, immediate-feedback utility called <tt>tweet</tt>. It shows you the number of characters typed so far and colorizes them accordingly.</p>
<p> Screenshots: </p>
<p>warning:<br />
<a href='http://www.xcombinator.com/wp-content/uploads/2009/05/tweet-warning.png' title='tweet-warning.png'><img src='http://www.xcombinator.com/wp-content/uploads/2009/05/tweet-warning.png' alt='tweet-warning.png' /></a>
</p>
<p>over:<br />
<a href='http://www.xcombinator.com/wp-content/uploads/2009/05/tweet-overage.png' title='tweet-overage.png'><img src='http://www.xcombinator.com/wp-content/uploads/2009/05/tweet-overage.png' alt='tweet-overage.png' /></a>
</p>
<p>
Just download this script and save it as <tt>tweet</tt> somewhere in your <tt>$PATH</tt><br />
<script src="http://gist.github.com/112317.js"></script>
</p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F21%2Ftweet-twitter-util-cli-feedback-on-tweet-length%2F&amp;title=tweet%20twitter%20util%20-%20cli%20feedback%20on%20tweet%20length&amp;notes=One%20of%20the%20nice%20things%20about%20the%20Twitter%20web-interface%20is%20that%20it%20gives%20you%20feedback%20on%20the%20number%20of%20characters%20you%27ve%20typed%20so%20far.%0D%0A%0D%0A%0D%0A%20Since%20I%20use%20the%20command-line%20twitter%20gem%20%28by%20John%20Nunemaker%29%20I%20miss%20out%20on%20this%20feature%20and%20find%20myself%20using%20" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F21%2Ftweet-twitter-util-cli-feedback-on-tweet-length%2F&amp;title=tweet%20twitter%20util%20-%20cli%20feedback%20on%20tweet%20length" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F21%2Ftweet-twitter-util-cli-feedback-on-tweet-length%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=tweet%20twitter%20util%20-%20cli%20feedback%20on%20tweet%20length%20-%20http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F21%2Ftweet-twitter-util-cli-feedback-on-tweet-length%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F21%2Ftweet-twitter-util-cli-feedback-on-tweet-length%2F&amp;t=tweet%20twitter%20util%20-%20cli%20feedback%20on%20tweet%20length" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F21%2Ftweet-twitter-util-cli-feedback-on-tweet-length%2F&amp;title=tweet%20twitter%20util%20-%20cli%20feedback%20on%20tweet%20length&amp;annotation=One%20of%20the%20nice%20things%20about%20the%20Twitter%20web-interface%20is%20that%20it%20gives%20you%20feedback%20on%20the%20number%20of%20characters%20you%27ve%20typed%20so%20far.%0D%0A%0D%0A%0D%0A%20Since%20I%20use%20the%20command-line%20twitter%20gem%20%28by%20John%20Nunemaker%29%20I%20miss%20out%20on%20this%20feature%20and%20find%20myself%20using%20" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F21%2Ftweet-twitter-util-cli-feedback-on-tweet-length%2F&amp;t=tweet%20twitter%20util%20-%20cli%20feedback%20on%20tweet%20length" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2009%2F05%2F21%2Ftweet-twitter-util-cli-feedback-on-tweet-length%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2009/05/21/tweet-twitter-util-cli-feedback-on-tweet-length/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cp a symlink to multiple directories</title>
		<link>http://eigenjoy.com/2009/01/14/cp-a-symlink-to-multiple-directories/</link>
		<comments>http://eigenjoy.com/2009/01/14/cp-a-symlink-to-multiple-directories/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 17:18:01 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2009/01/14/cp-a-symlink-to-multiple-directories/</guid>
		<description><![CDATA[Today I wanted to copy a symlink to many different directories. So I tried the following:

for f in `find . -regex ''.*cp.*snippets''` ; do cp bbb.html $f/ ; done

Which returned:

cp: cannot stat `bbb.html': No such file or directory

bbb.html is a symlink and the default behavior of cp (I think) is to try and copy the [...]]]></description>
			<content:encoded><![CDATA[<p>Today I wanted to copy a symlink to many different directories. So I tried the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> f <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-regex</span> <span style="color: #ff0000;">''</span>.<span style="color: #000000; font-weight: bold;">*</span>cp.<span style="color: #000000; font-weight: bold;">*</span>snippets<span style="color: #ff0000;">''</span><span style="color: #000000; font-weight: bold;">`</span> ; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> bbb.html <span style="color: #007800;">$f</span><span style="color: #000000; font-weight: bold;">/</span> ; <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>Which returned:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span>: cannot <span style="color: #c20cb9; font-weight: bold;">stat</span> <span style="color: #000000; font-weight: bold;">`</span>bbb.html<span style="color: #ff0000;">': No such file or directory</span></pre></div></div>

<p>bbb.html is a symlink and the default behavior of cp (I think) is to try and copy the actual file, which didn&#8217;t exist from the current directory. So just adding the <strong>-R</strong> made cp copy it as a symlink with the final command being:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> f <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-regex</span> <span style="color: #ff0000;">''</span>.<span style="color: #000000; font-weight: bold;">*</span>cp.<span style="color: #000000; font-weight: bold;">*</span>snippets<span style="color: #ff0000;">''</span><span style="color: #000000; font-weight: bold;">`</span> ; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-R</span> bbb.html <span style="color: #007800;">$f</span><span style="color: #000000; font-weight: bold;">/</span> ; <span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2009%2F01%2F14%2Fcp-a-symlink-to-multiple-directories%2F&amp;title=cp%20a%20symlink%20to%20multiple%20directories&amp;notes=Today%20I%20wanted%20to%20copy%20a%20symlink%20to%20many%20different%20directories.%20So%20I%20tried%20the%20following%3A%0D%0A%0D%0Afor%20f%20in%20%60find%20.%20-regex%20%27%27.%2Acp.%2Asnippets%27%27%60%20%3B%20do%20cp%20bbb.html%20%24f%2F%20%3B%20done%0D%0AWhich%20returned%3A%0D%0A%0D%0Acp%3A%20cannot%20stat%20%60bbb.html%27%3A%20No%20such%20file%20or%20directory%0D%0Abbb.html%20i" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2009%2F01%2F14%2Fcp-a-symlink-to-multiple-directories%2F&amp;title=cp%20a%20symlink%20to%20multiple%20directories" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2009%2F01%2F14%2Fcp-a-symlink-to-multiple-directories%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=cp%20a%20symlink%20to%20multiple%20directories%20-%20http%3A%2F%2Feigenjoy.com%2F2009%2F01%2F14%2Fcp-a-symlink-to-multiple-directories%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2009%2F01%2F14%2Fcp-a-symlink-to-multiple-directories%2F&amp;t=cp%20a%20symlink%20to%20multiple%20directories" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2009%2F01%2F14%2Fcp-a-symlink-to-multiple-directories%2F&amp;title=cp%20a%20symlink%20to%20multiple%20directories&amp;annotation=Today%20I%20wanted%20to%20copy%20a%20symlink%20to%20many%20different%20directories.%20So%20I%20tried%20the%20following%3A%0D%0A%0D%0Afor%20f%20in%20%60find%20.%20-regex%20%27%27.%2Acp.%2Asnippets%27%27%60%20%3B%20do%20cp%20bbb.html%20%24f%2F%20%3B%20done%0D%0AWhich%20returned%3A%0D%0A%0D%0Acp%3A%20cannot%20stat%20%60bbb.html%27%3A%20No%20such%20file%20or%20directory%0D%0Abbb.html%20i" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2009%2F01%2F14%2Fcp-a-symlink-to-multiple-directories%2F&amp;t=cp%20a%20symlink%20to%20multiple%20directories" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2009%2F01%2F14%2Fcp-a-symlink-to-multiple-directories%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2009/01/14/cp-a-symlink-to-multiple-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fixing do_mysql hanging or install problems on mac os x</title>
		<link>http://eigenjoy.com/2008/11/20/fixing-do_mysql-hanging-or-install-problems-on-mac-os-x/</link>
		<comments>http://eigenjoy.com/2008/11/20/fixing-do_mysql-hanging-or-install-problems-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 16:57:03 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/11/20/fixing-do_mysql-hanging-or-install-problems-on-mac-os-x/</guid>
		<description><![CDATA[Just a quick tip:
If you&#8217;re having trouble getting do_mysql to install on Mac OS X. Try the following:

$ locate mysql_config
/usr/local/mysql/bin/mysql_config

The directory /usr/local/mysql above is your mysql directory. Then try to install do_mysql with the following command (split for readability):

$ gem install do_mysql -- \
   --with-mysql-dir="/usr/local/mysql/" \
   --with-mysql-config="/usr/local/mysql/bin/mysql_config"

This solution was found here. [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick tip:</p>
<p>If you&#8217;re having trouble getting <tt>do_mysql</tt> to install on Mac OS X. Try the following:</p>
<pre>
$ locate mysql_config
/usr/local/mysql/bin/mysql_config
</pre>
<p>The directory <tt>/usr/local/mysql</tt> above is your mysql directory. Then try to install <tt>do_mysql</tt> with the following command (split for readability):</p>
<pre>
$ gem install do_mysql -- \
   --with-mysql-dir="/usr/local/mysql/" \
   --with-mysql-config="/usr/local/mysql/bin/mysql_config"
</pre>
<p>This solution was found <a href="http://groups.google.com/group/merb/msg/63d160d7d690e4d7">here</a>. I experienced the problem while trying to get merb to run with datamapper on mysql.</p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F11%2F20%2Ffixing-do_mysql-hanging-or-install-problems-on-mac-os-x%2F&amp;title=fixing%20do_mysql%20hanging%20or%20install%20problems%20on%20mac%20os%20x&amp;notes=Just%20a%20quick%20tip%3A%0D%0A%0D%0AIf%20you%27re%20having%20trouble%20getting%20do_mysql%20to%20install%20on%20Mac%20OS%20X.%20Try%20the%20following%3A%0D%0A%0D%0A%24%20locate%20mysql_config%0D%0A%2Fusr%2Flocal%2Fmysql%2Fbin%2Fmysql_config%0D%0A%0D%0A%0D%0AThe%20directory%20%2Fusr%2Flocal%2Fmysql%20above%20is%20your%20mysql%20directory.%20Then%20try%20to%20insta" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F11%2F20%2Ffixing-do_mysql-hanging-or-install-problems-on-mac-os-x%2F&amp;title=fixing%20do_mysql%20hanging%20or%20install%20problems%20on%20mac%20os%20x" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F11%2F20%2Ffixing-do_mysql-hanging-or-install-problems-on-mac-os-x%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=fixing%20do_mysql%20hanging%20or%20install%20problems%20on%20mac%20os%20x%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F11%2F20%2Ffixing-do_mysql-hanging-or-install-problems-on-mac-os-x%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F11%2F20%2Ffixing-do_mysql-hanging-or-install-problems-on-mac-os-x%2F&amp;t=fixing%20do_mysql%20hanging%20or%20install%20problems%20on%20mac%20os%20x" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F11%2F20%2Ffixing-do_mysql-hanging-or-install-problems-on-mac-os-x%2F&amp;title=fixing%20do_mysql%20hanging%20or%20install%20problems%20on%20mac%20os%20x&amp;annotation=Just%20a%20quick%20tip%3A%0D%0A%0D%0AIf%20you%27re%20having%20trouble%20getting%20do_mysql%20to%20install%20on%20Mac%20OS%20X.%20Try%20the%20following%3A%0D%0A%0D%0A%24%20locate%20mysql_config%0D%0A%2Fusr%2Flocal%2Fmysql%2Fbin%2Fmysql_config%0D%0A%0D%0A%0D%0AThe%20directory%20%2Fusr%2Flocal%2Fmysql%20above%20is%20your%20mysql%20directory.%20Then%20try%20to%20insta" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F11%2F20%2Ffixing-do_mysql-hanging-or-install-problems-on-mac-os-x%2F&amp;t=fixing%20do_mysql%20hanging%20or%20install%20problems%20on%20mac%20os%20x" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F11%2F20%2Ffixing-do_mysql-hanging-or-install-problems-on-mac-os-x%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/11/20/fixing-do_mysql-hanging-or-install-problems-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>run multiple rake tasks simultaneously</title>
		<link>http://eigenjoy.com/2008/10/22/run-multiple-rake-tasks-simultaneously/</link>
		<comments>http://eigenjoy.com/2008/10/22/run-multiple-rake-tasks-simultaneously/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 17:33:22 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/10/22/run-multiple-rake-tasks-simultaneously/</guid>
		<description><![CDATA[Here&#8217;s a quick and simple tip for using threads and Rakefiles:

task :one do
  puts &#34;start one&#34;
  sleep 10 * rand
  puts &#34;one done&#34;
end
&#160;
task :two do
  puts &#34;start two&#34;
  sleep 10 * rand
  puts &#34;two done&#34;
end
&#160;
task :three do
  puts &#34;start three&#34;
  sleep 10 * rand
  puts &#34;three [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick and simple tip for using threads and Rakefiles:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">task <span style="color:#ff3333; font-weight:bold;">:one</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;start one&quot;</span>
  <span style="color:#CC0066; font-weight:bold;">sleep</span> <span style="color:#006666;">10</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#CC0066; font-weight:bold;">rand</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;one done&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
task <span style="color:#ff3333; font-weight:bold;">:two</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;start two&quot;</span>
  <span style="color:#CC0066; font-weight:bold;">sleep</span> <span style="color:#006666;">10</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#CC0066; font-weight:bold;">rand</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;two done&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
task <span style="color:#ff3333; font-weight:bold;">:three</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;start three&quot;</span>
  <span style="color:#CC0066; font-weight:bold;">sleep</span> <span style="color:#006666;">10</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#CC0066; font-weight:bold;">rand</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;three done&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
desc <span style="color:#996600;">&quot;Submit all feed to amazon for SITE&quot;</span>
task <span style="color:#ff3333; font-weight:bold;">:do_all</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  threads = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#006600; font-weight:bold;">%</span>w<span style="color:#006600; font-weight:bold;">&#123;</span>one two three<span style="color:#006600; font-weight:bold;">&#125;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>number<span style="color:#006600; font-weight:bold;">|</span>
    threads <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#CC00FF; font-weight:bold;">Thread</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>number<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>my_number<span style="color:#006600; font-weight:bold;">|</span>
      <span style="color:#6666ff; font-weight:bold;">Rake::Task</span><span style="color:#006600; font-weight:bold;">&#91;</span>my_number<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">invoke</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  threads.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>thread<span style="color:#006600; font-weight:bold;">|</span> thread.<span style="color:#9900CC;">join</span> <span style="color:#006600; font-weight:bold;">&#125;</span> 
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Running it gives something like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ rake do_all
start one
start two
start three
three done
one done
two done</pre></div></div>

<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F10%2F22%2Frun-multiple-rake-tasks-simultaneously%2F&amp;title=run%20multiple%20rake%20tasks%20simultaneously&amp;notes=Here%27s%20a%20quick%20and%20simple%20tip%20for%20using%20threads%20and%20Rakefiles%3A%0D%0A%0D%0A%0D%0Atask%20%3Aone%20do%0D%0A%20%20puts%20%22start%20one%22%0D%0A%20%20sleep%2010%20%2A%20rand%0D%0A%20%20puts%20%22one%20done%22%0D%0Aend%0D%0A%0D%0Atask%20%3Atwo%20do%0D%0A%20%20puts%20%22start%20two%22%0D%0A%20%20sleep%2010%20%2A%20rand%0D%0A%20%20puts%20%22two%20done%22%0D%0Aend%0D%0A%0D%0Atask%20%3Athree%20do%0D%0A%20%20puts%20%22" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F10%2F22%2Frun-multiple-rake-tasks-simultaneously%2F&amp;title=run%20multiple%20rake%20tasks%20simultaneously" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F10%2F22%2Frun-multiple-rake-tasks-simultaneously%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=run%20multiple%20rake%20tasks%20simultaneously%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F10%2F22%2Frun-multiple-rake-tasks-simultaneously%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F10%2F22%2Frun-multiple-rake-tasks-simultaneously%2F&amp;t=run%20multiple%20rake%20tasks%20simultaneously" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F10%2F22%2Frun-multiple-rake-tasks-simultaneously%2F&amp;title=run%20multiple%20rake%20tasks%20simultaneously&amp;annotation=Here%27s%20a%20quick%20and%20simple%20tip%20for%20using%20threads%20and%20Rakefiles%3A%0D%0A%0D%0A%0D%0Atask%20%3Aone%20do%0D%0A%20%20puts%20%22start%20one%22%0D%0A%20%20sleep%2010%20%2A%20rand%0D%0A%20%20puts%20%22one%20done%22%0D%0Aend%0D%0A%0D%0Atask%20%3Atwo%20do%0D%0A%20%20puts%20%22start%20two%22%0D%0A%20%20sleep%2010%20%2A%20rand%0D%0A%20%20puts%20%22two%20done%22%0D%0Aend%0D%0A%0D%0Atask%20%3Athree%20do%0D%0A%20%20puts%20%22" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F10%2F22%2Frun-multiple-rake-tasks-simultaneously%2F&amp;t=run%20multiple%20rake%20tasks%20simultaneously" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F10%2F22%2Frun-multiple-rake-tasks-simultaneously%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/10/22/run-multiple-rake-tasks-simultaneously/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a simple script to organize downloads</title>
		<link>http://eigenjoy.com/2008/09/04/a-simple-script-to-organize-downloads/</link>
		<comments>http://eigenjoy.com/2008/09/04/a-simple-script-to-organize-downloads/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 23:04:22 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/09/04/a-simple-script-to-organize-downloads/</guid>
		<description><![CDATA[Description
Organize all files in a given folder by date.  This is commonly used to organize a &#8220;Downloads&#8221; folder. Currently this script will only move files more than 24 hours old. This is to protect against moving a file as it is downloaded.
Motivation
I love SafariStand. One of the features that I love is the sort-downloads-by-date [...]]]></description>
			<content:encoded><![CDATA[<h2>Description</h2>
<p>Organize all files in a given folder by date.  This is commonly used to organize a &#8220;Downloads&#8221; folder. Currently this script will only move files more than 24 hours old. This is to protect against moving a file as it is downloaded.</p>
<h2>Motivation</h2>
<p>I love <a href="http://hetima.com/safari/stand-e.html">SafariStand</a>. One of the features that I love is the sort-downloads-by-date feature. Now that I have moved to Firefox I really miss this feature. I been unable to find a good extension that will sort my downloads in a similar way.  This script was written as an simple way to fill that gap.</p>
<h2>Setup</h2>
<p>I keep a ~/bin directory where I keep simple scripts such as this. Then setup a crontab such as the following:</p>
<pre>
*/10 * * * * /usr/local/bin/ruby /Users/nathan/bin/organize_folder_by_date.rb /Users/nathan/Desktop/Downloads
</pre>
<h2>Acquiring</h2>
<p>It is available on github:  <a href="http://github.com/jashmenn/download_sort/tree/master/organize_folder_by_date.rb">here</a> <a href="http://github.com/jashmenn/download_sort/tree/master%2Forganize_folder_by_date.rb?raw=true">(raw)</a>.<br />
or</p>
<pre>
git clone git://github.com/jashmenn/download_sort.git
</pre>
</p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F09%2F04%2Fa-simple-script-to-organize-downloads%2F&amp;title=a%20simple%20script%20to%20organize%20downloads&amp;notes=Description%0D%0AOrganize%20all%20files%20in%20a%20given%20folder%20by%20date.%20%20This%20is%20commonly%20used%20to%20organize%20a%20%22Downloads%22%20folder.%20Currently%20this%20script%20will%20only%20move%20files%20more%20than%2024%20hours%20old.%20This%20is%20to%20protect%20against%20moving%20a%20file%20as%20it%20is%20downloaded.%0D%0A%0D%0AMo" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F09%2F04%2Fa-simple-script-to-organize-downloads%2F&amp;title=a%20simple%20script%20to%20organize%20downloads" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F09%2F04%2Fa-simple-script-to-organize-downloads%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=a%20simple%20script%20to%20organize%20downloads%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F09%2F04%2Fa-simple-script-to-organize-downloads%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F09%2F04%2Fa-simple-script-to-organize-downloads%2F&amp;t=a%20simple%20script%20to%20organize%20downloads" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F09%2F04%2Fa-simple-script-to-organize-downloads%2F&amp;title=a%20simple%20script%20to%20organize%20downloads&amp;annotation=Description%0D%0AOrganize%20all%20files%20in%20a%20given%20folder%20by%20date.%20%20This%20is%20commonly%20used%20to%20organize%20a%20%22Downloads%22%20folder.%20Currently%20this%20script%20will%20only%20move%20files%20more%20than%2024%20hours%20old.%20This%20is%20to%20protect%20against%20moving%20a%20file%20as%20it%20is%20downloaded.%0D%0A%0D%0AMo" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F09%2F04%2Fa-simple-script-to-organize-downloads%2F&amp;t=a%20simple%20script%20to%20organize%20downloads" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F09%2F04%2Fa-simple-script-to-organize-downloads%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/09/04/a-simple-script-to-organize-downloads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>use Quick Look as a Firefox application handler</title>
		<link>http://eigenjoy.com/2008/08/26/use-quick-look-as-a-firefox-application-handler/</link>
		<comments>http://eigenjoy.com/2008/08/26/use-quick-look-as-a-firefox-application-handler/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 20:51:45 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[shell]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/08/26/use-quick-look-as-a-firefox-application-handler/</guid>
		<description><![CDATA[I really dislike getting screen-shots in the format of power-point files. Thankfully, 10.5&#8217;s Quick Look can help me preview power-point files. What I needed was a way to have Firefox automatically Quick Look all power-point files that I downloaded. Here&#8217;s how to do it:
Open up Script Editor and paste this:

on open filelist
	repeat with i in [...]]]></description>
			<content:encoded><![CDATA[<p>I really dislike getting screen-shots in the format of power-point files. Thankfully, 10.5&#8217;s Quick Look can help me preview power-point files. What I needed was a way to have Firefox automatically Quick Look all power-point files that I downloaded. Here&#8217;s how to do it:</p>
<p>Open up Script Editor and paste this:</p>

<div class="wp_syntax"><div class="code"><pre class="applescript" style="font-family:monospace;"><span style="color: #ff0033; font-weight: bold;">on</span> <span style="color: #0066ff;">open</span> filelist
	<span style="color: #ff0033; font-weight: bold;">repeat</span> <span style="color: #ff0033; font-weight: bold;">with</span> i <span style="color: #ff0033; font-weight: bold;">in</span> filelist
		<span style="color: #0066ff;">do shell script</span> <span style="color: #009900;">&quot;qlmanage -p '&quot;</span> <span style="color: #000000;">&amp;</span> <span style="color: #0066ff;">POSIX path</span> <span style="color: #ff0033; font-weight: bold;">of</span> i <span style="color: #000000;">&amp;</span> <span style="color: #009900;">&quot;' &gt;&amp; /dev/null &amp;&quot;</span>
	<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">repeat</span>
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #0066ff;">open</span></pre></div></div>

<p><a href='http://www.xcombinator.com/wp-content/uploads/2008/08/picture-2.png' title='picture-2.png'><img src='http://www.xcombinator.com/wp-content/uploads/2008/08/picture-2.thumbnail.png' alt='picture-2.png' /></a></p>
<p><b>File > Save As&#8230;</b>. Choose &#8220;Application&#8221; and save it somewhere it won&#8217;t move. I choose <tt>/Applications/ql.app</tt>.</p>
<p>Now simply choose <tt>ql.app</tt> next time you download a power-point file or set it up in Firefox&#8217;s <b>Preferences > Applications</b>.</p>
<p><a href='http://www.xcombinator.com/wp-content/uploads/2008/08/picture-3.png' title='picture-3.png'><img src='http://www.xcombinator.com/wp-content/uploads/2008/08/picture-3.thumbnail.png' alt='picture-3.png' /></a></p>
<p><tt>qlmanage</tt> is the command-line tool to open files in Quick Look. By using AppleScript you are able to create this thin &#8220;application&#8221; that Firefox will trust and give a downloaded file (As opposed to a shell script, which Firefox will not let you choose as a file handler).</p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F26%2Fuse-quick-look-as-a-firefox-application-handler%2F&amp;title=use%20Quick%20Look%20as%20a%20Firefox%20application%20handler&amp;notes=I%20really%20dislike%20getting%20screen-shots%20in%20the%20format%20of%20power-point%20files.%20Thankfully%2C%2010.5%27s%20Quick%20Look%20can%20help%20me%20preview%20power-point%20files.%20What%20I%20needed%20was%20a%20way%20to%20have%20Firefox%20automatically%20Quick%20Look%20all%20power-point%20files%20that%20I%20downloaded.%20H" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F26%2Fuse-quick-look-as-a-firefox-application-handler%2F&amp;title=use%20Quick%20Look%20as%20a%20Firefox%20application%20handler" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F26%2Fuse-quick-look-as-a-firefox-application-handler%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=use%20Quick%20Look%20as%20a%20Firefox%20application%20handler%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F26%2Fuse-quick-look-as-a-firefox-application-handler%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F26%2Fuse-quick-look-as-a-firefox-application-handler%2F&amp;t=use%20Quick%20Look%20as%20a%20Firefox%20application%20handler" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F26%2Fuse-quick-look-as-a-firefox-application-handler%2F&amp;title=use%20Quick%20Look%20as%20a%20Firefox%20application%20handler&amp;annotation=I%20really%20dislike%20getting%20screen-shots%20in%20the%20format%20of%20power-point%20files.%20Thankfully%2C%2010.5%27s%20Quick%20Look%20can%20help%20me%20preview%20power-point%20files.%20What%20I%20needed%20was%20a%20way%20to%20have%20Firefox%20automatically%20Quick%20Look%20all%20power-point%20files%20that%20I%20downloaded.%20H" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F26%2Fuse-quick-look-as-a-firefox-application-handler%2F&amp;t=use%20Quick%20Look%20as%20a%20Firefox%20application%20handler" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F26%2Fuse-quick-look-as-a-firefox-application-handler%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/08/26/use-quick-look-as-a-firefox-application-handler/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>lftp has an option mirror:order</title>
		<link>http://eigenjoy.com/2008/08/25/lftp-has-an-option-mirrororder/</link>
		<comments>http://eigenjoy.com/2008/08/25/lftp-has-an-option-mirrororder/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 17:41:17 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/08/25/lftp-has-an-option-mirrororder/</guid>
		<description><![CDATA[We&#8217;ve been using lftp for years here. It&#8217;s stable and has a volume of options. I just found out today that lftp has an option to set the order in which files are uploaded if you are using the mirror command. You can set it like so:
set mirror:order '*.jpg *.gif *.png *.js *.css * */'
This [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been using <a href="http://lftp.yar.ru/">lftp</a> for years here. It&#8217;s stable and has a volume of options. I just found out today that lftp has an option to set the order in which files are uploaded if you are using the <tt>mirror</tt> command. You can set it like so:</p>
<p><tt>set mirror:order '*.jpg *.gif *.png *.js *.css * */'</tt></p>
<p>This will send first jpg, then gif, then png files etc. This is very handy if you are mirroring an entire website and you want the images to go live before the html does. </p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F25%2Flftp-has-an-option-mirrororder%2F&amp;title=lftp%20has%20an%20option%20%3Ctt%3Emirror%3Aorder%3C%2Ftt%3E&amp;notes=We%27ve%20been%20using%20lftp%20for%20years%20here.%20It%27s%20stable%20and%20has%20a%20volume%20of%20options.%20I%20just%20found%20out%20today%20that%20lftp%20has%20an%20option%20to%20set%20the%20order%20in%20which%20files%20are%20uploaded%20if%20you%20are%20using%20the%20mirror%20command.%20You%20can%20set%20it%20like%20so%3A%0D%0A%0D%0Aset%20mirror%3Aorde" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F25%2Flftp-has-an-option-mirrororder%2F&amp;title=lftp%20has%20an%20option%20%3Ctt%3Emirror%3Aorder%3C%2Ftt%3E" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F25%2Flftp-has-an-option-mirrororder%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=lftp%20has%20an%20option%20%3Ctt%3Emirror%3Aorder%3C%2Ftt%3E%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F25%2Flftp-has-an-option-mirrororder%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F25%2Flftp-has-an-option-mirrororder%2F&amp;t=lftp%20has%20an%20option%20%3Ctt%3Emirror%3Aorder%3C%2Ftt%3E" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F25%2Flftp-has-an-option-mirrororder%2F&amp;title=lftp%20has%20an%20option%20%3Ctt%3Emirror%3Aorder%3C%2Ftt%3E&amp;annotation=We%27ve%20been%20using%20lftp%20for%20years%20here.%20It%27s%20stable%20and%20has%20a%20volume%20of%20options.%20I%20just%20found%20out%20today%20that%20lftp%20has%20an%20option%20to%20set%20the%20order%20in%20which%20files%20are%20uploaded%20if%20you%20are%20using%20the%20mirror%20command.%20You%20can%20set%20it%20like%20so%3A%0D%0A%0D%0Aset%20mirror%3Aorde" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F25%2Flftp-has-an-option-mirrororder%2F&amp;t=lftp%20has%20an%20option%20%3Ctt%3Emirror%3Aorder%3C%2Ftt%3E" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F08%2F25%2Flftp-has-an-option-mirrororder%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/08/25/lftp-has-an-option-mirrororder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X color showing ESC[whatever for git-diff colors (and more)</title>
		<link>http://eigenjoy.com/2008/07/23/mac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more/</link>
		<comments>http://eigenjoy.com/2008/07/23/mac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 16:10:54 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/07/23/mac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more/</guid>
		<description><![CDATA[Since my upgrade to OS X 10.5 I have been having a terrible time getting colors to work with git.
Originally I was using OS X 10.5.4, git version 1.5.3.1, and iTerm or Terminal.app. $TERM=xterm or xterm-color. I have color with PS1, ls, vim and most git tasks. However, git diff (or git show) always screws [...]]]></description>
			<content:encoded><![CDATA[<p>Since my upgrade to OS X 10.5 I have been having a terrible time getting colors to work with git.</p>
<p>Originally I was using OS X 10.5.4, <tt>git</tt> version 1.5.3.1, and <tt>iTerm</tt> or <tt>Terminal.app</tt>. <tt>$TERM=xterm</tt> or <tt>xterm-color</tt>. I have color with <tt>PS1</tt>, <tt>ls</tt>, <tt>vim</tt> and most git tasks. However, <tt>git diff</tt> (or <tt>git show</tt>) always screws up the diff by showing the <tt>ESC[</tt> characters instead of colors. For instance:</p>
<pre>
  [nathan@nate ~/s3]$ git show 67d254ec17f
  ESC[33mcommit 67d254ec17fdc507765ddee1feb2a14e5896e79fESC[m
</pre>
<p>I searched and searched wasn't able to figure out how to fix this. It was suggested on the github forum that I upgrade to git 1.5.6.4. Unfortunately not only did it not fix the color in <tt>git diff</tt>, it broke the color in <tt>git status</tt> which was working previously.</p>
<p>After about a week of poking around on and off I discovered that the problem was not <tt>git</tt>, but my <tt>GIT_PAGER</tt> which is <tt>more</tt>.  If I tried <tt>GIT_PAGER=cat git-diff</tt> then the color output just fine. <tt>less</tt> and <tt>more</tt> use the same environment variable <tt>LESS</tt> (<tt>man less</tt> for details). And <tt>less</tt> was outputting the colors as raw escape codes.</p>
<p><tt>man less</tt> shows that the option <tt>-R</tt> is defined as follows:</p>
<pre>
       -R or --RAW-CONTROL-CHARS
              Like  -r,  but  only  ANSI "color" escape
              sequences are output in "raw" form.
</pre>
</p>
<p>That would do it.</p>
<p>
After perusing the man page for a while I settled on adding this to my<br />
<tt>~/.profile</tt>:</p>
<pre>
  export LESS="-erX"
</pre>
<p>At the end of the day, this tip is really about <tt>less</tt> and how it interprets colors and probably has little to do with git. Even so, I only found this odd behavior while using git. Hopefully this post will help someone who is having similar issues.</p>
<p> As a side note, below is an example of how to configure your colors for <tt>git-diff</tt> and other commands.  </p>
<pre>
[user]
    name = Your Name
    email = y...@yours.com
[color]
    branch = auto
    status = auto
    diff = auto
[color "diff"]
    meta = yellow
    frag = cyan
    old = red
    new = green
[color "branch"]
    current = yellow reverse
    local = yellow
    remote = green
[color "status"]
    added = yellow
    changed = green
    untracked = cyan
[alias]
    st = status
    ci = commit
    co = checkout
    br = branch
</pre>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F07%2F23%2Fmac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more%2F&amp;title=Mac%20OS%20X%20color%20showing%20ESC%5Bwhatever%20for%20git-diff%20colors%20%28and%20more%29&amp;notes=Since%20my%20upgrade%20to%20OS%20X%2010.5%20I%20have%20been%20having%20a%20terrible%20time%20getting%20colors%20to%20work%20with%20git.%0D%0A%0D%0AOriginally%20I%20was%20using%20OS%20X%2010.5.4%2C%20git%20version%201.5.3.1%2C%20and%20iTerm%20or%20Terminal.app.%20%24TERM%3Dxterm%20or%20xterm-color.%20I%20have%20color%20with%20PS1%2C%20ls%2C%20vim%20and%20mo" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F07%2F23%2Fmac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more%2F&amp;title=Mac%20OS%20X%20color%20showing%20ESC%5Bwhatever%20for%20git-diff%20colors%20%28and%20more%29" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F07%2F23%2Fmac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=Mac%20OS%20X%20color%20showing%20ESC%5Bwhatever%20for%20git-diff%20colors%20%28and%20more%29%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F07%2F23%2Fmac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F07%2F23%2Fmac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more%2F&amp;t=Mac%20OS%20X%20color%20showing%20ESC%5Bwhatever%20for%20git-diff%20colors%20%28and%20more%29" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F07%2F23%2Fmac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more%2F&amp;title=Mac%20OS%20X%20color%20showing%20ESC%5Bwhatever%20for%20git-diff%20colors%20%28and%20more%29&amp;annotation=Since%20my%20upgrade%20to%20OS%20X%2010.5%20I%20have%20been%20having%20a%20terrible%20time%20getting%20colors%20to%20work%20with%20git.%0D%0A%0D%0AOriginally%20I%20was%20using%20OS%20X%2010.5.4%2C%20git%20version%201.5.3.1%2C%20and%20iTerm%20or%20Terminal.app.%20%24TERM%3Dxterm%20or%20xterm-color.%20I%20have%20color%20with%20PS1%2C%20ls%2C%20vim%20and%20mo" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F07%2F23%2Fmac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more%2F&amp;t=Mac%20OS%20X%20color%20showing%20ESC%5Bwhatever%20for%20git-diff%20colors%20%28and%20more%29" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F07%2F23%2Fmac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/07/23/mac-os-x-color-showing-escwhatever-for-git-diff-colors-and-more/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>RailsConf08: (opinion) ttyrec and my advice to session presenters</title>
		<link>http://eigenjoy.com/2008/06/03/railsconf08-opinion-ttyrec-and-my-advice-to-session-presenters/</link>
		<comments>http://eigenjoy.com/2008/06/03/railsconf08-opinion-ttyrec-and-my-advice-to-session-presenters/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 00:04:12 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[shell]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[railsconf08]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/06/03/railsconf08-opinion-ttyrec-and-my-advice-to-session-presenters/</guid>
		<description><![CDATA[RailsConf was fantastic. A huge thank-you goes out to everyone who took the time to create presentations and sessions. Creating them is a lot of work and I commend you for preparing them. One common negative theme, however, was this: Live coding isn&#8217;t efficient and it is bug-prone. It doesn&#8217;t matter who you are or [...]]]></description>
			<content:encoded><![CDATA[<p>RailsConf was fantastic. A huge thank-you goes out to everyone who took the time to create presentations and sessions. Creating them is a lot of work and I commend you for preparing them. One common negative theme, however, was this: Live coding isn&#8217;t efficient and it is bug-prone. It doesn&#8217;t matter who you are or how good you are, you&#8217;re not going to be maximally efficient presenting if you are performing live coding. Even if you practice, when you get up on stage <b>you will make typos</b> and <b>it will not run exactly as planned</b>. If you&#8217;re not convinced, let me give you a list of people who did live coding this weekend and made typos or mistakes:</p>
<ul>
<li><a href="http://ola-bini.blogspot.com/">Ola Bini</a> &#8211; jruby core developer</li>
<li><a href="http://www.37signals.com/svn/posts/231-please-welcome-jeremy-kemper-to-37signals">Jeremy Kemper</a> &#8211; 37signals</li>
<li><a href="http://engineyard.com/whoweare">Ezra Zygmuntowicz</a> &#8211; EngineYard</li>
</ul>
<p>Each of these guys are Ruby-Rock-Stars and they are way smarter than I am. The content of what they presented was, in every case, phenomenal. They are some of the best programmers in our community and if they can&#8217;t give a presentation without typos and mistakes I can almost guarantee that I (you) won&#8217;t be able to either. When you get in front of 300 people, start typing, start talking, and realize you&#8217;re under the pressure of time (and the crowd) it changes your ability to focus on any one task and it is very hard to not make mistakes. My theory is that one can present a <b>live-like</b> demonstration with no loss of effectiveness.</p>
<p>The most obvious way to do a live-like demonstration is by recording a screencast. You could also use AppleScript or library like <a href="http://gadgets.inventivelabs.com.au/castanaut">castanaut</a> (if you are on a mac). The app I&#8217;d like to recommend today is <tt><a href="http://0xcc.net/ttyrec/index.html.en">ttyrec</a></tt> . It&#8217;s a great little command-line app (it compiles flawlessly on my OS X 10.4) and it <b>records the output of a shell session</b> and <b>can play it back like you are typing in real time</b>. I see two major benefits to this:</p>
<ul>
<li><b>You can&#8217;t make mistakes.</b> It&#8217;s recorded <i>and</i> it&#8217;s storing the output all into a text file. This means that if the network fritzes out when you&#8217;re on stage it doesn&#8217;t matter. Network outages, ill-timed bugs, etc. become irrelevant because the commands are not actually run at playback time (the stderr/stdout stream is saved into a text file).</li>
<li><b>You can talk while you&#8217;re playing the demo.</b> They do this in TV all the time (think <i>Friends</i>). In a scene where actors play video games they don&#8217;t actually play the game and act at the same time. The video games are recorded so the actor can focus on <b>acting</b>. When your computer is playing-back the work you&#8217;ve prepared before hand you can focus on talking while the &#8220;typing&#8221; is happening on the screen. You don&#8217;t have to do the mental context-switching of talking and typing simultaneously which causes mistakes that cost you (and maybe more importantly, your audience) time.</li>
</ul>
<p> You may say &#8220;Well, I don&#8217;t want to do a recording, I want my demo to be live&#8221;. Here&#8217;s my view on that: <i>Most people don&#8217;t care if your demo is actually live</i>. When you&#8217;re on stage and what you&#8217;re showing is prepared it&#8217;s assumed to be in the perfect environment because you&#8217;ve been testing and developing in that exact environment. Even if your demo is truly live it still seems &#8220;contrived&#8221; in that we, the viewer, can never actually see all the pre-work, installing, compiling, back end etc. that was prepared behind the scenes. As <a href="http://blog.hasmanythrough.com/2008/5/31/quick-railsconf-update">Josh Susser</a> pointed out: &#8220;keep in mind Lansford&#8217;s Corollary to <a href="http://en.wikipedia.org/wiki/Clarke's_three_laws">Clarke&#8217;s Third Law</a>: &#8216;Any sufficiently advanced technology is indistinguishable from a rigged demo.&#8217;&#8221;</p>
<p>I believe that recording your shell with <tt>ttyrec</tt> or similar is exactly as effective as a live demo. If I, as a listener, am interested in your project I&#8217;ll be the same amount of convinced to download/try/buy even if your demo is recorded. In fact, I&#8217;ll be a lot more convinced to try it out if you play something recorded that runs perfectly as opposed to a system that is so complicated or buggy that even the author is having problems using it.</p>
<p> So <i>please</i> record your &#8220;live coding&#8221; before hand. Your audience will thank you, you&#8217;ll avoid embarrassment, and you&#8217;ll be more effective for it</p>
<p><b>UPDATE</b> I removed Yehuda Katz from the list of non-recorded presenters. My apologies go out to Yehuda who pointed out that he did record his presentation before-hand.</p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Frailsconf08-opinion-ttyrec-and-my-advice-to-session-presenters%2F&amp;title=RailsConf08%3A%20%28opinion%29%20%3Ctt%3Ettyrec%3C%2Ftt%3E%20and%20my%20advice%20to%20session%20presenters&amp;notes=RailsConf%20was%20fantastic.%20A%20huge%20thank-you%20goes%20out%20to%20everyone%20who%20took%20the%20time%20to%20create%20presentations%20and%20sessions.%20Creating%20them%20is%20a%20lot%20of%20work%20and%20I%20commend%20you%20for%20preparing%20them.%20One%20common%20negative%20theme%2C%20however%2C%20was%20this%3A%20Live%20coding%20isn%27" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Frailsconf08-opinion-ttyrec-and-my-advice-to-session-presenters%2F&amp;title=RailsConf08%3A%20%28opinion%29%20%3Ctt%3Ettyrec%3C%2Ftt%3E%20and%20my%20advice%20to%20session%20presenters" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Frailsconf08-opinion-ttyrec-and-my-advice-to-session-presenters%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=RailsConf08%3A%20%28opinion%29%20%3Ctt%3Ettyrec%3C%2Ftt%3E%20and%20my%20advice%20to%20session%20presenters%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Frailsconf08-opinion-ttyrec-and-my-advice-to-session-presenters%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Frailsconf08-opinion-ttyrec-and-my-advice-to-session-presenters%2F&amp;t=RailsConf08%3A%20%28opinion%29%20%3Ctt%3Ettyrec%3C%2Ftt%3E%20and%20my%20advice%20to%20session%20presenters" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Frailsconf08-opinion-ttyrec-and-my-advice-to-session-presenters%2F&amp;title=RailsConf08%3A%20%28opinion%29%20%3Ctt%3Ettyrec%3C%2Ftt%3E%20and%20my%20advice%20to%20session%20presenters&amp;annotation=RailsConf%20was%20fantastic.%20A%20huge%20thank-you%20goes%20out%20to%20everyone%20who%20took%20the%20time%20to%20create%20presentations%20and%20sessions.%20Creating%20them%20is%20a%20lot%20of%20work%20and%20I%20commend%20you%20for%20preparing%20them.%20One%20common%20negative%20theme%2C%20however%2C%20was%20this%3A%20Live%20coding%20isn%27" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Frailsconf08-opinion-ttyrec-and-my-advice-to-session-presenters%2F&amp;t=RailsConf08%3A%20%28opinion%29%20%3Ctt%3Ettyrec%3C%2Ftt%3E%20and%20my%20advice%20to%20session%20presenters" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Frailsconf08-opinion-ttyrec-and-my-advice-to-session-presenters%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/06/03/railsconf08-opinion-ttyrec-and-my-advice-to-session-presenters/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Pair Programming with screen</title>
		<link>http://eigenjoy.com/2008/06/03/pair-programming-with-screen/</link>
		<comments>http://eigenjoy.com/2008/06/03/pair-programming-with-screen/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 15:21:25 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[shell]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/06/03/pair-programming-with-screen/</guid>
		<description><![CDATA[I want to share a simple tip that I learned from Jim Weirich (author of rake, xml builder, and rubygems) this weekend at RailsConf: You can do pair programming with screen. When I learned about this I asked around and apparently everyone knew about this already, but I had never done it. Here&#8217;s how you [...]]]></description>
			<content:encoded><![CDATA[<p>I want to share a simple tip that I learned from <a href="http://onestepback.org/">Jim Weirich</a> (author of <a href="http://rubyforge.org/users/jimweirich/">rake, xml builder, and rubygems</a>) this weekend at RailsConf: You can do pair programming with <tt>screen</tt>. When I learned about this I asked around and apparently everyone knew about this already, but I had never done it. Here&#8217;s how you can do it too:</p>
<p>Open up <tt>~/.screenrc</tt> add the following lines:</p>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">  multiuser on
  acladd nathan <span style="color: #339933;"># change to your username here</span></pre></div></div>

<p></code></p>
<p>In terminal one start a <tt>screen</tt> session. Then log in as the same user on terminal two and type <tt>screen -x</tt>. Now either user can control and see real time what is going on in the tty. It is possible to do this across users, I believe. See your local man page.</p>
<p>They use this in combination with audio/video chat (Skype or iChat). This way they can see facial expressions, ask for control of the keyboard etc. Jim and co. have keywords for passing control, I believe they are &#8220;drive?&#8221; and &#8220;release.&#8221; The person who wants to take over says &#8220;drive?&#8221; and they are allowed to use the keyboard iff the other person says &#8220;release.&#8221;Seems like a simple, but powerful idea. </p>
<p><b>UPDATE</b> Jim pointed out that they use the terms &#8220;tag&#8221; and &#8220;yield&#8221;. Thanks Jim!</p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Fpair-programming-with-screen%2F&amp;title=Pair%20Programming%20with%20%3Ctt%3Escreen%3C%2Ftt%3E&amp;notes=I%20want%20to%20share%20a%20simple%20tip%20that%20I%20learned%20from%20Jim%20Weirich%20%28author%20of%20rake%2C%20xml%20builder%2C%20and%20rubygems%29%20this%20weekend%20at%20RailsConf%3A%20You%20can%20do%20pair%20programming%20with%20screen.%20When%20I%20learned%20about%20this%20I%20asked%20around%20and%20apparently%20everyone%20knew%20about%20t" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Fpair-programming-with-screen%2F&amp;title=Pair%20Programming%20with%20%3Ctt%3Escreen%3C%2Ftt%3E" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Fpair-programming-with-screen%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=Pair%20Programming%20with%20%3Ctt%3Escreen%3C%2Ftt%3E%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Fpair-programming-with-screen%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Fpair-programming-with-screen%2F&amp;t=Pair%20Programming%20with%20%3Ctt%3Escreen%3C%2Ftt%3E" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Fpair-programming-with-screen%2F&amp;title=Pair%20Programming%20with%20%3Ctt%3Escreen%3C%2Ftt%3E&amp;annotation=I%20want%20to%20share%20a%20simple%20tip%20that%20I%20learned%20from%20Jim%20Weirich%20%28author%20of%20rake%2C%20xml%20builder%2C%20and%20rubygems%29%20this%20weekend%20at%20RailsConf%3A%20You%20can%20do%20pair%20programming%20with%20screen.%20When%20I%20learned%20about%20this%20I%20asked%20around%20and%20apparently%20everyone%20knew%20about%20t" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Fpair-programming-with-screen%2F&amp;t=Pair%20Programming%20with%20%3Ctt%3Escreen%3C%2Ftt%3E" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F06%2F03%2Fpair-programming-with-screen%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/06/03/pair-programming-with-screen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Git from the Bottom Up</title>
		<link>http://eigenjoy.com/2008/05/15/git-from-the-bottom-up/</link>
		<comments>http://eigenjoy.com/2008/05/15/git-from-the-bottom-up/#comments</comments>
		<pubDate>Thu, 15 May 2008 15:34:25 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/05/15/git-from-the-bottom-up/</guid>
		<description><![CDATA[John Wiegley recently wrote a great article about git called Git from the Bottom Up (pdf). I found it to be very helpful in clarifying how git works and that understanding makes git feel more accessible.
Understanding commits is the key to grokking Git. You&#8217;ll know you have reached the Zen plateau of branching wisdom when [...]]]></description>
			<content:encoded><![CDATA[<p>John Wiegley recently wrote a great article about git called <a href="http://www.newartisans.com/blog_files/git.from.bottom.up.php">Git from the Bottom Up</a> <a href="http://www.newartisans.com/blog_assets/git.from.bottom.up.pdf">(pdf)</a>. I found it to be very helpful in clarifying how git works and that understanding makes git feel more accessible.</p>
<blockquote><p>Understanding commits is the key to grokking Git. You&#8217;ll know you have reached the Zen plateau of branching wisdom when your mind contains only commit topologies, leaving behind the confusion of branches, tags, local and remote repositories, etc.</p>
</blockquote>
<p>Even after reading his pdf it took me two days for this idea to sink in.  I finally had my &#8220;ah-ha!-moment&#8221; after I poked around in the <tt>.git/refs</tt> folder for a while.</p>
<p><img src='http://www.xcombinator.com/wp-content/uploads/2008/05/git_pieces.jpg' alt='Git Pieces' /></p>
<p class="caption">Git Pieces: Taken from John Wiegley&#8217;s article, &#8220;Git from the Bottom Up&#8221;</p>
<p>I think I resisted learning the git internals for a while because I didn&#8217;t want to <i>understand</i> it I just wanted to <i>use</i> it. The problem was I wanted to use it like svn and git requires a mental paradigm shift.  After reading John&#8217;s article I&#8217;ve come to realize once again that there are no shortcuts to progress and often the quickest way to learn is to first take the time to understand.</p>
<p>I&#8217;d highly recommend that anyone that still working on &#8220;grokking git&#8221; should take the 30 minutes required to read John&#8217;s article.</p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F05%2F15%2Fgit-from-the-bottom-up%2F&amp;title=Git%20from%20the%20Bottom%20Up&amp;notes=John%20Wiegley%20recently%20wrote%20a%20great%20article%20about%20git%20called%20Git%20from%20the%20Bottom%20Up%20%28pdf%29.%20I%20found%20it%20to%20be%20very%20helpful%20in%20clarifying%20how%20git%20works%20and%20that%20understanding%20makes%20git%20feel%20more%20accessible.%0D%0A%0D%0AUnderstanding%20commits%20is%20the%20key%20to%20grokkin" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F05%2F15%2Fgit-from-the-bottom-up%2F&amp;title=Git%20from%20the%20Bottom%20Up" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F05%2F15%2Fgit-from-the-bottom-up%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=Git%20from%20the%20Bottom%20Up%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F05%2F15%2Fgit-from-the-bottom-up%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F05%2F15%2Fgit-from-the-bottom-up%2F&amp;t=Git%20from%20the%20Bottom%20Up" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F05%2F15%2Fgit-from-the-bottom-up%2F&amp;title=Git%20from%20the%20Bottom%20Up&amp;annotation=John%20Wiegley%20recently%20wrote%20a%20great%20article%20about%20git%20called%20Git%20from%20the%20Bottom%20Up%20%28pdf%29.%20I%20found%20it%20to%20be%20very%20helpful%20in%20clarifying%20how%20git%20works%20and%20that%20understanding%20makes%20git%20feel%20more%20accessible.%0D%0A%0D%0AUnderstanding%20commits%20is%20the%20key%20to%20grokkin" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F05%2F15%2Fgit-from-the-bottom-up%2F&amp;t=Git%20from%20the%20Bottom%20Up" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F05%2F15%2Fgit-from-the-bottom-up%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/05/15/git-from-the-bottom-up/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>the symlink trick</title>
		<link>http://eigenjoy.com/2008/04/04/the-symlink-trick/</link>
		<comments>http://eigenjoy.com/2008/04/04/the-symlink-trick/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 03:35:28 +0000</pubDate>
		<dc:creator>Nate Murray</dc:creator>
				<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.xcombinator.com/2008/04/04/the-symlink-trick/</guid>
		<description><![CDATA[Courtenay writes on scaling rails applications at Caboo.se.  He says:
 Take a look at your logs: are you performing over 10 database calls per request? You need to fix this. Are you performing over 90? You&#8217;re a dumba**.

 Today viewed the logs of a rails application I am writing. To calculate one particular page [...]]]></description>
			<content:encoded><![CDATA[<p>Courtenay writes on scaling rails applications at <a href="http://www.caboo.se/articles/2007/7/29/scale-rails-from-one-box-to-three-four-and-five">Caboo.se</a>.  He says:</p>
<blockquote><p> Take a look at your logs: are you performing over 10 database calls per request? You need to fix this. Are you performing over 90? You&#8217;re a dumba**.</p>
</blockquote>
<p> Today viewed the logs of a rails application I am writing. To calculate one particular page I was performing <i>31,211</i> <tt>SELECT</tt> requests and the page took <tt>1m7.091s</tt> to generate.  <i>Ouch</i>.</p>
<p>After an hour of tweaking, <a href="http://www.xcombinator.com/2008/04/01/simple-rails-log-query-analyzer/">optimizing queries</a>, and <a href="http://railsexpress.de/blog/articles/2005/11/06/the-case-for-piggy-backed-attributes">piggy-backing</a> some attributes I was able to get down to 9,839 queries and the page rendered in <tt>0m16.958s</tt>. While this may be respectable in terms of improvment, but atrocious according to Courtenay&#8217;s benchmark. (I think they have a word for systems that take over 9&nbsp;thousand queries to generate a single page, but I won&#8217;t repeat it here.)</p>
<p>Fortunately, caching the entire page makes sense functionally. However, one problem with Rails&#8217; built-in caching is that before the page is cached the first person to hit this page will be forced wait 17 seconds for the page to render (assuming no further optimization). In the case of a high amount of traffic, hundreds of visitors to the site will pile up and many will be dropped. It&#8217;s the dreaded cache-gap.</p>
<p>Steve Conover at Pivitoal Labs has a great technique for dealing with this kind of issue that he calls <a href="http://pivots.pivotallabs.com/users/steve/blog/articles/262-rails-slashdotted-no-problem">the symlink trick</a>. A variation on Steve&#8217;s idea goes like this:</p>
<ul>
<li>Symlink <tt>index.html</tt> to <tt>index.html.current</tt>.</li>
<li>When <tt>index.html.current</tt> is out of date, generate <tt>index.html.new</tt></li>
<li>Have cron check the cache every 2 minutes and move <tt>index.html.new</tt> over <tt>index.html.current</tt></li>
</ul>
<p>Because *nix <tt>mv</tt> is atomic there is no gap where the cached page is deleted and then requests are waiting for the page to be regenerated. Below is a diagram of the process.</p>
<p><img src="http://farm3.static.flickr.com/2280/2389077412_4671b8a7db_o.png" width="415" height="733" alt="symlink_trick" /></p>
<p>The great thing is that this caching technique is general and can be applied to any web application, not just Rails.</p>
<p>Share:</p>
<p>	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Feigenjoy.com%2F2008%2F04%2F04%2Fthe-symlink-trick%2F&amp;title=the%20symlink%20trick&amp;notes=Courtenay%20writes%20on%20scaling%20rails%20applications%20at%20Caboo.se.%20%20He%20says%3A%0D%0A%0D%0A%20Take%20a%20look%20at%20your%20logs%3A%20are%20you%20performing%20over%2010%20database%20calls%20per%20request%3F%20You%20need%20to%20fix%20this.%20Are%20you%20performing%20over%2090%3F%20You%27re%20a%20dumba%2A%2A.%0D%0A%0D%0A%20Today%20viewed%20the%20logs%20o" title="del.icio.us"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://reddit.com/submit?url=http%3A%2F%2Feigenjoy.com%2F2008%2F04%2F04%2Fthe-symlink-trick%2F&amp;title=the%20symlink%20trick" title="Reddit"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Feigenjoy.com%2F2008%2F04%2F04%2Fthe-symlink-trick%2F" title="Technorati"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://twitter.com/home?status=the%20symlink%20trick%20-%20http%3A%2F%2Feigenjoy.com%2F2008%2F04%2F04%2Fthe-symlink-trick%2F" title="Twitter"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Feigenjoy.com%2F2008%2F04%2F04%2Fthe-symlink-trick%2F&amp;t=the%20symlink%20trick" title="Facebook"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Feigenjoy.com%2F2008%2F04%2F04%2Fthe-symlink-trick%2F&amp;title=the%20symlink%20trick&amp;annotation=Courtenay%20writes%20on%20scaling%20rails%20applications%20at%20Caboo.se.%20%20He%20says%3A%0D%0A%0D%0A%20Take%20a%20look%20at%20your%20logs%3A%20are%20you%20performing%20over%2010%20database%20calls%20per%20request%3F%20You%20need%20to%20fix%20this.%20Are%20you%20performing%20over%2090%3F%20You%27re%20a%20dumba%2A%2A.%0D%0A%0D%0A%20Today%20viewed%20the%20logs%20o" title="Google Bookmarks"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Feigenjoy.com%2F2008%2F04%2F04%2Fthe-symlink-trick%2F&amp;t=the%20symlink%20trick" title="HackerNews"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Feigenjoy.com%2F2008%2F04%2F04%2Fthe-symlink-trick%2F&amp;partner=sociable" title="PDF"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a><br />
	<a rel="nofollow"  href="http://eigenjoy.com/feed/" title="RSS"><img src="http://eigenjoy.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></p>
<p><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://eigenjoy.com/2008/04/04/the-symlink-trick/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

