<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>seandenigris.com</title>
	<atom:link href="http://seandenigris.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://seandenigris.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 09 Aug 2010 02:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Squeak/Pharo command line scripting</title>
		<link>http://seandenigris.com/blog/?p=522</link>
		<comments>http://seandenigris.com/blog/?p=522#comments</comments>
		<pubDate>Mon, 09 Aug 2010 02:39:45 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Pharo]]></category>
		<category><![CDATA[Squeak]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=522</guid>
		<description><![CDATA[Typical Workflow I go through a lot of images.  It&#8217;s just the way it is &#8211; make some changes to a package, try to load it in a fresh image, open another image with an older version to compare. The Case for Scripting The frustrating part is not using many images (which is pretty cool [...]]]></description>
			<content:encoded><![CDATA[<h4>Typical Workflow</h4>
<p>I go through a <strong>lot</strong> of images.  It&#8217;s just the way it is &#8211; make some changes to a package, try to load it in a fresh image, open another image with an older version to compare.</p>
<h4>The Case for Scripting</h4>
<p>The frustrating part is not using many images (which is pretty cool &#8211; to have multiple computers running at once&#8230; but I digress), but setting up the images every time.  So I decided I&#8217;d find a way to load common configurations automatically.  But how would I communicate to the image that it should run certain code on startup?  A quick google found <a href="http://wiki.squeak.org/squeak/425">writing scripts</a>.</p>
<h4>Poor Command of the Mac Command Line</h4>
<p>This sounded like just what I needed, but I ran into a bit of trouble with the Mac command line:</p>
<blockquote>
<div id="_mcePaste">~$ open -a /Applications/Squeak\ 4.2.5beta1U</div>
<div id="_mcePaste">FSPathMakeRef(/Applications/Squeak 4.2.5beta1U) failed with error -43.</div>
<div id="_mcePaste">~$ open -a Squeak\ 4.2.5beta1U ./Pharo-1.1-scripting/Pharo-1.1-11411dev10.07.1.image</div>
<div id="_mcePaste">Unable to find application named &#8216;Squeak 4.2.5beta1U&#8217;</div>
<div id="_mcePaste"><span style="font-size: 13.1944px;">~$ /Applications/Squeak\ 4.2.5beta1U ./Pharo-1.1-scripting/Pharo-1.1-11411dev10.07.1.image</span></div>
<div id="_mcePaste">-bash: /Applications/Squeak 4.2.5beta1U: No such file or directory</div>
<div id="_mcePaste"><span style="font-size: 13.1944px;">~$ /Applications/Squeak\ 4.2.5beta1U.app ./Pharo-1.1-scripting/Pharo-1.1-11411dev10.07.1.image</span></div>
<div id="_mcePaste">-bash: /Applications/Squeak 4.2.5beta1U.app: is a directory</div>
<div id="_mcePaste">&#8230;</div>
</blockquote>
<h4></h4>
<h4>Scripting the Image!</h4>
<div>I finally figured out that what I needed to do was call the actual binary inside the .app bundle, so:</div>
<blockquote>
<div><span style="font-size: 13.1944px;">~$ &#8220;/Applications/Squeak 4.2.5beta1U.app/Contents/MacOS/Squeak VM Opt&#8221; ./Pharo-1.1-11411dev10.07.1.image /Users/sean/Squeak/SpdImageSetup.st testArgument</span></div>
</blockquote>
<div><span style="font-size: 13.1944px;">And, bingo!  The image opened and filed in the .st file.  The arguments are available with SmalltalkImage&gt;&gt;getSystemAttribute:  So, for example (in Squeak 4.1), &#8220;Smalltalk getSystemAttribute: 3&#8243; returned &#8216;</span><span style="font-size: 13.1944px;">testArgument&#8217;</span></div>
<h4></h4>
<h4>Running the Script Automatically on Startup</h4>
<div><span style="font-size: 13.1944px;">The other thing to know is that you cause the filed in code to run automatically by creating a class&gt;&gt;initialize method somewhere in it, which is run immediately after the code is loaded.</span></div>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=522</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Downloading the Squeak VM</title>
		<link>http://seandenigris.com/blog/?p=517</link>
		<comments>http://seandenigris.com/blog/?p=517#comments</comments>
		<pubDate>Wed, 16 Jun 2010 17:40:14 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Squeak]]></category>
		<category><![CDATA[FTP]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=517</guid>
		<description><![CDATA[I wanted to download a the latest Squeak Mac virtual machine from ftp://ftp.smalltalkconsulting.com.  I knew that I had to connect as a guest via FTP, but it took a while for me to figure out how to accomplish this (seemingly simple) task. From what I gathered from forums, Finder is not a good option to [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to download a the latest Squeak Mac virtual machine from <span style="font-family: Times;"><a href="ftp://ftp.smalltalkconsulting.com">ftp://ftp.smalltalkconsulting.com</a>.  I knew that I had to connect as a guest via FTP, but </span>it took a while for me to figure out how to accomplish this (seemingly simple) task.</p>
<p>From what I gathered from forums, Finder is not a good option to get files via FTP (although there seem to be workarounds).  When I tried Terminal, I kept getting a mysterious error (are there any other kinds with computers, lol): &#8220;bind: Invalid command `rl_complete&#8217;.&#8221;  In addition to being totally useless in telling me what was going on, there wasn&#8217;t any info online.  Thanks to the fickle gods, the error disappeared just as mysteriously.  The command ended up being:</p>
<blockquote><p>ftp -a smalltalkconsulting.com</p>
<p>or</p>
<p>ftp anonymous@smalltalkconsulting.com</p></blockquote>
<p>With the second option, you enter your email address when prompted for a password (this seems to happen automatically with the first one).</p>
<p>The remaining steps were (at the ftp command prompt):</p>
<ol>
<li>binary</li>
<li>get &#8220;Squeak 4.2.5beta1U.app.zip&#8221;</li>
</ol>
<p>And that was that, the file was downloaded into my home directory!</p>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=517</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Formatting code blocks in a WordPress blog</title>
		<link>http://seandenigris.com/blog/?p=500</link>
		<comments>http://seandenigris.com/blog/?p=500#comments</comments>
		<pubDate>Wed, 12 May 2010 21:50:18 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[format]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=500</guid>
		<description><![CDATA[I haven&#8217;t found a way I really love to present code in a fixed width WP layout, but the one I use is workable. It produces code that looks like this: It uses a &#60;code&#62; inside a &#60;pre&#62; with a scrolling option to: preserve indentation use a special font in a quote box to differentiate [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t found a way I really love to present code in a fixed width WP layout, but the one I use is workable.  It produces code that looks like this:</p>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/05/Formatted-code-in-WP.png"><img class="alignnone size-full wp-image-505" title="Formatted code in WP" src="http://seandenigris.com/blog/wp-content/uploads/2010/05/Formatted-code-in-WP.png" alt="" width="470" height="144" /></a></p>
<p>It uses a &lt;code&gt; inside a &lt;pre&gt; with a scrolling option to:</p>
<ul>
<li>preserve indentation</li>
<li>use a special font in a quote box to differentiate from other text</li>
<li>provide a scroll bar, as code invariably goes past the fixed width</li>
</ul>
<p>Here is the code (ironically described inside itself):</p>
<pre style="overflow-x: scroll; padding: 10px;"><code>&lt;pre style="overflow-x: scroll; padding: 10px;"&gt;[Your code here]&lt;/code&gt;&lt;/pre&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=500</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applescript to change genres in iTunes</title>
		<link>http://seandenigris.com/blog/?p=495</link>
		<comments>http://seandenigris.com/blog/?p=495#comments</comments>
		<pubDate>Wed, 12 May 2010 16:41:42 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Applescript]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Smalltalk]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=495</guid>
		<description><![CDATA[There is this awesome programming language in which the entire system (down to the graphics libraries, window system, and compiler) is available to you to reinvent, opening the possibility of truly open computing. Obviously, I&#8217;m talking about Smalltalk. But if you are too afraid to give MS and Apple the bird for not learning (or [...]]]></description>
			<content:encoded><![CDATA[<p>There is this awesome programming language in which the entire system (down to the graphics libraries, window system, and compiler) is available to you to reinvent, opening the possibility of truly open computing.</p>
<p>Obviously, I&#8217;m talking about Smalltalk.  But if you are too afraid to give MS and Apple the bird for not learning (or wanting to learn?) the computing lessons of the 1970&#8242;s, there is another option which lets you bend almost any Mac application to your will, breaking it from the chains of presumptuous software giants who think you should work the way they design instead of vice versa.</p>
<p>I&#8217;m speaking, of course, of Ruby, lol.  If you&#8217;re doing any serious Applescript development, ditch Applescript altogether, and check out the <a href="http://appscript.sourceforge.net/rb-appscript/index.html">rb-appscript library</a>.  It allows you to do anything you can do in Applescript, in a non-ambiguous way, with the power of a full programming language behind you &#8211; trust me, it&#8217;s the heaven where Applescript will go when it finally dies.</p>
<p>However, if you&#8217;re doing something simple and common, especially in a very scriptable application like iTunes, sometimes it&#8217;s easier to just crank up AppleScript Editor and hack out a one-liner.</p>
<p>Thus this very simple script to change the genres of iTunes tracks, which I used to fix things like some tracks in the &#8220;rock&#8221; genre and others in the &#8220;Rock&#8221; genre.</p>
<pre style="overflow-x: scroll; padding: 20px;"><code>tell application "iTunes"
  set tracks_to_fix to file tracks of playlist "Music" of source "Library" whose genre ends with "ock"
  set genre of tracks_to_fix to "Rock"
end tell
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=495</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing URLs after moving a WordPress blog</title>
		<link>http://seandenigris.com/blog/?p=489</link>
		<comments>http://seandenigris.com/blog/?p=489#comments</comments>
		<pubDate>Mon, 10 May 2010 01:46:53 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=489</guid>
		<description><![CDATA[When I moved my WordPress blog, all my image links were broken  Fortunately, with a simple google search (mysql replace substring), and 5 minutes of work in phpMyAdmin, everything was right as rain. I ran the command (adapted from a comment here) on two fields in the wp_posts table - wp_content and guide: UPDATE wp_posts SET [insert_field_name_here] [...]]]></description>
			<content:encoded><![CDATA[<p>When I moved my WordPress blog, all my image links were broken <img src='http://seandenigris.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   Fortunately, with a simple google search (mysql replace substring), and 5 minutes of work in phpMyAdmin, everything was right as rain.</p>
<p>I ran the command (adapted from a comment <a href="http://dev.mysql.com/doc/refman/5.0/en/update.html">here</a>) on two fields in the wp_posts table - wp_content and guide:</p>
<pre><code>UPDATE wp_posts
SET [insert_field_name_here] =(
REPLACE ([insert_field_name_here],
'[insert_old_URL_here]',
'[insert_new_URL_here]'));
</code></pre>
<p>One browser refresh later, I was returned to multimedia heaven <img src='http://seandenigris.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=489</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why Apple and Microsoft can&#8217;t touch Squeak Smalltalk</title>
		<link>http://seandenigris.com/blog/?p=465</link>
		<comments>http://seandenigris.com/blog/?p=465#comments</comments>
		<pubDate>Tue, 27 Apr 2010 19:39:17 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Squeak]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=465</guid>
		<description><![CDATA[Life in Mac / Windows Software is hard&#8230; and buggy.  We all know that.  Unfortunately, in mainstream systems, there&#8217;s very little we can do about it, except maybe file a bug that disappears into the bureaucracy of a major corporation, probably never to be heard from again. The Squeak Life I&#8217;m using an application called [...]]]></description>
			<content:encoded><![CDATA[<h4>Life in Mac / Windows</h4>
<p>Software is hard&#8230; and buggy.  We all know that.  Unfortunately, in mainstream systems, there&#8217;s very little we can do about it, except maybe file a bug that disappears into the bureaucracy of a major corporation, probably never to be heard from again.</p>
<h4>The Squeak Life</h4>
<p>I&#8217;m using an application called ScriptManager to keep some simple notes.  Here&#8217;s a little screenshot:</p>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.23.06-PM.png"><img class="alignnone size-medium wp-image-466" title="Screen shot 2010-04-27 at April 27, 2010 3.23.06 PM" src="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.23.06-PM-300x145.png" alt="" width="300" height="145" /></a></p>
<p>Now as software is wont to do, as soon as I went to save a profound (and long) note, an error occurred:</p>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.27.43-PM.png"><img class="alignnone size-medium wp-image-467" title="Screen shot 2010-04-27 at April 27, 2010 3.27.43 PM" src="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.27.43-PM-300x223.png" alt="" width="300" height="223" /></a></p>
<p>&#8220;What the heck is that!?&#8221; you say.  &#8221;I can get cryptic error messages quite easily in Windows, thank you very much.&#8221;  Except, this is no ordinary error message &#8211; it&#8217;s a debugger opened on the application&#8217;s code, so I can see exactly what went wrong.  I can do this because all code &#8211; from the lowest level graphics and file libraries, to whole applications &#8211; is available to me to change as I please.  And it&#8217;s all in the same simple, revolutionary (old) language &#8211; Smalltalk.  I don&#8217; have to chase the applications C++ to the libraries&#8217; C to&#8230; well what difference does it make &#8211; I would&#8217;ve given up already.</p>
<p>But in Squeak, within 2 minutes, I had fixed the error and recovered my note.</p>
<p>You see, but flipping through the call stack, the debugger showed me exactly which object had gone south.  I was able to open and inspect this object in another tool:</p>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.36.05-PM.png"><img class="alignnone size-medium wp-image-468" title="Squeak Object Inspector" src="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.36.05-PM-228x300.png" alt="" width="228" height="300" /></a></p>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.36.05-PM.png"></a>It was immediately obvious that a nil entry had been stored in a set, which is not allowed.  Right in the tool, I was able to delete the key:</p>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.37.22-PM.png"><img class="alignnone size-medium wp-image-469" title="Squeak Inspector contextual menu" src="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.37.22-PM-228x300.png" alt="" width="228" height="300" /></a></p>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-27-at-April-27-2010-3.37.22-PM.png"></a>And I was back on track &#8211; no work lost!  How does that compare to your last error in OS X or Windows?</p>
<p>n.b. I was using a variant of Squeak called Pharo.  All this info applies to all versions of Squeak.</p>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=465</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BDD in Squeak Smalltalk: An exploration</title>
		<link>http://seandenigris.com/blog/?p=460</link>
		<comments>http://seandenigris.com/blog/?p=460#comments</comments>
		<pubDate>Tue, 27 Apr 2010 16:12:11 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Behavior Driven Development]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[Squeak]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=460</guid>
		<description><![CDATA[Coming from Ruby, I&#8217;m obsessed with Behavior Driven Development.  The community (e.g. Rspec, Cucumber) is alive, and there is a body of practices to follow. Since TDD was born in Smalltalk, I expected to find the same energy and guidance in Squeak.  Squeak represents the most profound, empowering environment I&#8217;ve ever seen (I will never [...]]]></description>
			<content:encoded><![CDATA[<p>Coming from Ruby, I&#8217;m obsessed with Behavior Driven Development.  The community (e.g. Rspec, Cucumber) is alive, and there is a body of practices to follow.</p>
<p>Since TDD was born in Smalltalk, I expected to find the same energy and guidance in Squeak.  Squeak represents the most profound, empowering environment I&#8217;ve ever seen (I will never go back to C, C++, or even Ruby &#8211; which misses the boat by not being a living system).  However, the testing situation seems frozen in the early days.</p>
<p>My intention is to create do a series of experiments, which will lead to BDD best-practices in Squeak.  My vision is code that is pulled into existence by what matters to its users, that is easy to understand, and easy to change.</p>
<p>I&#8217;ll keep you posted&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=460</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Squeak 4.1 Docking Bar</title>
		<link>http://seandenigris.com/blog/?p=454</link>
		<comments>http://seandenigris.com/blog/?p=454#comments</comments>
		<pubDate>Fri, 23 Apr 2010 04:50:09 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=454</guid>
		<description><![CDATA[I love that every new feature of Squeak is there&#8230; And, I love being able to turn them off! When I&#8217;m working, I absolutely must, must, must have a blank canvas, so I don&#8217;t like backgrounds, icons, desktops, menus, or anything else to distract me. To turn the Docking Bar on and off, there is [...]]]></description>
			<content:encoded><![CDATA[<p>I love that every new feature of Squeak is there&#8230; And, I love being able to turn them off!</p>
<p>When I&#8217;m working, I absolutely must, must, must have a blank canvas, so I don&#8217;t like backgrounds, icons, desktops, menus, or anything else to distract me.</p>
<p>To turn the Docking Bar on and off, there is a preference. Go to World menu -&gt; Appearance -&gt; Preferences, and type &#8216;dock&#8217; in the search field and it will come up.</p>
<p>If you want to toggle the dock on and off a lot, you could save the following code and assign a keyboard shortcut to it:</p>
<pre style="overflow-x: scroll; padding: 10px;"><code>TheWorldMainDockingBar showWorldMainDockingBar:
TheWorldMainDockingBar showWorldMainDockingBar not.</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=454</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Quicklook support for Ruby files with different/no extensions (e.g. rake files)</title>
		<link>http://seandenigris.com/blog/?p=412</link>
		<comments>http://seandenigris.com/blog/?p=412#comments</comments>
		<pubDate>Thu, 04 Mar 2010 20:15:43 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Quicklook]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=412</guid>
		<description><![CDATA[1. Download the excellent qlcolorcode bundle from Google Code 2. Add the following line to QLColorCode.qlgenerator/Contents/Info.plist: &#60;string&#62;public.data&#60;/string&#62; So that it looks like this: 3. In QLColorCode.qlgenerator/Contents/Resources/colorize.sh, add (and customize) the highlighted code, which you can get at github: 4. Oops!  Forgot, you may have to sudo touch /path/to/QLColorCode.qlgenerator for changes to take effect]]></description>
			<content:encoded><![CDATA[<p>1. <a href="http://code.google.com/p/qlcolorcode/">Download the excellent qlcolorcode bundle from Google Code</a></p>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-04-at-March-4-2010-3.13.46-PM.png"><img class="alignnone size-medium wp-image-413" title="Screen shot 2010-03-04 at March 4, 2010 3.13.46 PM" src="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-04-at-March-4-2010-3.13.46-PM-300x180.png" alt="" width="300" height="180" /></a></p>
<p>2. Add the following line to QLColorCode.qlgenerator/Contents/Info.plist:</p>
<blockquote>
<div id="_mcePaste">&lt;string&gt;public.data&lt;/string&gt;</div>
</blockquote>
<div>So that it looks like this:</div>
<div><a href="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-04-at-March-4-2010-3.17.18-PM.png"><img class="alignnone size-medium wp-image-416" title="Screen shot 2010-03-04 at March 4, 2010 3.17.18 PM" src="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-04-at-March-4-2010-3.17.18-PM-300x208.png" alt="" width="300" height="208" /></a></div>
<div>3. In QLColorCode.qlgenerator/Contents/Resources/colorize.sh, add (and customize) the highlighted code, which you can <a href="http://gist.github.com/322074">get at github</a>:</div>
<div><a href="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-04-at-March-4-2010-3.20.10-PM.png"><img class="alignnone size-medium wp-image-417" title="Screen shot 2010-03-04 at March 4, 2010 3.20.10 PM" src="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-04-at-March-4-2010-3.20.10-PM-300x165.png" alt="" width="300" height="165" /></a></div>
<div>4. Oops!  Forgot, you may have to sudo touch /path/to/QLColorCode.qlgenerator for changes to take effect</div>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=412</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quicklook any plain-text file e.g. HAML or ERB</title>
		<link>http://seandenigris.com/blog/?p=403</link>
		<comments>http://seandenigris.com/blog/?p=403#comments</comments>
		<pubDate>Wed, 03 Mar 2010 02:45:28 +0000</pubDate>
		<dc:creator>Sean DeNigris</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Quicklook]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://seandenigris.com/blog/?p=403</guid>
		<description><![CDATA[I&#8217;m often jumping from file to file in Rails, so I really wanted Quicklook support for my template files.  Unfortunately, the suggestions I found online were confusing and incomplete. Here&#8217;s a really easy way to get it done &#8211; but no syntax highlighting 1. Show the contents of TextEdit&#8217;s package 2. Open Info.plist in a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m often jumping from file to file in Rails, so I really wanted Quicklook support for my template files.  Unfortunately, the suggestions I found online were confusing and incomplete.</p>
<p>Here&#8217;s a really easy way to get it done &#8211; but no syntax highlighting <img src='http://seandenigris.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<h6>1. Show the contents of TextEdit&#8217;s package</h6>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-02-at-March-2-2010-9.41.04-PM.png"><img class="alignnone size-medium wp-image-404" title="Screen shot 2010-03-02 at March 2, 2010 9.41.04 PM" src="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-02-at-March-2-2010-9.41.04-PM-300x271.png" alt="" width="300" height="271" /></a></p>
<h6>2. Open Info.plist in a text editor&#8230; like TextEdit, perhaps&#8230; hmm&#8230;</h6>
<h6>3. Anyway, add the following snippet (find the code on <a href="http://gist.github.com/320252">github</a>):</h6>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-02-at-March-2-2010-9.44.37-PM.png"><img class="alignnone size-medium wp-image-406" title="Screen shot 2010-03-02 at March 2, 2010 9.44.37 PM" src="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-02-at-March-2-2010-9.44.37-PM-300x285.png" alt="" width="300" height="285" /></a><br />
Put it just before the following section:<br />
<a href="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-02-at-March-2-2010-9.43.35-PM.png"><img title="Screen shot 2010-03-02 at March 2, 2010 9.43.35 PM" src="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-02-at-March-2-2010-9.43.35-PM-300x146.png" alt="" width="300" height="146" /></a></p>
<h6>4. Customize</h6>
<ul>
<li>UTTypeDescription - put in description of your choice (although you probably don&#8217;t need to)</li>
<li>UTTypeIdentifier &#8211; apparently (and this is what was missing from other descriptions), you just make something up here</li>
<li>public.filename-extension &#8211; add as many extensions as you want to map to this file type</li>
</ul>
<h6>5. Gloat</h6>
<p><a href="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-02-at-March-2-2010-9.54.47-PM.png"><img class="alignnone size-medium wp-image-409" title="Screen shot 2010-03-02 at March 2, 2010 9.54.47 PM" src="http://seandenigris.com/blog/wp-content/uploads/2010/03/Screen-shot-2010-03-02-at-March-2-2010-9.54.47-PM-274x300.png" alt="" width="274" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://seandenigris.com/blog/?feed=rss2&amp;p=403</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
