<?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>Idle Hacking</title>
	<atom:link href="http://www.idle-hacking.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.idle-hacking.com</link>
	<description>Ruby, XUL/Javascript, C/C++, and more...</description>
	<lastBuildDate>Tue, 09 Feb 2010 02:21:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Webkit, Ruby and Gtk+</title>
		<link>http://www.idle-hacking.com/2010/02/webkit-ruby-and-gtk/</link>
		<comments>http://www.idle-hacking.com/2010/02/webkit-ruby-and-gtk/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 02:21:45 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/?p=809</guid>
		<description><![CDATA[The ruby bindings for Gnome are really nice.  I&#8217;m amazed at how easy this was.

Sure it&#8217;s not Chrome, but not bad for an embedded browser.  Oh and check out how simple this is:
require 'webkit'
win = Gtk::Window.new
wv = Gtk::WebKit::WebView.new
win.add(wv)
win.show_all
wv.open('http://www.google.com/')
Gtk.main
Try it out!    The bindings are on github.
]]></description>
			<content:encoded><![CDATA[<p>The ruby bindings for Gnome are really nice.  I&#8217;m amazed at how easy this was.</p>
<p style="text-align: center;"><a href="http://idle-hacking.s3.amazonaws.com/wp-content/uploads/2010/02/Screen-shot-2010-02-08-at-9.08.55-PM1.png"><img class="size-full wp-image-811 aligncenter" title="Screen shot 2010-02-08 at 9.08.55 PM" src="http://idle-hacking.s3.amazonaws.com/wp-content/uploads/2010/02/Screen-shot-2010-02-08-at-9.08.55-PM1.png" alt="" width="614" height="473" /></a></p>
<p>Sure it&#8217;s not Chrome, but not bad for an embedded browser.  Oh and check out how simple this is:</p>
<pre lang="ruby">require 'webkit'
win = Gtk::Window.new
wv = Gtk::WebKit::WebView.new
win.add(wv)
win.show_all
wv.open('http://www.google.com/')
Gtk.main</pre>
<p>Try it out!    The <a href="http://github.com/danlucraft/rbwebkitgtk">bindings are on github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2010/02/webkit-ruby-and-gtk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby and Time.now.httpdate</title>
		<link>http://www.idle-hacking.com/2010/01/ruby-and-time-now-httpdate/</link>
		<comments>http://www.idle-hacking.com/2010/01/ruby-and-time-now-httpdate/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 22:11:02 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Life at work]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/?p=805</guid>
		<description><![CDATA[I keep running into this when I need a httpdate.  Make sure to always require &#8216;time&#8217;
e.g.
Time.now.httpdate -&#62; raises exception
and
require &#8216;time&#8217;
Time.now.httpdate -&#62;Tue, 26 Jan 2010 22:10:45 GMT
]]></description>
			<content:encoded><![CDATA[<p>I keep running into this when I need a httpdate.  Make sure to always require &#8216;time&#8217;</p>
<p>e.g.</p>
<p>Time.now.httpdate -&gt; raises exception</p>
<p>and</p>
<p>require &#8216;time&#8217;</p>
<p>Time.now.httpdate -&gt;Tue, 26 Jan 2010 22:10:45 GMT</p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2010/01/ruby-and-time-now-httpdate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Captico Webite</title>
		<link>http://www.idle-hacking.com/2010/01/updated-captico-webite/</link>
		<comments>http://www.idle-hacking.com/2010/01/updated-captico-webite/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 03:57:14 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Life at work]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/?p=798</guid>
		<description><![CDATA[Our new business and our new website.  We build websites, market websites and make it easier for businesses to sell their goods online.

 Check us out.  Let me know what you think of the design and anything else!
]]></description>
			<content:encoded><![CDATA[<p>Our new business and our new website.  We build websites, market websites and make it easier for businesses to sell their goods online.</p>
<p><a href="http://www.captico.com/"><img class="size-medium wp-image-799  alignnone" title="Screen shot 2010-01-19 at 8.53.35 PM" src="http://idle-hacking.s3.amazonaws.com/wp-content/uploads/2010/01/Screen-shot-2010-01-19-at-8.53.35-PM-300x185.png" alt="" width="300" height="185" /></a></p>
<p><a href="http://www.captico.com/"> Check us out</a>.  Let me know what you think of the design and anything else!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2010/01/updated-captico-webite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hex2rgb Javascript</title>
		<link>http://www.idle-hacking.com/2010/01/hex2rgb-javascript/</link>
		<comments>http://www.idle-hacking.com/2010/01/hex2rgb-javascript/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 01:58:06 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/?p=790</guid>
		<description><![CDATA[While experimenting with canvas tag today I needed a good way to take a hex value and convert it to RGBA.  I went searching and found some solutions, but nothing that really seemed complete.  I wanted a single function that didn&#8217;t call eval or pollute the environment with globals&#8230;  Maybe I could [...]]]></description>
			<content:encoded><![CDATA[<p>While experimenting with canvas tag today I needed a good way to take a hex value and convert it to <abbr title="Red Green Blue Alpha">RGBA</abbr>.  I went searching and found some solutions, but nothing that really seemed complete.  I wanted a single function that didn&#8217;t call eval or pollute the environment with globals&#8230;  Maybe I could have looked harder but <a href="http://gist.github.com/277707">here is what I came up with</a>.</p>
<p><script src="http://gist.github.com/277707.js?file=hex2rgb.js"></script></p>
<p>I know hex values don&#8217;t include the alpha value in rgba &#8211; this function gets you the RGB values so you can mix in the alpha value.</p>
<p><strong>Update</strong>:<br />
<a href="http://www.dweebd.com/">Duncan</a> posted <a href="http://gist.github.com/278311">this solution</a> that is much better than mine!<br />
<script src="http://gist.github.com/278311.js?file=hex2rgb.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2010/01/hex2rgb-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why I like Curb</title>
		<link>http://www.idle-hacking.com/2009/12/why-i-like-curb/</link>
		<comments>http://www.idle-hacking.com/2009/12/why-i-like-curb/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 00:07:36 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/?p=785</guid>
		<description><![CDATA[Here&#8217;s an example of why I really enjoy using curb.  Curl::Multi.get interface is just so easy.

]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an example of why I really enjoy using <a href="http://taf2.github.com/curb/">curb</a>.  Curl::Multi.get interface is just so easy.</p>
<p><script src="http://gist.github.com/260285.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2009/12/why-i-like-curb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>High Availability with Unicorn Zero Down Time Deploys</title>
		<link>http://www.idle-hacking.com/2009/12/high-availability-with-unicorn-zero-down-time-deploys/</link>
		<comments>http://www.idle-hacking.com/2009/12/high-availability-with-unicorn-zero-down-time-deploys/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 20:04:32 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[unicorn]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/?p=781</guid>
		<description><![CDATA[If you have not heard of unicorn and you actively develop ruby applications for the web.  It is no doubt well worth your time to check it out.  Github has a very good write up about unicorn that is definitely worth reading.    Let me first show you this quick video [...]]]></description>
			<content:encoded><![CDATA[<p>If you have not heard of <a href="http://unicorn.bogomips.org/">unicorn</a> and you actively develop ruby applications for the web.  It is no doubt well worth your time to check it out.  <a href="http://github.com/blog/517-unicorn">Github</a> has a very good write up about unicorn that is definitely worth reading.    Let me first show you this quick video of deploying to our yet to be released client site while <a href="http://www.joedog.org/index/siege-home">sieging</a>.   </p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/lIjyFBp4xlw&#038;hl=en_US&#038;fs=1&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lIjyFBp4xlw&#038;hl=en_US&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
<p><span id="more-781"></span><br />
Now some important things to note, in the github write up they had the QUIT signal sent in the <a href="http://unicorn.bogomips.org/Unicorn/Configurator.html#M000086">before_fork</a>.   I am pretty certain that this is incorrect and it should be in the <a href="http://unicorn.bogomips.org/Unicorn/Configurator.html#M000085">after_fork</a>.  </p>
<p>Here is the unicorn configuration I am currently using:</p>
<p><script src="http://gist.github.com/258972.js"></script></p>
<p>Also, I have a custom spin script:</p>
<p><script src="http://gist.github.com/258973.js"></script></p>
<p>In the youtube video I use the reload action </p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2009/12/high-availability-with-unicorn-zero-down-time-deploys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitemaps and Siege</title>
		<link>http://www.idle-hacking.com/2009/12/sitemaps-and-siege/</link>
		<comments>http://www.idle-hacking.com/2009/12/sitemaps-and-siege/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 19:03:05 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[siege]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/?p=779</guid>
		<description><![CDATA[If you are like me and always want to test the performance of your sites before releasing them to the public eye and you have an interest in publishing sitemaps to google and friends.  This handy ruby script might be just the thing for you.

Assuming you already have your sitemap.xml file, if not try [...]]]></description>
			<content:encoded><![CDATA[<p>If you are like me and always want to test the performance of your sites before releasing them to the public eye and you have an interest in publishing <a href="http://www.sitemaps.org/">sitemaps</a> to google and friends.  This handy ruby script might be just the thing for you.</p>
<p><script src="http://gist.github.com/258939.js"></script></p>
<p>Assuming you already have your sitemap.xml file, if not <a href="http://www.google.com/search?hl=en&#038;q=generator+sitemap&#038;aq=f&#038;oq=&#038;aqi=">try googling</a>&#8230;</p>
<p>Next run the ruby script, given the sitemap.xml file as the first argument:</p>
<pre>
ruby sitemap-to-siege.rb sitemap.xml
</pre>
<p>That will create the <a href="http://linux.die.net/man/1/siege">urls.txt</a> file.</p>
<p>Now run <a href="http://www.joedog.org/index/siege-home">siege</a>:<br />
siege -c50 -t1M -f urls.txt</p>
<p>Note on mac you can install siege with<br />
sudo <a href="http://www.macports.org/">port</a> install siege<br />
On redhat:<br />
<a href="http://yum.baseurl.org/">yum</a> install siege<br />
Or <a href="ftp://ftp.joedog.org/pub/siege/">grab the source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2009/12/sitemaps-and-siege/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Theme</title>
		<link>http://www.idle-hacking.com/2009/12/updated-theme-2/</link>
		<comments>http://www.idle-hacking.com/2009/12/updated-theme-2/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 23:19:54 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/2009/12/updated-theme-2/</guid>
		<description><![CDATA[Okay, I really liked this theme last year when I installed it but today I decided it was time for a change&#8230; Well a minor change, I hacked up the theme to support a variable width grid.  Setting a min-width and width:%% to allow the content area expand.
]]></description>
			<content:encoded><![CDATA[<p>Okay, I really liked this theme last year when I installed it but today I decided it was time for a change&#8230; Well a minor change, I hacked up the theme to support a variable width grid.  Setting a min-width and width:%% to allow the content area expand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2009/12/updated-theme-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Follow up on caches_action and content_for blocks</title>
		<link>http://www.idle-hacking.com/2009/12/follow-up-on-caches_action-and-content_for-blocks/</link>
		<comments>http://www.idle-hacking.com/2009/12/follow-up-on-caches_action-and-content_for-blocks/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 23:05:54 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/?p=772</guid>
		<description><![CDATA[Alright, I worked on a solution today to follow up on  my earlier post&#8230; This is very raw, but showing some good signs of working.  I&#8217;ve been testing locally against memcached.   One concern, I have with this solution is the content_for block is cached in a separate key, if the action [...]]]></description>
			<content:encoded><![CDATA[<p>Alright, I worked on a solution today to follow up on <a href="http://www.idle-hacking.com/2009/12/caches_action-and-content_for-blocks/"> my earlier post</a>&#8230; This is very raw, but showing some good signs of working.  I&#8217;ve been testing locally against memcached.   One concern, I have with this solution is the content_for block is cached in a separate key, if the action key expires after the content_for key, then some requests might render without the <a href="http://api.rubyonrails.org/classes/ActionView/Helpers/CaptureHelper.html#M001763">content_for</a> content&#8230;  Perhaps, before rendering the action from cache we need to check that all fragments are available?  This could also make it possible to do a multi get from memcached as well?   Let me know what you all think.<br />
<span id="more-772"></span><br />
<script src="http://gist.github.com/258304.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2009/12/follow-up-on-caches_action-and-content_for-blocks/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>caches_action and content_for blocks</title>
		<link>http://www.idle-hacking.com/2009/12/caches_action-and-content_for-blocks/</link>
		<comments>http://www.idle-hacking.com/2009/12/caches_action-and-content_for-blocks/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 13:57:29 +0000</pubDate>
		<dc:creator>taf2</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.idle-hacking.com/?p=765</guid>
		<description><![CDATA[Today, I realized that using content_for blocks as nice as they are make it much harder to cache.   Typically, I won&#8217;t cache the layout for my actions so I would end up with a caches_action expression like the following:
caches_action :index, :layout => false, :expires_in => 10.minutes, :if => Proc.new {&#124;c&#124; c.send(:current_user).nil? }
However, I also [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I realized that using content_for blocks as nice as they are make it much harder to cache.   Typically, I won&#8217;t cache the layout for my actions so I would end up with a caches_action expression like the following:</p>
<pre lang="ruby">caches_action :index, :layout => false, :expires_in => 10.minutes, :if => Proc.new {|c| c.send(:current_user).nil? }</pre>
<p>However, I also started to add multiple yield blocks in my layouts.  For example:<br />
<span id="more-765"></span></p>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
...
&lt;%= yield :head %&gt;
&lt;/head&gt;
&lt;body&gt;
...
&lt;%= yield %&gt;
...
&lt;%= yield :sidebar %&gt;
...
&lt;%= yield :foot %&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>At first glance this is great!  Now in each action/view I can customize specific components in my layout.  The issue with this layout design and action_caching is that the content_for blocks do not appear to re-evaluate from the cached action into the &#8216;yield blocks&#8217; in the layout.  We could perhaps solve this with some modifications to content_for and some modifications around each &#8216;yield block&#8217;.  I&#8217;m going to see if there is a solution and post&#8230; In the mean time does anyone have any suggestions?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.idle-hacking.com/2009/12/caches_action-and-content_for-blocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
