<?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"
	>

<channel>
	<title>Dirk.Net</title>
	<atom:link href="http://dirk.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://dirk.net</link>
	<description>Ecce loco!</description>
	<pubDate>Tue, 17 Aug 2010 09:29:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Full Trace with RSpec</title>
		<link>http://dirk.net/2010/08/12/full-trace-with-rspec/</link>
		<comments>http://dirk.net/2010/08/12/full-trace-with-rspec/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 21:04:53 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[RSpec]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/08/12/full-trace-with-rspec/</guid>
		<description><![CDATA[Just a reminder: To get a the full backtrace when running RSpec, either use the -b option,
script/spec -b /path/to/spec.rb 

or add
--backtrace

to your spec.opts. Here are the other options for either the opts file or the command line.










]]></description>
			<content:encoded><![CDATA[<p>Just a reminder: To get a the full backtrace when running RSpec, either use the -b option,</p>
<blockquote><pre>script/spec <strong>-b</strong> /path/to/spec.rb </pre>
</blockquote>
<p>or add</p>
<blockquote><pre>--backtrace</pre>
</blockquote>
<p>to your spec.opts. <a href="http://rspec.info/documentation/tools/spec.html">Here</a> are the other options for either the opts file or the command line.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F12%2Ffull-trace-with-rspec%2F&amp;title=Full+Trace+with+RSpec" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F12%2Ffull-trace-with-rspec%2F&amp;title=Full+Trace+with+RSpec" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F12%2Ffull-trace-with-rspec%2F&amp;title=Full+Trace+with+RSpec" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F12%2Ffull-trace-with-rspec%2F&amp;title=Full+Trace+with+RSpec" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F12%2Ffull-trace-with-rspec%2F&amp;title=Full+Trace+with+RSpec', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F08%2F12%2Ffull-trace-with-rspec%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F08%2F12%2Ffull-trace-with-rspec%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F08%2F12%2Ffull-trace-with-rspec%2F&amp;title=Full+Trace+with+RSpec" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F12%2Ffull-trace-with-rspec%2F&amp;title=Full+Trace+with+RSpec" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/08/12/full-trace-with-rspec/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Netbeans Legacy Versions, Old Versions, Build and Release Archive</title>
		<link>http://dirk.net/2010/08/08/netbeans-legacy-versions-old-versions-build-and-release-archive/</link>
		<comments>http://dirk.net/2010/08/08/netbeans-legacy-versions-old-versions-build-and-release-archive/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 13:33:38 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[Netbeans]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/08/08/netbeans-legacy-versions-old-versions-build-and-release-archive/</guid>
		<description><![CDATA[Just for the record, as this can be hard go google. If you need old and legacy versions of Netbeans, you can find them through this page:
http://www.netbeans.info/downloads/dev.php
Besides all releases, it also gets you to all build types including nightly, daily, milestone etc.,&#160;acting as a way-back machine for Netbeans developers and users.
&#160;










]]></description>
			<content:encoded><![CDATA[<p>Just for the record, as this can be hard go google. If you need old and legacy versions of Netbeans, you can find them through this page:</p>
<p><a href="http://www.netbeans.info/downloads/dev.php">http://www.netbeans.info/downloads/dev.php</a></p>
<p>Besides all releases, it also gets you to all build types including nightly, daily, milestone etc.,&nbsp;acting as a way-back machine for Netbeans developers and users.</p>
<p>&nbsp;</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F08%2Fnetbeans-legacy-versions-old-versions-build-and-release-archive%2F&amp;title=Netbeans+Legacy+Versions%2C+Old+Versions%2C+Build+and+Release+Archive" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F08%2Fnetbeans-legacy-versions-old-versions-build-and-release-archive%2F&amp;title=Netbeans+Legacy+Versions%2C+Old+Versions%2C+Build+and+Release+Archive" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F08%2Fnetbeans-legacy-versions-old-versions-build-and-release-archive%2F&amp;title=Netbeans+Legacy+Versions%2C+Old+Versions%2C+Build+and+Release+Archive" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F08%2Fnetbeans-legacy-versions-old-versions-build-and-release-archive%2F&amp;title=Netbeans+Legacy+Versions%2C+Old+Versions%2C+Build+and+Release+Archive" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F08%2Fnetbeans-legacy-versions-old-versions-build-and-release-archive%2F&amp;title=Netbeans+Legacy+Versions%2C+Old+Versions%2C+Build+and+Release+Archive', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F08%2F08%2Fnetbeans-legacy-versions-old-versions-build-and-release-archive%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F08%2F08%2Fnetbeans-legacy-versions-old-versions-build-and-release-archive%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F08%2F08%2Fnetbeans-legacy-versions-old-versions-build-and-release-archive%2F&amp;title=Netbeans+Legacy+Versions%2C+Old+Versions%2C+Build+and+Release+Archive" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F08%2Fnetbeans-legacy-versions-old-versions-build-and-release-archive%2F&amp;title=Netbeans+Legacy+Versions%2C+Old+Versions%2C+Build+and+Release+Archive" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/08/08/netbeans-legacy-versions-old-versions-build-and-release-archive/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quickstart with YQL and HTTParty with Rails</title>
		<link>http://dirk.net/2010/08/05/quickstart-with-yql-and-httparty-with-rails/</link>
		<comments>http://dirk.net/2010/08/05/quickstart-with-yql-and-httparty-with-rails/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 21:20:32 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[YQL]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/08/05/quickstart-with-yql-and-httparty-with-rails/</guid>
		<description><![CDATA[YQL makes it super-easy to consume data in your web app through a unified SQL-like API. And HTTParty by John Nunemakers makes HTTP really easy. A perfect match.
In environment.rb:

config.gem &#8216;httparty&#8217;

Now, just create a model. Be sure to use the public endpoint for now, as the others need oauth authentication.

class News
&#160; include HTTParty&#160; base_uri&#160; &#8216;http://query.yahooapis.com/v1/public/yql&#8217;&#160;&#160;&#160; def [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.yahoo.com/yql/">YQL</a> makes it super-easy to consume data in your web app through a unified SQL-like API. And <a href="http://github.com/jnunemaker/httparty">HTTParty</a> by John Nunemakers makes HTTP really easy. A perfect match.</p>
<p>In environment.rb:</p>
<blockquote>
<p>config.gem &#8216;httparty&#8217;</p>
</blockquote>
<p>Now, just create a model. Be sure to use the <strong>public</strong> endpoint for now, as the others need oauth authentication.</p>
<blockquote>
<p>class News</p>
<p>&nbsp; include HTTParty<br />&nbsp; base_uri&nbsp; &#8216;http://query.yahooapis.com/v1/<strong>public</strong>/yql&#8217;<br />&nbsp;&nbsp;<br />&nbsp; def self.new_york_news<br />&nbsp;&nbsp;&nbsp; self.get(&#8221;", :query =&gt; {:q =&gt; &#8217;select title, abstract, url from search.news where query = &#8220;%New York%&#8221;&#8216;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :format =&gt; &#8216;json&#8217;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; })<br />&nbsp; end</p>
<p>&nbsp; def self.new_york_news_hash<br />&nbsp;&nbsp;&nbsp; self.new_york_news.parsed_response["query"]["results"]["result"]<br />&nbsp; end<br />&nbsp; <br />end</p>
</blockquote>
<p>In you controller:</p>
<blockquote>
<p>class NewsController &lt; ApplicationController</p>
<p>&nbsp; def index<br />&nbsp;&nbsp;&nbsp; @news = News.new_york_news_hash<br />&nbsp; end</p>
<p>end</p>
</blockquote>
<p>And your view (for example):</p>
<blockquote>
<p>&lt;h1&gt;New York&nbsp;News&lt;/h1&gt;<br />&lt;% @news.each do |news_item| %&gt;<br />&nbsp; &lt;% content_tag :h2 do %&gt;<br />&nbsp;&nbsp;&nbsp; &lt;%= link_to news_item["title"], news_item["url"]&nbsp; %&gt;<br />&nbsp;&nbsp;&nbsp; &lt;% end %&gt;<br />&nbsp;&nbsp;&nbsp; &lt;% content_tag :div do&nbsp; %&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;% content_tag :p do %&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;%= news_item["abstract"]&nbsp; %&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;% end %&gt;<br />&nbsp;&nbsp;&nbsp; &lt;% end %&gt;<br />&nbsp; &lt;%&nbsp; end %&gt;</p>
</blockquote>
<p>Be sure to check the <a href="http://developer.yahoo.com/yql/guide/">API docs of YQL</a> for many other options and watch the excellent screencasts by Christian Heilmann in the YUI theater and elsewhere. The possibilities are endless.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fquickstart-with-yql-and-httparty-with-rails%2F&amp;title=Quickstart+with+YQL+and+HTTParty+with+Rails" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fquickstart-with-yql-and-httparty-with-rails%2F&amp;title=Quickstart+with+YQL+and+HTTParty+with+Rails" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fquickstart-with-yql-and-httparty-with-rails%2F&amp;title=Quickstart+with+YQL+and+HTTParty+with+Rails" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fquickstart-with-yql-and-httparty-with-rails%2F&amp;title=Quickstart+with+YQL+and+HTTParty+with+Rails" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fquickstart-with-yql-and-httparty-with-rails%2F&amp;title=Quickstart+with+YQL+and+HTTParty+with+Rails', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fquickstart-with-yql-and-httparty-with-rails%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fquickstart-with-yql-and-httparty-with-rails%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fquickstart-with-yql-and-httparty-with-rails%2F&amp;title=Quickstart+with+YQL+and+HTTParty+with+Rails" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fquickstart-with-yql-and-httparty-with-rails%2F&amp;title=Quickstart+with+YQL+and+HTTParty+with+Rails" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/08/05/quickstart-with-yql-and-httparty-with-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Convert between XML, Hash, YAML, JSON in Ruby - Conversion Cheat Sheet</title>
		<link>http://dirk.net/2010/08/05/convert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet/</link>
		<comments>http://dirk.net/2010/08/05/convert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 11:22:15 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/08/05/convert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet/</guid>
		<description><![CDATA[Here&#8217;s a little XML/JSON/YAML/Hash&#160;conversion&#160;cheat sheet for Ruby:
First, let&#8217;s create an XML document:

require &#8216;rubygems&#8217;
require &#8216;nokogiri&#8217;
builder = Nokogiri::XML::Builder.new do &#124;xml&#124;
    xml.root {
      xml.products {
        xml.widget {
          xml.id_ &#8220;10&#8243;
      [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little XML/JSON/YAML/Hash&nbsp;conversion&nbsp;cheat sheet for Ruby:</p>
<p>First, let&#8217;s create an XML document:</p>
<blockquote>
<p><strong>require &#8216;rubygems&#8217;</strong></p>
<p><strong>require &#8216;nokogiri&#8217;</strong></p>
<p><span style="FONT-FAMILY: Courier New,courier">builder = Nokogiri::XML::Builder.new do |xml|</span></p>
<pre><span style="FONT-FAMILY: Courier New,courier">    xml.root {</span></pre>
<pre><span style="FONT-FAMILY: Courier New,courier">      xml.products {</span></pre>
<pre><span style="FONT-FAMILY: Courier New,courier">        xml.widget {</span></pre>
<pre><span style="FONT-FAMILY: Courier New,courier">          xml.id_ &#8220;10&#8243;</span></pre>
<pre><span style="FONT-FAMILY: Courier New,courier">          xml.name &#8220;Awesome widget&#8221;</span></pre>
<pre><span style="FONT-FAMILY: Courier New,courier">        }</span></pre>
<pre><span style="FONT-FAMILY: Courier New,courier">      }</span></pre>
<pre><span style="FONT-FAMILY: Courier New,courier">    }</span></pre>
<pre><span style="FONT-FAMILY: Courier New,courier">  end</span></pre>
<p>my_xml = builder.to_xml</p>
</blockquote>
<h2>XML To Hash:</h2>
<blockquote>
<p dir="ltr" style="MARGIN-RIGHT: 0px">require &#8216;active_support&#8217; #if you have Rails installed</p>
<p>my_hash&nbsp;= <strong>Hash.from_xml(my_xml)</strong></p>
</blockquote>
<p>Withou Rails/ActiveSupport, have a look at <a href="http://railstips.org/blog/archives/2009/04/01/crack-the-easiest-way-to-parse-xml-and-json/">Crack</a>&nbsp;which&nbsp;very fast&nbsp;and will usually give you enough fields (it eats attributes however):</p>
<blockquote>
<p>my_hash&nbsp;= <strong>Crack::XML.parse</strong>(my_xml)</p>
</blockquote>
<h2>Hash To Object?</h2>
<p>Have a look here: <a href="http://blog.jayfields.com/2008/01/ruby-hashtomod.html">http://blog.jayfields.com/2008/01/ruby-hashtomod.html</a></p>
<h2>Hash To JSON:</h2>
<blockquote>
<p dir="ltr" style="MARGIN-RIGHT: 0px"><strong>require &#8216;json&#8217;</strong></p>
<p>my_json&nbsp;= my_hash<strong>.to_json</strong></p>
</blockquote>
<h2>JSON back to Hash:</h2>
<blockquote>
<p>my_hash&nbsp;= <strong>JSON.parse</strong>(my_json) </p>
</blockquote>
<p>Also have a look at <a href="http://railstips.org/blog/archives/2009/04/01/crack-the-easiest-way-to-parse-xml-and-json/">Crack</a>:</p>
<blockquote>
<p>my_hash&nbsp;= <strong>Crack::JSON.parse</strong>(my_json)</p>
</blockquote>
<h2>Hash To YAML:</h2>
<blockquote>
<p>my_yaml&nbsp;=<strong> </strong>my_hash<strong>.to_yaml</strong></p>
</blockquote>
<h2>YAML back to Hash:</h2>
<blockquote>
<p>my_hash&nbsp;=&nbsp; <strong>YAML::load</strong>(my_yaml)</p>
</blockquote>
<h2>Bonus Points &ndash;&nbsp; Hash to XML:</h2>
<blockquote>
<p><strong>require &#8216;xmlsimple&#8217;</strong></p>
<p>my_xml&nbsp;= <strong>XmlSimple.xml_out(</strong>my_hash<strong>, {&#8217;KeepRoot&#8217; =&gt; true})</strong></p>
</blockquote>
<p>There is currently no way to preserve the attributes (like &lt;person <strong>age=&#8221;10&#8243;</strong>&gt;Joe&lt;/person&gt;) with such conversion from Hash to XML.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fconvert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet%2F&amp;title=Convert+between+XML%2C+Hash%2C+YAML%2C+JSON+in+Ruby+-+Conversion+Cheat+Sheet" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fconvert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet%2F&amp;title=Convert+between+XML%2C+Hash%2C+YAML%2C+JSON+in+Ruby+-+Conversion+Cheat+Sheet" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fconvert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet%2F&amp;title=Convert+between+XML%2C+Hash%2C+YAML%2C+JSON+in+Ruby+-+Conversion+Cheat+Sheet" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fconvert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet%2F&amp;title=Convert+between+XML%2C+Hash%2C+YAML%2C+JSON+in+Ruby+-+Conversion+Cheat+Sheet" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fconvert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet%2F&amp;title=Convert+between+XML%2C+Hash%2C+YAML%2C+JSON+in+Ruby+-+Conversion+Cheat+Sheet', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fconvert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fconvert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fconvert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet%2F&amp;title=Convert+between+XML%2C+Hash%2C+YAML%2C+JSON+in+Ruby+-+Conversion+Cheat+Sheet" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fconvert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet%2F&amp;title=Convert+between+XML%2C+Hash%2C+YAML%2C+JSON+in+Ruby+-+Conversion+Cheat+Sheet" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/08/05/convert-between-xml-hash-yaml-json-in-ruby-conversion-cheat-sheet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Back to BlogJet as My Blog Editor on Linux</title>
		<link>http://dirk.net/2010/08/05/back-to-blogjet-as-my-blog-editor-on-linux/</link>
		<comments>http://dirk.net/2010/08/05/back-to-blogjet-as-my-blog-editor-on-linux/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 11:10:42 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[Blogging Software]]></category>

		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/08/05/back-to-blogjet-as-my-blog-editor-on-linux/</guid>
		<description><![CDATA[Having tried Bilbo/Blogilo for a while now, I found it&#160;to be a fine editor but a bit&#160;too intrusive in altering the HTML code I created in code view when I switched back to Bilbo&#8217;s WYSIWYG view. 
So I tried good old BlogJet again and found there&#8217;s a (free) upgrade to the new version 2.5 (currently [...]]]></description>
			<content:encoded><![CDATA[<p>Having tried <a href="http://blogilo.gnufolks.org/">Bilbo/Blogilo</a> for a while now, I found it&nbsp;to be a fine editor but a bit&nbsp;too intrusive in altering the HTML code I created in code view when I switched back to Bilbo&#8217;s WYSIWYG view. </p>
<p>So I tried good old BlogJet again and found there&#8217;s a (free) upgrade to the <a href="http://www.codingrobots.com/blog/2010/05/12/blogjet-2-5-released/">new version 2.5</a> (currently 2.5.0.15), <a href="http://www.codingrobots.com/blog/2010/05/12/blogjet-2-5-released/">among other goodies</a> making it Unicode compatible and letting you create categories from within the editor (only for Wordpress blogs), still a rare feature outside of Live Writer. </p>
<p>To install it, proceed just like with the prior versions, as outlined <a href="http://www.thetechandcents.com/2007/11/running-zoundry-blog-editor-under-wine.html">here</a>. You have to open the downloaded installer (BlogJetSetup.2.x.x.x.exe) from the file menu in <a href="http://www.tatanka.com.br/ies4linux/page/Main_Page">IEs4Linux</a>&nbsp;and proceed. Simply clicking the downloaded installer will give you an installation without necessary HTML components and it won&#8217;t display any content.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fback-to-blogjet-as-my-blog-editor-on-linux%2F&amp;title=Back+to+BlogJet+as+My+Blog+Editor+on+Linux" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fback-to-blogjet-as-my-blog-editor-on-linux%2F&amp;title=Back+to+BlogJet+as+My+Blog+Editor+on+Linux" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fback-to-blogjet-as-my-blog-editor-on-linux%2F&amp;title=Back+to+BlogJet+as+My+Blog+Editor+on+Linux" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fback-to-blogjet-as-my-blog-editor-on-linux%2F&amp;title=Back+to+BlogJet+as+My+Blog+Editor+on+Linux" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fback-to-blogjet-as-my-blog-editor-on-linux%2F&amp;title=Back+to+BlogJet+as+My+Blog+Editor+on+Linux', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fback-to-blogjet-as-my-blog-editor-on-linux%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fback-to-blogjet-as-my-blog-editor-on-linux%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fback-to-blogjet-as-my-blog-editor-on-linux%2F&amp;title=Back+to+BlogJet+as+My+Blog+Editor+on+Linux" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F08%2F05%2Fback-to-blogjet-as-my-blog-editor-on-linux%2F&amp;title=Back+to+BlogJet+as+My+Blog+Editor+on+Linux" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/08/05/back-to-blogjet-as-my-blog-editor-on-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Clearing Memcached at Capistrano Deployment</title>
		<link>http://dirk.net/2010/07/12/clearing-memcached-at-capistrano-deployment/</link>
		<comments>http://dirk.net/2010/07/12/clearing-memcached-at-capistrano-deployment/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 21:33:03 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[Capistrano]]></category>

		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/07/12/clearing-memcached-after-capistraono-deployment/</guid>
		<description><![CDATA[It&#8217;s a two step process:
1. Create a rake task (in lib/tasks/clear_memcached.rake for example):

namespace :cache do&#160; desc &#8216;Clear memcache&#8217;&#160; task :clear =&#62; :environment do&#160;&#160;&#160; ActionController::Base.cache_store.clear&#160; endend

2. In deploy.rb add the following: 

namespace :cache do&#160; desc &#8220;Clear memcach after deployment&#8221;&#160; task :clear, :roles =&#62; :app do&#160;&#160;&#160; run &#8220;cd #{current_release} &#38;&#38; rake cache:clear RAILS_ENV=production&#8221;&#160; endend

and (depending on your [...]]]></description>
			<content:encoded><![CDATA[<p>It&rsquo;s a two step process:</p>
<p>1. Create a <a href="http://www.strictlyuntyped.com/2008/06/clearing-memcache-without-restart.html">rake task</a> (in lib/tasks/clear_memcached.rake for example):</p>
<blockquote>
<p>namespace :cache do<br />&nbsp; desc &#8216;Clear memcache&#8217;<br />&nbsp; task :clear =&gt; :environment do<br />&nbsp;&nbsp;&nbsp; ActionController::Base.cache_store.clear<br />&nbsp; end<br />end</p>
</blockquote>
<p>2. In deploy.rb add the following: </p>
<blockquote>
<p>namespace :cache do<br />&nbsp; desc &#8220;Clear memcach after deployment&#8221;<br />&nbsp; task :clear, :roles =&gt; :app do<br />&nbsp;&nbsp;&nbsp; run &#8220;cd #{current_release} &amp;&amp; rake cache:clear RAILS_ENV=production&#8221;<br />&nbsp; end<br />end</p>
</blockquote>
<p dir="ltr">and (depending on your task chain):</p>
<p dir="ltr">after &#8220;deploy:update_code&#8221;, &#8220;cache:clear&#8221;</p>
<p dir="ltr">Hope it helps.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F12%2Fclearing-memcached-at-capistrano-deployment%2F&amp;title=Clearing+Memcached+at+Capistrano+Deployment" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F12%2Fclearing-memcached-at-capistrano-deployment%2F&amp;title=Clearing+Memcached+at+Capistrano+Deployment" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F12%2Fclearing-memcached-at-capistrano-deployment%2F&amp;title=Clearing+Memcached+at+Capistrano+Deployment" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F12%2Fclearing-memcached-at-capistrano-deployment%2F&amp;title=Clearing+Memcached+at+Capistrano+Deployment" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F12%2Fclearing-memcached-at-capistrano-deployment%2F&amp;title=Clearing+Memcached+at+Capistrano+Deployment', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F07%2F12%2Fclearing-memcached-at-capistrano-deployment%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F07%2F12%2Fclearing-memcached-at-capistrano-deployment%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F07%2F12%2Fclearing-memcached-at-capistrano-deployment%2F&amp;title=Clearing+Memcached+at+Capistrano+Deployment" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F12%2Fclearing-memcached-at-capistrano-deployment%2F&amp;title=Clearing+Memcached+at+Capistrano+Deployment" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/07/12/clearing-memcached-at-capistrano-deployment/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Specificity Algorithm Table from Evan Sharp&#8217;s Mix 2010 talk</title>
		<link>http://dirk.net/2010/07/05/css-specificity-algorithm-table-from-evan-sharps-mix-2010-talk/</link>
		<comments>http://dirk.net/2010/07/05/css-specificity-algorithm-table-from-evan-sharps-mix-2010-talk/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 11:32:01 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/07/05/css-specificity-algorithm-table-from-evan-sharps-mix-2010-talk/</guid>
		<description><![CDATA[Having watched Evan Sharp&#8217;s &#8220;Comp to Code&#8221; talk at Mix 2010 video&#160;(check out the other Mix videos also, most are excellent), searching the web for the CSS specificity algorithm table turned up nothing as simple as his pseudo-decimal algorithm. So I reproduced&#160;the table from the talk verbatim here for reference. As you can see, id [...]]]></description>
			<content:encoded><![CDATA[<p>Having watched <a href="http://live.visitmix.com/MIX10/Sessions/EX26">Evan Sharp&rsquo;s &ldquo;Comp to Code&rdquo; talk at Mix 2010 video</a>&nbsp;(check out the other Mix videos also, most are excellent), searching the web for the CSS specificity algorithm table turned up nothing as simple as his pseudo-decimal algorithm. So I reproduced&nbsp;the table from the talk verbatim here for reference. As you can see, id selector elements&nbsp;will dramatically increase the specificity of the selector, while class selector elements are an order of magitude less specific:</p>
<table style="BORDER-COLLAPSE: collapse; TEXT-ALIGN: center" width="100%" summary="CSS specificity algorithm table" border="1">
<caption>CSS specificity algorithm table </caption>
<tbody>
<tr class="header_bg">
<th class="header_bg" scope="col">
<h2><span class="style3"></span>selector</h2>
</th>
<th scope="col">
<h2>id</h2>
</th>
<th scope="col">
<h2>class</h2>
</th>
<th scope="col">
<h2>element</h2>
</th>
<th scope="col">
<h2><strong>sum</strong></h2>
</th>
</tr>
<tr>
<th class="header_bg" scope="row">
<h2><span class="style4">#logo</span></h2>
</th>
<td><span class="style4">1</span></td>
<td>0</td>
<td>0</td>
<td><strong>100</strong></td>
</tr>
<tr>
<th class="header_bg" scope="row">
<h2><span class="style5"><span class="style7">.header .nav</span> <span class="style6">li</span></span></h2>
</th>
<td>0</td>
<td class="style7">2</td>
<td class="style6">1</td>
<td><strong>21</strong></td>
</tr>
<tr>
<th class="header_bg" scope="row">
<h2 class="style7"><span class="style7">.header</span> <span class="style6">h1</span><span class="style4">#logo</span> </h2>
</th>
<td><span class="style4">1</span></td>
<td class="style7">1</td>
<td class="style6">1</td>
<td><strong>111</strong></td>
</tr>
<tr>
<th class="header_bg" scope="row">
<h2 class="style6">div div * a:hover </h2>
</th>
<td>0</td>
<td>0</td>
<td class="style6">4</td>
<td><strong>4</strong></td>
</tr>
<tr>
<th class="header_bg" scope="row">
<h2><span class="style4">#nav</span> <span class="style6">img</span><span class="style4">#logo</span></h2>
</th>
<td class="style4">2</td>
<td>0</td>
<td class="style6">1</td>
<td><strong>201</strong></td>
</tr>
</tbody>
</table>
<style type="text/css">
.style3 {color: #0099FF}
.style4 {color: #FF0000}
.style5 {color: #0000FF}
.style6 {color: #006600}
.style7 {color: #0000CC}
table td {border-collapse:collapse;}
.header_bg {
	background-color: #eee;
}
</style>
<p>Exercise for the reader: Say &ldquo;specificity&rdquo; three times fast. Extra points: Say &ldquo;specificity algorithm&rdquo; three times fast.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F05%2Fcss-specificity-algorithm-table-from-evan-sharps-mix-2010-talk%2F&amp;title=CSS+Specificity+Algorithm+Table+from+Evan+Sharp%26%238217%3Bs+Mix+2010+talk" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F05%2Fcss-specificity-algorithm-table-from-evan-sharps-mix-2010-talk%2F&amp;title=CSS+Specificity+Algorithm+Table+from+Evan+Sharp%26%238217%3Bs+Mix+2010+talk" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F05%2Fcss-specificity-algorithm-table-from-evan-sharps-mix-2010-talk%2F&amp;title=CSS+Specificity+Algorithm+Table+from+Evan+Sharp%26%238217%3Bs+Mix+2010+talk" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F05%2Fcss-specificity-algorithm-table-from-evan-sharps-mix-2010-talk%2F&amp;title=CSS+Specificity+Algorithm+Table+from+Evan+Sharp%26%238217%3Bs+Mix+2010+talk" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F05%2Fcss-specificity-algorithm-table-from-evan-sharps-mix-2010-talk%2F&amp;title=CSS+Specificity+Algorithm+Table+from+Evan+Sharp%26%238217%3Bs+Mix+2010+talk', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F07%2F05%2Fcss-specificity-algorithm-table-from-evan-sharps-mix-2010-talk%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F07%2F05%2Fcss-specificity-algorithm-table-from-evan-sharps-mix-2010-talk%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F07%2F05%2Fcss-specificity-algorithm-table-from-evan-sharps-mix-2010-talk%2F&amp;title=CSS+Specificity+Algorithm+Table+from+Evan+Sharp%26%238217%3Bs+Mix+2010+talk" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F07%2F05%2Fcss-specificity-algorithm-table-from-evan-sharps-mix-2010-talk%2F&amp;title=CSS+Specificity+Algorithm+Table+from+Evan+Sharp%26%238217%3Bs+Mix+2010+talk" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/07/05/css-specificity-algorithm-table-from-evan-sharps-mix-2010-talk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Thailand 2010, Moving Forward?</title>
		<link>http://dirk.net/2010/06/24/thailand-2010-moving-forward/</link>
		<comments>http://dirk.net/2010/06/24/thailand-2010-moving-forward/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 19:09:46 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[Thailand]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/06/24/thailand-2010-moving-forward/</guid>
		<description><![CDATA[A great overview of the current political situation in Thailand and its roots, from&#160;long term on-the-ground experience in Thailand and conversations with Thais from all walks of life, which I think is essential.&#160;
I agree on most counts, especially the view of Abhisit and his (in)ability to bring about reconciliation, and I also hope for a [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://poppyfieldjournal.blogspot.com/p/thoughts-on-thailands-turmoil-by-james.html">great overview</a> of the current political situation in Thailand and its roots, from&nbsp;long term on-the-ground experience in Thailand and conversations with Thais from all walks of life, which I think is essential.&nbsp;</p>
<p>I agree on most counts, especially the view of Abhisit and his (in)ability to bring about reconciliation, and I also hope for a good&nbsp;outcome over the next few years. However, I&rsquo;m slightly more sceptical that the outcome can be peaceful.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F24%2Fthailand-2010-moving-forward%2F&amp;title=Thailand+2010%2C+Moving+Forward%3F" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F24%2Fthailand-2010-moving-forward%2F&amp;title=Thailand+2010%2C+Moving+Forward%3F" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F24%2Fthailand-2010-moving-forward%2F&amp;title=Thailand+2010%2C+Moving+Forward%3F" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F24%2Fthailand-2010-moving-forward%2F&amp;title=Thailand+2010%2C+Moving+Forward%3F" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F24%2Fthailand-2010-moving-forward%2F&amp;title=Thailand+2010%2C+Moving+Forward%3F', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F06%2F24%2Fthailand-2010-moving-forward%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F06%2F24%2Fthailand-2010-moving-forward%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F06%2F24%2Fthailand-2010-moving-forward%2F&amp;title=Thailand+2010%2C+Moving+Forward%3F" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F24%2Fthailand-2010-moving-forward%2F&amp;title=Thailand+2010%2C+Moving+Forward%3F" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/06/24/thailand-2010-moving-forward/feed/</wfw:commentRss>
		</item>
		<item>
		<title>odd number of arguments for Hash (ActionView::TemplateError)</title>
		<link>http://dirk.net/2010/06/17/odd-number-of-arguments-for-hash-actionviewtemplateerror/</link>
		<comments>http://dirk.net/2010/06/17/odd-number-of-arguments-for-hash-actionviewtemplateerror/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 15:36:11 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/06/17/odd-number-of-arguments-for-hash-actionviewtemplateerror/</guid>
		<description><![CDATA[This error can be caused by an outdated version of the globalize2 plugin, so try

&#160;script/plugin remove globalize2

and

script/plugin install git://github.com/joshmh/globalize2.git

Hope it helps.










]]></description>
			<content:encoded><![CDATA[<p>This error can be caused by an outdated version of the <a href="http://github.com/joshmh/globalize2">globalize2 plugin</a>, so try</p>
<blockquote>
<p>&nbsp;script/plugin remove globalize2</p>
</blockquote>
<p>and</p>
<blockquote>
<p>script/plugin install git://github.com/joshmh/globalize2.git</p>
</blockquote>
<p>Hope it helps.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F17%2Fodd-number-of-arguments-for-hash-actionviewtemplateerror%2F&amp;title=odd+number+of+arguments+for+Hash+%28ActionView%3A%3ATemplateError%29" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F17%2Fodd-number-of-arguments-for-hash-actionviewtemplateerror%2F&amp;title=odd+number+of+arguments+for+Hash+%28ActionView%3A%3ATemplateError%29" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F17%2Fodd-number-of-arguments-for-hash-actionviewtemplateerror%2F&amp;title=odd+number+of+arguments+for+Hash+%28ActionView%3A%3ATemplateError%29" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F17%2Fodd-number-of-arguments-for-hash-actionviewtemplateerror%2F&amp;title=odd+number+of+arguments+for+Hash+%28ActionView%3A%3ATemplateError%29" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F17%2Fodd-number-of-arguments-for-hash-actionviewtemplateerror%2F&amp;title=odd+number+of+arguments+for+Hash+%28ActionView%3A%3ATemplateError%29', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F06%2F17%2Fodd-number-of-arguments-for-hash-actionviewtemplateerror%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F06%2F17%2Fodd-number-of-arguments-for-hash-actionviewtemplateerror%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F06%2F17%2Fodd-number-of-arguments-for-hash-actionviewtemplateerror%2F&amp;title=odd+number+of+arguments+for+Hash+%28ActionView%3A%3ATemplateError%29" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F17%2Fodd-number-of-arguments-for-hash-actionviewtemplateerror%2F&amp;title=odd+number+of+arguments+for+Hash+%28ActionView%3A%3ATemplateError%29" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/06/17/odd-number-of-arguments-for-hash-actionviewtemplateerror/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RSpec and Webrat for Rails Integration Testing</title>
		<link>http://dirk.net/2010/06/08/rspec-and-webrat-for-rails-integration-testing/</link>
		<comments>http://dirk.net/2010/06/08/rspec-and-webrat-for-rails-integration-testing/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 03:51:09 +0000</pubDate>
		<dc:creator>dirk</dc:creator>
		
		<category><![CDATA[RSpec]]></category>

		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[Webrat]]></category>

		<guid isPermaLink="false">http://dirk.net/2010/06/08/rspec-and-webrat-for-rails-integration-testing/</guid>
		<description><![CDATA[Getting RSpec and Webrat to cooperate has gotten a bit easier recently, so make sure you have all the latest versions of the webrat, rspec and rspec-rails gems installed. Some quirks remain which might trip you up coming from TestUnit. For example if you

cd spec/integration

and

spec ./user_integration_spec.rb

or

ruby&#160;./user_integration_spec.rb

you might get

undefined method `visit (&#8230;)

while a similar procedure would [...]]]></description>
			<content:encoded><![CDATA[<p>Getting <a href="http://github.com/dchelimsky/rspec">RSpec</a> and <a href="http://github.com/brynary/webrat">Webrat</a> to cooperate has gotten a bit easier recently, so make sure you have all the latest versions of the webrat, rspec and rspec-rails gems installed. Some quirks remain which might trip you up coming from TestUnit. For example if you</p>
<blockquote>
<p>cd spec/integration</p>
</blockquote>
<p>and</p>
<blockquote>
<p>spec ./user_integration_spec.rb</p>
</blockquote>
<p dir="ltr">or</p>
<blockquote>
<p>ruby&nbsp;./user_integration_spec.rb</p>
</blockquote>
<p>you might get</p>
<blockquote>
<p>undefined method `visit (&hellip;)</p>
</blockquote>
<p>while a similar procedure would run fine in test/integration with TestUnit</p>
<p>But with RSpec, when you run </p>
<blockquote>
<p>spec ./spec/integration/user_integration_spec.rb</p>
</blockquote>
<p>or </p>
<blockquote>
<p>rake spec:integration</p>
</blockquote>
<p>all is well. It seems you have to stand at least in the spec directory or above, otherwise the block </p>
<blockquote>
<p>Webrat.configure do |config|<br />&nbsp; config.mode = :rails<br />&nbsp; config.open_error_files = false # prevents webrat from opening the browser<br />end</p>
</blockquote>
<p>in spec_helper.rb will not run correctly.</p>
<p>So&nbsp;remember that&nbsp;RSpec is a bit less forgiving than TestUnit in how your tests are called.</p>
<p>It&rsquo;s also important that you run</p>
<blockquote>
<p>script/generate rspec </p>
</blockquote>
<p>after installing RSpec to have the rake tasks &ldquo;installed&rdquo;. </p>
<p>Finally, <a href="http://reborg.tumblr.com/post/99813407/webrat-with-rspec-no-cucumber">his procedure</a> will likely not be necessary with recent versions of Webrat and RSpec.</p>
<p>See here for a <a href="http://spitfiresky.com/blog/how-you-should-be-doing-testing-in-rails.html">testing system for Rails</a> that integrates RSpec and&nbsp;Webrat, it&nbsp;makes a&nbsp; lot of sense.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F08%2Frspec-and-webrat-for-rails-integration-testing%2F&amp;title=RSpec+and+Webrat+for+Rails+Integration+Testing" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F08%2Frspec-and-webrat-for-rails-integration-testing%2F&amp;title=RSpec+and+Webrat+for+Rails+Integration+Testing" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F08%2Frspec-and-webrat-for-rails-integration-testing%2F&amp;title=RSpec+and+Webrat+for+Rails+Integration+Testing" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F08%2Frspec-and-webrat-for-rails-integration-testing%2F&amp;title=RSpec+and+Webrat+for+Rails+Integration+Testing" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F08%2Frspec-and-webrat-for-rails-integration-testing%2F&amp;title=RSpec+and+Webrat+for+Rails+Integration+Testing', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdirk.net%2F2010%2F06%2F08%2Frspec-and-webrat-for-rails-integration-testing%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fdirk.net%2F2010%2F06%2F08%2Frspec-and-webrat-for-rails-integration-testing%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fdirk.net%2F2010%2F06%2F08%2Frspec-and-webrat-for-rails-integration-testing%2F&amp;title=RSpec+and+Webrat+for+Rails+Integration+Testing" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fdirk.net%2F2010%2F06%2F08%2Frspec-and-webrat-for-rails-integration-testing%2F&amp;title=RSpec+and+Webrat+for+Rails+Integration+Testing" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://dirk.net/2010/06/08/rspec-and-webrat-for-rails-integration-testing/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
