<?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>Ryan Schenk</title>
	<atom:link href="http://ryanschenk.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryanschenk.com</link>
	<description></description>
	<pubDate>Sun, 03 Jan 2010 02:50:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Washing Laser Cut Felt</title>
		<link>http://ryanschenk.com/2010/01/washing-laser-cut-felt/</link>
		<comments>http://ryanschenk.com/2010/01/washing-laser-cut-felt/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 02:48:03 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ryanschenk.com/?p=128</guid>
		<description><![CDATA[I had some of my mobile designs laser cut out of wool felt through Ponoko, a fantastic service that makes laser cutting almost laughably easy. The mobile pieces came out looking great, but there&#8217;s two problems.
When you laser cut felt, it smells very strongly like burning hair (go figure), and it leaves a charred halo [...]]]></description>
			<content:encoded><![CDATA[<p>I had some of my mobile designs laser cut out of wool felt through <a href="http://www.ponoko.com" target="_blank">Ponoko</a>, a fantastic service that makes laser cutting almost laughably easy. The mobile pieces came out looking great, but there&#8217;s two problems.</p>
<p>When you laser cut felt, it smells very strongly like burning hair (go figure), and it leaves a charred halo around the edges. Some people recommend dry cleaning to remove the smell and char, but that was too expensive and environmentally unfriendly for me. I experimented with a couple ways of cleaning the felt, and this is what worked best for me.</p>
<ol>
<li>Make a mixture of <em>cold</em> water and dish soap</li>
<li>Soak the felt for 15-30 minutes</li>
<li>While still submerged, go around the edges with an electric toothbrush</li>
<li>Rinse with cold water</li>
<li>Pat dry on a tea towel, then leave on the counter to air dry</li>
</ol>
<p>This method is pretty quick, easy, and works. Just remember to use an old toothbrush head.</p>
<p>Photos after the jump</p>
<p><span id="more-128"></span>Here&#8217;s some before and after photos!</p>
<p><a title="Raw vs. Washed by plasticvicar, on Flickr" href="http://www.flickr.com/photos/ryanschenk/4238635237/"><img src="http://farm3.static.flickr.com/2489/4238635237_eed1586117.jpg" alt="Raw vs. Washed" width="500" height="333" /></a></p>
<p><a title="Raw Feet vs. Washed Feet by plasticvicar, on Flickr" href="http://www.flickr.com/photos/ryanschenk/4238635143/"><img src="http://farm3.static.flickr.com/2736/4238635143_7fcfa71111.jpg" alt="Raw Feet vs. Washed Feet" width="500" height="333" /></a></p>
<p>As you can see below, the felt will shrink, but it&#8217;s not too bad.</p>
<p><a title="Minimal Shrinking by plasticvicar, on Flickr" href="http://www.flickr.com/photos/ryanschenk/4238635341/"><img src="http://farm3.static.flickr.com/2771/4238635341_02e954234e.jpg" alt="Minimal Shrinking" width="333" height="500" /></a></p>
<p><a title="Shrinking in the Wingtips by plasticvicar, on Flickr" href="http://www.flickr.com/photos/ryanschenk/4239410304/"><img src="http://farm3.static.flickr.com/2774/4239410304_8894d4bf85.jpg" alt="Shrinking in the Wingtips" width="333" height="500" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2010/01/washing-laser-cut-felt/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Putting a Dent in the National Debt</title>
		<link>http://ryanschenk.com/2009/11/putting-a-dent-in-the-national-debt/</link>
		<comments>http://ryanschenk.com/2009/11/putting-a-dent-in-the-national-debt/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 22:59:23 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ryanschenk.com/?p=104</guid>
		<description><![CDATA[I recently read an article on CNN about a little-known law that allows the US federal government to accept contributions to pay down the country&#8217;s debt.
The article contains several quotes from random passers-by in New York City, who were asked if they would consider donating. One person said the following:
&#8220;I think I could give $10 [...]]]></description>
			<content:encoded><![CDATA[<p>I recently read an <a title="Plan on Donating? Consider Uncle Sam - Nov. 11 2009" href="http://money.cnn.com/2009/11/11/news/economy/national_debt/index.htm" target="_blank">article on CNN</a> about a little-known law that allows the US federal government to accept contributions to pay down the country&#8217;s debt.</p>
<p>The article contains several quotes from random passers-by in New York City, who were asked if they would consider donating. One person said the following:</p>
<blockquote><p>&#8220;I think I could give $10 to $20. And if everyone could do that it would make a good dent in the debt.&#8221;</p></blockquote>
<p>This person clearly does not understand orders of magnitude; if everyone could give $10-$20, we would make a dent the size of four-hundredths of one percent in the national debt.</p>
<p>To give a better understanding of the numbers involved, I have created the following four graphics, showing exactly how much of a &#8220;dent&#8221; a personal contribution of $15, $100, $1000, and $10,000 from every US citizen would make in the National Deficit.</p>
<p>If you would like the raw data, these graphics were generated from this <a title="National Debt Google Spreadsheet" href="http://spreadsheets.google.com/pub?key=t2hELeKME5Vm2A1lGY6DFuA&amp;single=true&amp;gid=0&amp;output=html" target="_blank">Google Spreadsheet</a>.</p>
<p><a title="Dent in National Debt if Every US Citizen Contributed $15" rel="lightbox" href="http://ryanschenk.com/wp-content/uploads/2009/11/national_debt_15.png"><img src="http://ryanschenk.com/wp-content/uploads/2009/11/national_debt_15_thumb.png" alt="Dent in National Debt if Every US Citizen Contributed $15" /></a></p>
<p><a title="Dent in National Debt if Every US Citizen Contributed $100" rel="lightbox" href="http://ryanschenk.com/wp-content/uploads/2009/11/national_debt_100.png"><img src="http://ryanschenk.com/wp-content/uploads/2009/11/national_debt_100_thumb.png" alt="Dent in National Debt if Every US Citizen Contributed $100" /></a></p>
<p><a title="Dent in National Debt if Every US Citizen Contributed $10,00" rel="lightbox" href="http://ryanschenk.com/wp-content/uploads/2009/11/national_debt_1000.png"><img src="http://ryanschenk.com/wp-content/uploads/2009/11/national_debt_1000_thumb.png" alt="Dent in National Debt if Every US Citizen Contributed $1,000" /></a></p>
<p><a title="Dent in National Debt if Every US Citizen Contributed $10,000" rel="lightbox" href="http://ryanschenk.com/wp-content/uploads/2009/11/national_debt_10000.png"><img src="http://ryanschenk.com/wp-content/uploads/2009/11/national_debt_10000_thumb.png" alt="Dent in National Debt if Every US Citizen Contributed $10,000" /></a></p>
<p>Of course it&#8217;s really not that simple. The more astute of you will notice a fallacy in the above graphics. You see, donations to the federal government are tax deductible. If I donate $10,000 to the national debt today, that lowers my taxable income by $10,000, which in turn lowers my tax burden thus skewing the numbers in the graphics above.</p>
<p>If anyone out there would like to add some tax functions into my Google Spreadsheet, we could avoid this fallacy of overlooking secondary consequences! Somebody get on that!</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2009/11/putting-a-dent-in-the-national-debt/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Woods Hole Drawbridge Exhibit</title>
		<link>http://ryanschenk.com/2009/06/woods-hole-drawbridge-exhibit/</link>
		<comments>http://ryanschenk.com/2009/06/woods-hole-drawbridge-exhibit/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 19:13:24 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ryanschenk.com/?p=91</guid>
		<description><![CDATA[Several weeks ago I was approached to contribute an art installation to an upcoming show at the Woods Hole Historical Museum commemorating the Woods Hole drawbridge. Our drawbridge, originally installed in the late 1930&#8217;s, was replaced with a new one this winter. The show is centered around two time lapse movies that document the entire [...]]]></description>
			<content:encoded><![CDATA[<p>Several weeks ago I was approached to contribute an art installation to an upcoming show at the <a title="Woods Hole Historical Museum Website" href="http://www.woodsholemuseum.org/" target="_blank">Woods Hole Historical Museum</a> commemorating the Woods Hole drawbridge. Our drawbridge, originally installed in the late 1930&#8217;s, was replaced with a new one this winter. The show is centered around two time lapse movies that document the entire demolition of the old bridge and construction of the new one. There is also a documentary film about the old bridge, historic photographs, and my project.</p>
<p>I was given the old control box to the bridge, and turned it into an interactive &#8220;virtual bridge&#8221; installation. The control box is a 40lb metal contraption, with a set of industrial buttons on the face, and a huge nest of wires on the inside. The buttons lights up, each one containing its own 120vac-to-6v step down transformer to power the bulb. Also interesting is the mechanical aspect of the button is a separate module from the electrical contacts. Normally-open or normally-closed electrical contact modules are screwed onto the back of the button module, I assume so one can replace the contacts when they wear out.</p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/ryanschenk/3630752333/"><img class=" " title="Control Box Buttons" src="http://farm4.static.flickr.com/3601/3630752333_c16392565d.jpg" alt="Buttons inside the Control Box" width="500" height="333" /></a><p class="wp-caption-text">Buttons inside the Control Box</p></div>
<p>Attached to the buttons was a huge mess of wires, which ran out of the box through a conduit. When the bridge was operational, this conduit connected to some sort of logic unit that was lost during demolition. Having talked to bridge operators, and given the vintage of this control system, I suspect the logic was performed with a large bank of relays.</p>
<p>To create a computer input controller for the virtual bridge, my friend Dan ripped out the original wiring, and re-wired just the 120vac circuit to make all the buttons light up. Next, I got the controller to interface with the computer. To do this, I used the USB keyboard encoder hack. This is a very easy technique, accomplished by opening up a keyboard, plugging it in, and shorting pins on the keyboard encoder circuit. With a little trial-and-error, you can determine a set of combinations that reproducibly &#8220;type&#8221; specific key codes into the computer. For instance, shorting a certain two pins on the encoder might always type the letter &#8220;w&#8221; onscreen. I came up with one pin combination for each of the buttons on the control box, soldered on some wire leads, and connected them to the buttons on the control box.</p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/ryanschenk/3630753599/"><img title="USB Keyboard Hack" src="http://farm4.static.flickr.com/3648/3630753599_c8f1851b2f.jpg" alt="USB keyboard circuit wired to the control buttons" width="500" height="333" /></a><p class="wp-caption-text">USB keyboard circuit wired to the control buttons</p></div>
<p>Once I had the control box talking to the computer, the rest was done in software. The idea for the installation was simply to &#8220;create a virtual drawbridge,&#8221; so I had quite a bit of creative freedom. Initially, I was given video footage of the bridge in operation, and I experimented with using the control box to manipulate video playback. I really wanted the control box to perform realtime <a href="http://www.youtube.com/watch?v=6LG39Wp7OzQ" target="_blank">datamoshing</a> on the bridge video, but ultimately this proved unfeasible and way too weird for the (elderly) population of Woods Hole.</p>
<p>Instead, I scrapped the video footage entirely and used Flash to create a bridge tending video game. Museum patrons – with the aid of onscreen prompts – use the real control box to operate an animated drawbridge, allowing cars to drive over and boats to sail under. The game required quite a bit of illustration, which is not really my forte, but came out looking great. While I had originally designed the game for kids, during the opening reception it was a bigger hit with old people than children! I suspect these folks have been wanting to play with that bridge controller for years, and now they finally can.</p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://www.flickr.com/photos/ryanschenk/3636788331/"><img title="Screenshot of the Drawbridge Video Game" src="http://farm4.static.flickr.com/3570/3636788331_b1a63d8984.jpg" alt="Screenshot of the Drawbridge Video Game" width="500" height="374" /></a><p class="wp-caption-text">Screenshot of the Drawbridge Video Game</p></div>
]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2009/06/woods-hole-drawbridge-exhibit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>LigerCat Released</title>
		<link>http://ryanschenk.com/2009/03/ligercat-released/</link>
		<comments>http://ryanschenk.com/2009/03/ligercat-released/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 21:13:11 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[Informatics]]></category>

		<guid isPermaLink="false">http://ryanschenk.com/?p=83</guid>
		<description><![CDATA[I have been working on version 2 of the LigerCat tool since October. Today, we flipped the switch and turned it on, at http://ligercat.ubio.org.
LigerCat is the brainchild of Dr. Neil Sarkar, and was created by me. 
It&#8217;s hard to explain its use to someone outside the scientific or medicine field, but I&#8217;ll try my best [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on version 2 of the LigerCat tool since October. Today, we flipped the switch and turned it on, at <a href="http://ligercat.ubio.org">http://ligercat.ubio.org</a>.</p>
<p>LigerCat is the brainchild of <a href="http://www.uvm.edu/~insarkar/">Dr. Neil Sarkar</a>, and was created by me. </p>
<p>It&#8217;s hard to explain its use to someone outside the scientific or medicine field, but I&#8217;ll try my best to break it down. </p>
<p>The basic idea is that &#8220;tagging&#8221; is nothing new. The Web 2.0 folks got the idea from librarians, who have been tagging literature for many years. Librarians &#8220;tag&#8221; things using a &#8220;controlled vocabulary,&#8221; which is just a set of tags that are curated and maintained by some authoratative body. For instance, scientific articles published in life sciences field are tagged with a controlled vocabulary called Medical Subject Headings (MeSH), which has over 20,000 tags in the set.</p>
<p>The problem is, the journals that publish these articles are not annotated with MeSH descriptors; journals are annotated with another controlled vocabulary called Journal Subject Terms&#8230;but there&#8217;s only 120 of them! So, an article is published in a journal. This article could be tagged with any number of 20,000 MeSH descriptors. However, the journal that publishes the article is only tagged with one or more of the 120 Subject Terms.</p>
<p>That seems silly, doesn&#8217;t it? </p>
<p>That&#8217;s where LigerCat comes in. It can find every article published in a journal, and is capable of generating a tag cloud of the MeSH terms applied to every article published in a journal. The National Library of Medicine has a database of life sciences articles called PubMed, so we downloaded all the records, and built indices from that.</p>
<p>From a journal&#8217;s MeSH tag cloud, you can click one or more tags. LigerCat will do a live search back to PubMed to see the articles tagged with your selections. </p>
<p>That&#8217;s pretty cool to begin with, but there&#8217;s a lot more that we can do with the technology. </p>
<p>The articles tab will allow you to do a plain old search into the PubMed article database. Ligercat will download all the results, and build a MeSH tag cloud from the articles returned by your search. You can search for a <a href="http://ligercat.ubio.org/articles/biodiversity%20informatics">topic</a>, a <a href="http://ligercat.ubio.org/articles/Shimomura%20O">person</a>, or an <a href="http://ligercat.ubio.org/articles/Cavia%20porcellus">organism</a>, and LigerCat will build you a MeSH cloud based on the results.</p>
<p>Or you can go nuts, and click over to the Genes tab. You can paste a FASTA-formatted sequence of ATC&#8217;s and G&#8217;s into the text box. (<a href="http://www.ncbi.nlm.nih.gov/nuccore/41406056?report=fasta">This is a good one to try if you&#8217;re curious</a>.) LigerCat uses an algorithm called BLAST to find all the known genes that are similar to the one you pasted. LigerCat will use its own magic to find all the articles written about those genes, then display a MeSH cloud built from all those articles. You could start with an unknown gene sequence, and in the span of a few minutes, be reading articles about that sequence. Pretty neat stuff.</p>
<p>For the geeks reading this, you may notice that the searches to PubMed are performed live outside the HTTP request/response cycle. I used <a href="http://backgroundrb.rubyforge.org/">BackgrounDRB</a> to pull this off, and it works quite well. If and when LigerCat experiences a lot of load, BackgrounDRB will allow us to pull the background search workers off onto their own server(s), allowing us to isolate the computationally intensive part of the application away from the app server.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2009/03/ligercat-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing the MySQL Ruby Gem on CentOS5</title>
		<link>http://ryanschenk.com/2009/03/installing-the-mysql-ruby-gem-on-centos5/</link>
		<comments>http://ryanschenk.com/2009/03/installing-the-mysql-ruby-gem-on-centos5/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 20:07:52 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Quick Tips]]></category>

		<guid isPermaLink="false">http://ryanschenk.com/?p=79</guid>
		<description><![CDATA[Pretty easy

yum install mysql-devel
gem install mysql -- --with-mysql-config=/usr/bin/mysql_config --with-mysql-lib=/usr/lib/mysql

]]></description>
			<content:encoded><![CDATA[<p>Pretty easy</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-devel
gem <span style="color: #c20cb9; font-weight: bold;">install</span> mysql <span style="color: #660033;">--</span> --with-mysql-<span style="color: #007800;">config</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql_config --with-mysql-<span style="color: #007800;">lib</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mysql</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2009/03/installing-the-mysql-ruby-gem-on-centos5/feed/</wfw:commentRss>
		</item>
		<item>
		<title>It&#8217;s Official</title>
		<link>http://ryanschenk.com/2009/01/its-official/</link>
		<comments>http://ryanschenk.com/2009/01/its-official/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 21:35:56 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ryanschenk.com/?p=76</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://ryanschenk.com/wp-content/uploads/2009/01/its-official1.png"><img class="alignnone size-full wp-image-77" title="its-official1" src="http://ryanschenk.com/wp-content/uploads/2009/01/its-official1.png" alt="" width="500" height="718" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2009/01/its-official/feed/</wfw:commentRss>
		</item>
		<item>
		<title>No_Knead_Bread.rake</title>
		<link>http://ryanschenk.com/2008/12/no-knead-bread-recipe/</link>
		<comments>http://ryanschenk.com/2008/12/no-knead-bread-recipe/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 19:05:58 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://ryanschenk.com/?p=68</guid>
		<description><![CDATA[
#
# Denali's No-Knead Miracle Bread
#
&#160;
require 'cast_iron_dutch_oven'  # sudo gem install dutch_oven --version 3.5 Quart --source KitchenwaresStore
require 'mixing_bowl'
require 'spatula'
&#160;
desc &#34;Step 1. To be performed at night&#34;
task&#40;:at_night&#41; do
&#160;
  ingredients = &#123; 'Warm Water'        =&#62; '2 Cups',
             [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#</span>
<span style="color:#008000; font-style:italic;"># Denali's No-Knead Miracle Bread</span>
<span style="color:#008000; font-style:italic;">#</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'cast_iron_dutch_oven'</span>  <span style="color:#008000; font-style:italic;"># sudo gem install dutch_oven --version 3.5 Quart --source KitchenwaresStore</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'mixing_bowl'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'spatula'</span>
&nbsp;
desc <span style="color:#996600;">&quot;Step 1. To be performed at night&quot;</span>
task<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:at_night</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
&nbsp;
  ingredients = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">'Warm Water'</span>        <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'2 Cups'</span>,
                  <span style="color:#996600;">'Yeast'</span>             <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'1/4 tsp'</span>, <span style="color:#008000; font-style:italic;"># Yes, that's all</span>
                  <span style="color:#996600;">'All Purpose Flour'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'1 Cup'</span>,   <span style="color:#008000; font-style:italic;"># King Arthur is the best.</span>
                  <span style="color:#996600;">'Whole Wheat Flour'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'1/4 Cup'</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  MixingBowl.<span style="color:#9900CC;">contents</span> = ingredients.<span style="color:#9900CC;">collect</span> <span style="color:#006600; font-weight:bold;">&#123;</span>|ingredient, amount| ingredient.<span style="color:#9900CC;">measure</span><span style="color:#006600; font-weight:bold;">&#40;</span>amount<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  MixingBowl.<span style="color:#9900CC;">contents</span>.<span style="color:#9900CC;">mix_thoroughly</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:with</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> Spatula<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  MixingBowl.<span style="color:#9900CC;">cover</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:with</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:cloth</span>, <span style="color:#ff3333; font-weight:bold;">:loosely</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#CC0066; font-weight:bold;">sleep</span> 4.<span style="color:#9900CC;">hours</span>..8.<span style="color:#9900CC;">hours</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
desc <span style="color:#996600;">&quot;Step 2. To be peformed the next morning&quot;</span>
task<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:morning</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:at_night</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
&nbsp;
  ingredients = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#996600;">'All Purpose Flour'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;#{(2 + 1/2).scant} Cups&quot;</span>,
                  <span style="color:#996600;">'Asiago Cheese'</span>     <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'4 oz'</span>,
                  <span style="color:#996600;">'Salt'</span>              <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'2 teaspoons'</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  ingredients<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Asiago Cheese'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">dice</span> <span style="color:#996600;">'3/8&quot; cubes'</span>
&nbsp;
  MixingBowl.<span style="color:#9900CC;">contents</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> ingredients.<span style="color:#9900CC;">collect</span><span style="color:#006600; font-weight:bold;">&#123;</span> |ingredient, amount| ingredient.<span style="color:#9900CC;">measure</span><span style="color:#006600; font-weight:bold;">&#40;</span>amount<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  MixingBowl.<span style="color:#9900CC;">contents</span>.<span style="color:#9900CC;">mix_thoroughly</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:with</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> Spatula<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  MixingBowl.<span style="color:#9900CC;">cover</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:with</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:cloth</span>, <span style="color:#ff3333; font-weight:bold;">:loosely</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#CC0066; font-weight:bold;">sleep</span> 6.<span style="color:#9900CC;">hours</span>..8.<span style="color:#9900CC;">hours</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
desc <span style="color:#996600;">&quot;Step 3. To be performed after work&quot;</span>
task<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:after_work</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:morning</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  <span style="color:#6666ff; font-weight:bold;">Oven::MiddleRack</span>.<span style="color:#9900CC;">contents</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> DutchOven
  <span style="color:#6666ff; font-weight:bold;">Oven::MiddleRack</span>.<span style="color:#9900CC;">contents</span>.<span style="color:#9900CC;">insert</span><span style="color:#006600; font-weight:bold;">&#40;</span>DutchOvenCover, <span style="color:#ff3333; font-weight:bold;">:next_to</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> DutchOven<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#6666ff; font-weight:bold;">Oven::PreHeat</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>500.<span style="color:#9900CC;">degrees</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">case</span> <span style="color:#6666ff; font-weight:bold;">Oven::PreHeat</span>.<span style="color:#9900CC;">status</span>
  <span style="color:#9966CC; font-weight:bold;">when</span> done? 
    <span style="color:#CC0066; font-weight:bold;">sleep</span> 20.<span style="color:#9900CC;">minutes</span>  <span style="color:#008000; font-style:italic;"># Let DutchOven heat up after oven is at temperature</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  MixingBowl.<span style="color:#9900CC;">contents</span>.<span style="color:#9900CC;">sprinkle_with</span> <span style="color:#ff3333; font-weight:bold;">:flour</span>
&nbsp;
  dutch_oven_cover, dutch_oven = <span style="color:#6666ff; font-weight:bold;">Oven::MiddleRack</span>.<span style="color:#9900CC;">contents</span>.<span style="color:#9900CC;">pop</span>, <span style="color:#6666ff; font-weight:bold;">Oven::MiddleRack</span>.<span style="color:#9900CC;">contents</span>.<span style="color:#9900CC;">pop</span>
&nbsp;
  dutch_oven.<span style="color:#9900CC;">inside</span>.<span style="color:#9900CC;">spray_with</span> <span style="color:#ff3333; font-weight:bold;">:oil</span>
  MixingBowl.<span style="color:#9900CC;">contents</span>.<span style="color:#9900CC;">roll_into</span><span style="color:#006600; font-weight:bold;">&#40;</span>dutch_oven, <span style="color:#ff3333; font-weight:bold;">:with</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> WetSpatula<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#6666ff; font-weight:bold;">Oven::MiddleRack</span>.<span style="color:#9900CC;">contents</span> <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> dutch_oven.<span style="color:#9900CC;">cover</span>!<span style="color:#006600; font-weight:bold;">&#40;</span>dutch_oven_cover<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#6666ff; font-weight:bold;">Oven::Bake</span>.<span style="color:#9900CC;">at</span><span style="color:#006600; font-weight:bold;">&#40;</span>475.<span style="color:#9900CC;">degrees</span>, 25.<span style="color:#9900CC;">minutes</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  DutchOven.<span style="color:#9900CC;">uncover</span>!
  <span style="color:#6666ff; font-weight:bold;">Oven::Bake</span>.<span style="color:#9900CC;">at</span><span style="color:#006600; font-weight:bold;">&#40;</span>450.<span style="color:#9900CC;">degrees</span>, 12.<span style="color:#9900CC;">minutes</span>..16.<span style="color:#9900CC;">minutes</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#6666ff; font-weight:bold;">Oven::MiddleRack</span>.<span style="color:#9900CC;">contents</span>.<span style="color:#9900CC;">pop</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">rescue</span> ThirdDegreeBurnError 
  Oven.<span style="color:#9900CC;">turn_off</span>
  <span style="color:#CC0066; font-weight:bold;">raise</span> EmergencyRoomException, <span style="color:#996600;">&quot;Wear oven mitts next time&quot;</span>, <span style="color:#CC0066; font-weight:bold;">caller</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2008/12/no-knead-bread-recipe/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing RMagick2 on CentOS5</title>
		<link>http://ryanschenk.com/2008/09/installing-rmagick2-on-centos5/</link>
		<comments>http://ryanschenk.com/2008/09/installing-rmagick2-on-centos5/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 18:03:26 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[Linux]]></category>

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

		<guid isPermaLink="false">http://ryanschenk.com/?p=49</guid>
		<description><![CDATA[I have just gone through hell attempting to install ImageMagick, RMagick2 on our CentOS5 server, and thought others might find this information useful.
It should have been as easy as

yum install ImageMagick
gem install rmagick

But unfortunately it wasn&#8217;t. The reason is because yum will install ImageMagick 6.2.8.0, while RMagick2 requires ImageMagick 6.3.0 or higher. Fantastic. My sysadmin [...]]]></description>
			<content:encoded><![CDATA[<p>I have just gone through hell attempting to install <a href="http://www.imagemagick.org/">ImageMagick</a>, <a href="http://rmagick.rubyforge.org/">RMagick2</a> on our <a href="http://www.centos.org/">CentOS5</a> server, and thought others might find this information useful.</p>
<p>It should have been as easy as</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> ImageMagick
gem <span style="color: #c20cb9; font-weight: bold;">install</span> rmagick</pre></div></div>

<p>But unfortunately it wasn&#8217;t. The reason is because yum will install ImageMagick 6.2.8.0, while RMagick2 requires ImageMagick 6.3.0 or higher. Fantastic. My sysadmin friend says, &#8220;It&#8217;s what is in the distribution, to keep the package base consistent.&#8221; I say, &#8220;But I need ImageMagick 6.3.0+ and this is a royal pain in the neck.&#8221;</p>
<p>These are the steps I took to successfully install ImageMagick 6.4.3 and RMagic2 on CentOS5. It took me an entire morning to figure this out (I am not a Linux expert), but with this guide it should take you 15 minutes or less.</p>
<h2>0. Tell Yum to Get a Grip</h2>
<p>I wasn&#8217;t able to install any of the following RPMs, because Yum had a gripper about them being &#8220;unsigned.&#8221; You need to tell Yum otherwise. Open up /etc/yum.conf</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>yum.conf</pre></div></div>

<p>At the very <em>end</em> of the file, add the following line</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #007800;">gpgcheck</span>=0</pre></div></div>

<p>That will tell Yum to install packages, regardless if they are &#8220;unsigned.&#8221;</p>
<p>WARNING: There&#8217;s probably a reason why gpgcheck exists. Do this at your own risk, and be sure to flip gpgcheck back to 1 when you are done.</p>
<h2>1. Install a couple dependencies for ImageMagick</h2>
<p>ImageMagick 6.4.3 requires two dependencies that were not in yum, <code>libjasper.so.1</code> and <code>libdjvulibre.so.15</code>. Using <a href="http://rpm.pbone.net/">http://rpm.pbone.net/</a>, I found the RPMs that contained these files:<br />
<a href="ftp://ftp.pbone.net/mirror/centos.karan.org/el5/extras/testing/i386/RPMS/jasper-libs-1.900.1-7.el5.kb.i386.rpm">jasper-libs-1.900.1-7.el5.kb.i386.rpm</a> and <a href="http://centos.karan.org/el5/extras/testing/i386/RPMS/djvulibre-3.5.19-4.el5.kb.i386.rpm">djvulibre-3.5.19-4.el5.kb.i386.rpm</a></p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.pbone.net<span style="color: #000000; font-weight: bold;">/</span>mirror<span style="color: #000000; font-weight: bold;">/</span>centos.karan.org<span style="color: #000000; font-weight: bold;">/</span>el5<span style="color: #000000; font-weight: bold;">/</span>extras<span style="color: #000000; font-weight: bold;">/</span>testing<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>RPMS<span style="color: #000000; font-weight: bold;">/</span>jasper-libs-1.900.1-7.el5.kb.i386.rpm
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>centos.karan.org<span style="color: #000000; font-weight: bold;">/</span>el5<span style="color: #000000; font-weight: bold;">/</span>extras<span style="color: #000000; font-weight: bold;">/</span>testing<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>RPMS<span style="color: #000000; font-weight: bold;">/</span>djvulibre-3.5.19-4.el5.kb.i386.rpm
&nbsp;
yum <span style="color: #c20cb9; font-weight: bold;">install</span> jasper-libs-1.900.1-7.el5.kb.i386.rpm
yum <span style="color: #c20cb9; font-weight: bold;">install</span> djvulibre-3.5.19-4.el5.kb.i386.rpm</pre></div></div>

<h2>2. Install ImageMagick and Various Development Packages</h2>
<p>Next, we need to install ImageMagick. To simply install ImageMagick, it&#8217;s a single package. However, to make RMagick happy, we also need to install several development packages.</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.imagemagick.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>ImageMagick<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>fedora<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>ImageMagick-6.4.3-6.i386.rpm
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.imagemagick.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>ImageMagick<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>fedora<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>ImageMagick-devel-6.4.3-6.i386.rpm
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.imagemagick.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>ImageMagick<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>fedora<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>ImageMagick-c++-6.4.3-6.i386.rpm
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.imagemagick.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>ImageMagick<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>fedora<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>ImageMagick-c++-devel-6.4.3-6.i386.rpm
&nbsp;
yum <span style="color: #c20cb9; font-weight: bold;">install</span> ImageMagick-6.4.3-6.i386.rpm
yum <span style="color: #c20cb9; font-weight: bold;">install</span> ImageMagick-devel-6.4.3-6.i386.rpm
yum <span style="color: #c20cb9; font-weight: bold;">install</span> ImageMagick-c++-6.4.3-6.i386.rpm
yum <span style="color: #c20cb9; font-weight: bold;">install</span> ImageMagick-c++-devel-6.4.3-6.i386.rpm</pre></div></div>

<p>When you install the first ImageMagick package, yum should do its magic and install a bunch of dependencies, such as ghostscript, lcms, and others.</p>
<h2>3. Install RMagick, finally</h2>
<p>With all those RPM packages installed, you can install RMagick. If all the ImageMagick stuff is there, this should go smoothly.</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">gem <span style="color: #c20cb9; font-weight: bold;">install</span> rmagick</pre></div></div>

<h2>4. Undo the Change to yum.conf</h2>
<p>It&#8217;s probably wise to remove or comment-out the modification you made to yum.conf</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># gpgcheck=0</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2008/09/installing-rmagick2-on-centos5/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Controlling Whitespace with HAML</title>
		<link>http://ryanschenk.com/2008/07/controlling-whitespace-with-haml/</link>
		<comments>http://ryanschenk.com/2008/07/controlling-whitespace-with-haml/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 16:49:16 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[HAML]]></category>

		<category><![CDATA[Quick Tips]]></category>

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

		<guid isPermaLink="false">http://ryanschenk.com/?p=14</guid>
		<description><![CDATA[When displaying certain elements as inline, the whitespace between tags does matter in your layout.
When trying to display some LI tags as inline, I really needed to spit out the tags with no whitespace in between. Unfortunately HAMLs handy-dandy tag indenting was wrecking me. It was so bad, that I resorted to calling a helper [...]]]></description>
			<content:encoded><![CDATA[<p>When displaying certain elements as inline, the whitespace between tags <strong>does</strong> matter in your layout.</p>
<p>When trying to display some <code>LI</code> tags as inline, I really needed to spit out the tags with no whitespace in between. Unfortunately <a href="http://haml.hamptoncatlin.com/">HAML</a>s handy-dandy tag indenting was wrecking me. It was so bad, that I resorted to calling a helper method that spat out the HTML as a string, with no whitespace between the tags.</p>
<p>But today, I discovered that if you append the HAML &#8216;tag&#8217; with a &#8220;<code>&gt;</code>&#8220;, it will not add any whitespace to the tag.</p>
<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="rails rails" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">%</span>ul.<span style="color:#9900CC;">filter_navigation</span>.<span style="color:#9900CC;">tabnav</span>
  <span style="color:#006600; font-weight:bold;">%</span>li.<span style="color:#9900CC;">go</span>.<span style="color:#9900CC;">first</span><span style="color:#006600; font-weight:bold;">&gt;</span>= <span style="color:#5A0A0A; font-weight:bold;">link_to_function</span> <span style="color:#996600;">'Gene Ontology'</span>, <span style="color:#996600;">'Filter.select(&quot;go&quot;)'</span>
  <span style="color:#006600; font-weight:bold;">%</span>li.<span style="color:#9900CC;">age</span><span style="color:#006600; font-weight:bold;">&gt;</span>=      <span style="color:#5A0A0A; font-weight:bold;">link_to_function</span> <span style="color:#996600;">'Longevity'</span>,     <span style="color:#996600;">'Filter.select(&quot;age&quot;)'</span>
  <span style="color:#006600; font-weight:bold;">%</span>li.<span style="color:#9900CC;">gaz</span>.<span style="color:#9900CC;">last</span><span style="color:#006600; font-weight:bold;">&gt;</span>= <span style="color:#5A0A0A; font-weight:bold;">link_to_function</span> <span style="color:#996600;">'Gaz Ontology'</span>,  <span style="color:#996600;">'Filter.select(&quot;gaz&quot;)'</span></pre></div></div>

<p>Results in this HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'filter_navigation tabnav'</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;go first&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'Filter.select(&quot;go&quot;); return false;'</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Gene Ontology<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;age&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'Filter.select(&quot;age&quot;); return false;'</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Longevity<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;gaz last&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'Filter.select(&quot;gaz&quot;); return false;'</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Gaz Ontology<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span></pre></div></div>

<p>No Whitespace! You got a date Wednesday baby!</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2008/07/controlling-whitespace-with-haml/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Fixtures with Funky Table Names</title>
		<link>http://ryanschenk.com/2008/07/using-fixtures-with-funky-table-names/</link>
		<comments>http://ryanschenk.com/2008/07/using-fixtures-with-funky-table-names/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 15:18:21 +0000</pubDate>
		<dc:creator>Ryan Schenk</dc:creator>
		
		<category><![CDATA[Rails]]></category>

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

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

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

		<guid isPermaLink="false">http://ryanschenk.com/?p=3</guid>
		<description><![CDATA[If you have an AR Model whose table name does not follow the convention, and you have needed to set it explicitly using set_table_name.

class ChiliDog &#60; ActiveRecord::Base
  set_table_name 'dogs_made_of_chili'
end

Then your test fixtures file must be named the same name as the table, not the model&#8230;
dogs_made_of_chili.yml
In your rspec, you must use the table name to [...]]]></description>
			<content:encoded><![CDATA[<p>If you have an AR Model whose table name does not follow the convention, and you have needed to set it explicitly using <code>set_table_name</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="rails rails" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> ChiliDog <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
  set_table_name <span style="color:#996600;">'dogs_made_of_chili'</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Then your test fixtures file must be named the same name as the <strong>table</strong>, not the model&#8230;</p>
<p><code>dogs_made_of_chili.yml</code></p>
<p>In your rspec, you must use the <strong>table</strong> name to call your fixtures, then specify the AR class that models it&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="rails rails" style="font-family:monospace;">fixtures <span style="color:#ff3333; font-weight:bold;">:dogs_made_of_chili</span>
set_fixture_class <span style="color:#ff3333; font-weight:bold;">:dogs_made_of_chili</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'ChiliDog'</span></pre></div></div>

<p>Note that little guy <code>set_fixture_class</code>!! He does not appear in the online Rails API docs (at least not <a href="http://www.railsbrain.com/">Rails Brain</a>), so I had originally assumed that you would pass in a Constant, not a String to it. I was wrong!!</p>
<p>The class name given to set_fixture_class must be a <strong>String</strong> and not a Constant like you might assume/think/wish-for/hope/desire. If you put a constant in there, you will get all sorts of weird, will bang your head against your desk repeatedly, pull your hair, tear your clothes, pour ashes on your head, and various other Old-Testament-style lamentations.</p>
<p>So, word of warning, use a String, not a Constant when using <code>set_fixture_class</code>!</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanschenk.com/2008/07/using-fixtures-with-funky-table-names/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
