<?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>Daemian Mack</title>
	<atom:link href="http://daemianmack.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://daemianmack.com</link>
	<description>daemianmack.com</description>
	<lastBuildDate>Wed, 13 Feb 2013 00:45:40 +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>Block-select in iTerm</title>
		<link>http://daemianmack.com/?p=151</link>
		<comments>http://daemianmack.com/?p=151#comments</comments>
		<pubDate>Wed, 13 Feb 2013 00:45:40 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=151</guid>
		<description><![CDATA[Hold down Alt+Cmd to turn your mouse cursor into a crosshair, letting you select text blockwise.]]></description>
			<content:encoded><![CDATA[<p>Hold down Alt+Cmd to turn your mouse cursor into a crosshair, letting you select text blockwise.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2013/02/block_select.png"><img src="http://daemianmack.com/wp-content/uploads/2013/02/block_select.png" alt="" title="block_select" width="472" height="215" class="aligncenter size-full wp-image-183" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=151</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Printing only the matching column with awk and grep</title>
		<link>http://daemianmack.com/?p=148</link>
		<comments>http://daemianmack.com/?p=148#comments</comments>
		<pubDate>Fri, 07 Oct 2011 13:25:28 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=148</guid>
		<description><![CDATA[I&#8217;ve spent way too many minutes looking this up over the years. awk 'match($0,/regexp/) {print substr($0,RSTART,RLENGTH)}' inputfile and about 1 time in 10 I&#8217;m startled to remember grep makes this very easy&#8230; grep -o regexp inputfile From here.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent way too many minutes looking this up over the years.</p>
<p><code>awk 'match($0,/regexp/) {print substr($0,RSTART,RLENGTH)}' inputfile</code></p>
<p>and about 1 time in 10 I&#8217;m startled to remember grep makes this very easy&#8230;</p>
<p><code>grep -o regexp inputfile</code></p>
<p><a href="http://www.tek-tips.com/viewthread.cfm?qid=1459823&#038;page=7">From here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HATEOAS with visuals</title>
		<link>http://daemianmack.com/?p=134</link>
		<comments>http://daemianmack.com/?p=134#comments</comments>
		<pubDate>Sat, 16 Jul 2011 01:02:27 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=134</guid>
		<description><![CDATA[This is the most satisfyingly visual explanation of HATEOAS I&#8217;ve seen. Here&#8217;s what I came to understand. Every communication protocol has a state machine. For some protocols they are very simple, for others they are more complex. When you implement a protocol via RPC, you build methods that modify the state of the communication. That [...]]]></description>
			<content:encoded><![CDATA[<p>This is the most satisfyingly visual explanation of HATEOAS I&#8217;ve seen.</p>
<blockquote><p><a href="http://www.pluralsight-training.net/community/blogs/tewald/archive/2007/04/26/46984.aspx">Here&#8217;s what I came to understand.</a> Every communication protocol has a state machine. For some protocols they are very simple, for others they are more complex. When you implement a protocol via RPC, you build methods that modify the state of the communication. That state is maintained as a black box at the endpoint. Because the protocol state is hidden, it is easy to get things wrong. For instance, you might call Process before calling Init. People have been looking for ways to avoid these problems by annotating interface type information for a long time, but I&#8217;m not aware of any mainstream solutions. The fact that the state of the protocol is encapsulated behind method invocations that modify that state in non-obvious ways also makes versioning interesting.</p>
<p>The essence of REST is to make the states of the protocol explicit and addressible by URIs. The current state of the protocol state machine is represented by the URI you just operated on and the state representation you retrieved. You change state by operating on the URI of the state you&#8217;re moving to, making that your new state. A state&#8217;s representation includes the links (arcs in the graph) to the other states that you can move to from the current state. This is exactly how browser based apps work, and there is no reason that your app&#8217;s protocol can&#8217;t work that way too.</p></blockquote>
<p>Also, Martin Fowler&#8217;s article <a href="http://martinfowler.com/articles/richardsonMaturityModel.html">Richardson Maturity Model: steps toward the glory of REST</a> is excellent. Richardson&#8217;s book, <a href="http://www.amazon.com/Restful-Web-Services-Leonard-Richardson/dp/0596529260">Restful Web Services</a>, doesn&#8217;t mention his own maturity model or HATEOAS itself &#8212; it gives the most passing of references to Link tags or headers, for example. Good book, though.</p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=134</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Camphone thread engine</title>
		<link>http://daemianmack.com/?p=86</link>
		<comments>http://daemianmack.com/?p=86#comments</comments>
		<pubDate>Wed, 23 Jun 2010 00:16:13 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=86</guid>
		<description><![CDATA[A couple years ago, I built a small Ruby script to let users send pictures from their phones to a webforum. This was an idea I&#8217;d been kicking around for a while since the early mobile photo-sharing sites sprang up, and when I stumbled across the MMS2R gem, I figured it was time. It quickly [...]]]></description>
			<content:encoded><![CDATA[<p>A couple years ago, I built a small Ruby script to let users send pictures from their phones to a webforum. This was an idea I&#8217;d been kicking around for a while since the early mobile photo-sharing sites sprang up, and when I stumbled across the MMS2R gem, I figured it was time. It quickly became one of the more popular features of the forum; it&#8217;s neat to be able to chime in from where-ever you are with a quick snapshot of what you&#8217;re seeing or doing.                    </p>
<p>The other night, I needed to dig back into that script and found my brain itching from the way the script had organically grown a bit sideways over time, so I decided to refactor it and <a href="http://github.com/daemianmack/camphone-thread-engine">toss it up on Github</a> in case it&#8217;s helpful as a starting point for anyone who wants to do something similar.</p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=86</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>magit Cheatsheet</title>
		<link>http://daemianmack.com/?p=84</link>
		<comments>http://daemianmack.com/?p=84#comments</comments>
		<pubDate>Thu, 24 Sep 2009 15:11:24 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=84</guid>
		<description><![CDATA[magit is an emacs mode for git, and is crazy awesome. I&#8217;ve distilled the Magit User Manual into a command-centric cheatsheet for my own purposes and offer it here in case you find it helpful&#8230; Magit Cheatsheet Also including the upstream org-mode file in case you feel like wrestling with org-mode&#8217;s org-export-as-html and its weird [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://zagadka.vm.bytemark.co.uk/magit/">magit</a> is an emacs mode for git, and is crazy awesome. I&#8217;ve distilled the <a href="http://zagadka.vm.bytemark.co.uk/magit/magit.html">Magit User Manual</a> into a command-centric cheatsheet for my own purposes and offer it here in case you find it helpful&#8230;</p>
<p><a href="http://daemianmack.com/magit-cheatsheet.html">Magit Cheatsheet</a></p>
<p>Also including <a href="http://daemianmack.com/magit-cheatsheet.org.txt">the upstream org-mode file</a> in case you feel like wrestling with org-mode&#8217;s org-export-as-html and its weird set of quasi-controls.</p>
<p>In order to get org-mode to export that nicely, I had to add two user variables to my .emacs, along with a macro I used to quick-replace the TD elements with the classes they need. <a href="http://daemianmack.com/magit-cheatsheet.el.txt">Here&#8217;s the snippet</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=84</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some performance monitoring stuff that&#8217;s been on my radar lately</title>
		<link>http://daemianmack.com/?p=81</link>
		<comments>http://daemianmack.com/?p=81#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:11:31 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=81</guid>
		<description><![CDATA[Monitoring server load on Linux I&#8217;m all about top and mytop, but there&#8217;s at least one surprise in here for me &#8212; namely, /usr/bin/tload. Measuring &#038; Optimizing I/O Performance using iostat&#8230; If IO performance is suspect, iostat is your best friend. Having said that, the man pages are cryptic so don&#8217;t be surprised if you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.xaprb.com/blog/2006/06/08/how-to-monitor-server-load-on-gnulinux/">Monitoring server load on Linux</a></p>
<p>I&#8217;m all about top and mytop, but there&#8217;s at least one surprise in here for me &#8212; namely, /usr/bin/tload.</p>
<p><img src="http://www.xaprb.com/articles/images/tload.png" alt="" /></p>
<p><a href="http://www.igvita.com/2009/06/23/measuring-optimizing-io-performance/">Measuring &#038; Optimizing I/O Performance</a> using iostat&#8230;</p>
<blockquote><p>If IO performance is suspect, iostat is your best friend. Having said that, the man pages are cryptic so don&#8217;t be surprised if you find yourself reading the source. To get started, identify the device in question and start a monitoring process&#8230;</p></blockquote>
<p>which contains a note on <a href="http://www.facebook.com/note.php?note_id=76191543919">how Facebook stores 360 photo uploads <I>every second</i></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>astalavista.com compromised</title>
		<link>http://daemianmack.com/?p=82</link>
		<comments>http://daemianmack.com/?p=82#comments</comments>
		<pubDate>Fri, 05 Jun 2009 12:41:29 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=82</guid>
		<description><![CDATA[Anybody who&#8217;s had an interest in security over the last 10 years has probably heard of astalavista.net &#8212; kind of a clearinghouse for all sorts of security-related info, vulnerability announcements, etc. Here&#8217;s a blow-by-blow transcript of their systems getting completely wiped out by someone who didn&#8217;t agree with their practices. The transcript is hosted on [...]]]></description>
			<content:encoded><![CDATA[<p>Anybody who&#8217;s had an interest in security over the last 10 years has probably heard of astalavista.net &#8212; kind of a clearinghouse for all sorts of security-related info, vulnerability announcements, etc.</p>
<p>Here&#8217;s a <a href="http://pastebin.com/f751e9f5b">blow-by-blow transcript</a> of their systems getting completely wiped out by someone who didn&#8217;t agree with their practices. The transcript is hosted on pastebin.com but was originally available as the index.html of the site itself.</p>
<p>It looks like they used custom code to exploit a hole in astalavista&#8217;s Litespeed webserver; googling the exploit used just brings up copies of the transcript itself.</p>
<p>This is probably the most brutal exploit transcript I&#8217;ve ever seen &#8212; reference line 1839 where the exploiter, having found where the backups are being stored by trawling the admin&#8217;s .bash_history, FTPs there and deletes their offsite backups. (If your production system stores the FTP password or password-less SSH keys to your offsite backup server, exposed through your .bash_history no less, is it really offsite?)</p>
<p><a href="http://astalavista.com/">astalavista</a> is still down at the moment; I imagine they&#8217;ve scrambled to change all their passwords, shore up their exposure, and see if they can dig up a backup from anywhere.</p>
<p>It makes a pretty remarkable contrast with this recent <a href="http://news.ycombinator.com/item?id=639976">How I Hacked Hacker News (with arc security advisory)</a> accounting by someone who compromised Paul Graham&#8217;s news.ycombinator.com via some pretty painstaking research of system behavior &#8212; and then worked with Robert T. Morris (<i>the</i> Robert T. Morris) to get the issue fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=82</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Rack Middleware for API Throttling</title>
		<link>http://daemianmack.com/?p=47</link>
		<comments>http://daemianmack.com/?p=47#comments</comments>
		<pubDate>Fri, 15 May 2009 20:05:03 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=47</guid>
		<description><![CDATA[I will show you a technique to impose a rate limit (aka API Throttling) on a Ruby Web Service. I will be using Rack middleware so you can use this no matter what Ruby Web Framework you are using, as long as it is Rack-compliant. Awesome. I can think of so many uses for this [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>I will show you a technique to <a href="http://blog.messagepub.com/2009/05/05/how-to-rack-middleware-for-api-throttling/">impose a rate limit (aka API Throttling) on a Ruby Web Service</a>. I will be using Rack middleware so you can use this no matter what Ruby Web Framework you are using, as long as it is Rack-compliant.</p></blockquote>
<p>Awesome. I can think of so many uses for this basic pattern to replace stuff I usually have to do at the app level (slow) or at the Apache level (difficult to port, prone to decay).</p>
<p>Comments note that Memcache might be a better pick than Redis, which works even better with the setup I have in mind, though Redis sounded fun too.</p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=47</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Totally Unmathematical Chili</title>
		<link>http://daemianmack.com/?p=46</link>
		<comments>http://daemianmack.com/?p=46#comments</comments>
		<pubDate>Wed, 29 Apr 2009 02:13:27 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[bio-engineering]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=46</guid>
		<description><![CDATA[Here&#8217;s the basic skeleton of the recipe I use for chili. I started a few years ago with something called &#8220;Touchdown Chili&#8221; that a co-worker printed out of an online magazine, and over the years I&#8217;ve tweaked it relentlessly. I still have the original print-out that I pull out and use as a rough guide, [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the basic skeleton of the recipe I use for chili. I started a few years ago with something called &#8220;Touchdown Chili&#8221; that a co-worker printed out of an online magazine, and over the years I&#8217;ve tweaked it relentlessly. I still have the original print-out that I pull out and use as a rough guide, even though my version has changed so much the printout is basically a series of phase cues &#8212; i.e., &#8220;time for spices&#8221;, &#8220;ok, do the meat&#8221;, &#8220;now you should be about finished adding things&#8221;, etc.</p>
<p>Part of the joy of this aboriginal approach is that it&#8217;s different every time.</p>
<p><em>A note on the &#8220;<em>Do beans belong in chili?</em>&#8221; holy war: Personally, I have no particular use for pulses, though sometimes I&#8217;ll make a sidecar batch for my fiancee (who is vegetarian) that includes a robust mix of black beans, white beans and kidney beans. She likes it. I make no specific recommendation in this regard and consider this momentous personal decision best resolved via quiet introspection and discreet consultation of sympathetic clergy members or other local community leaders.</em></p>
<p><span id="more-46"></span></p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1453yzh.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1453yzhth.jpg"></a></p>
<p><strong>Things pictured here:</strong><br />
2 good 12oz beers (extra shown &#8212; I was making a second concurrent batch for a buddy)<br />
Several jars of Goya jalapenos<br />
2 cans of Goya Chipotles<br />
Garlic<br />
Onions<br />
Habaneros<br />
Kielbasa<br />
Stewed tomatoes<br />
Beef broth<br />
Chiles<br />
Paprika<br />
Chili powder<br />
Oregano<br />
Ground cumin<br />
Salt<br />
Pepper</p>
<p><strong>Things not pictured here:</strong><br />
Cooking sherry<br />
Brown sugar<br />
Large crockpot</p>
<p>Turn the crockpot on warm and add a couple shots of <strong>cooking sherry</strong>. Add one of the <strong>beers</strong> (I like to use <a href="http://middleagesbrewing.com/content/view/61/">Middle Ages&#8217; ImPaled Ale</a>). </p>
<p>Toss in a round of the <strong>spices</strong>. Kind of go crazy, especially with the chili powder.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1456bsf.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1456bsfth.jpg"></a></p>
<p>Then, brown the <strong>meat</strong>. Nothing special here. This was about 2.5-3 lbs of stewmeat.</p>
<p>One item of note: I read on some chili recipe thread somewhere that the top 10 finalists of some national chili cook-off contest had only the following thing in common: none of them added anything to the meat during this phase. Do with that intel what you will.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1457qgq.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1457qgqth.jpg"></a></p>
<p>Next, ya cuts ya <strong>onions</strong>. This is how that&#8217;ll look. If you&#8217;re like me looking at this picture, you&#8217;re wondering how it is I&#8217;ve chopped the onions but there&#8217;s still a whole one left, conspicuously just within frame. You ask yourself: is it possible this scene has been glitzed up to look more wholesome and productive than it actually probably is? Am I being sold a bill of goods here? Will that poor onion ever get a chance to shine? If that&#8217;s what you&#8217;re asking yourself, time to wake up. Scientists have long known that onions have only a crude approximation of grief and nothing like what we consider loneliness &#8212; e.g., they totally lack a pack instinct.</p>
<p>Incidentally, it always kinda cracks me up how you actually cry when you cut onions. I know it&#8217;s scientifically normal, but for some reason I put it in the same class of events as slipping on a banana peel and then shooting down a flight of stairs. Maybe I watched the wrong cartoons as a kid.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1458sjw.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1458sjwth.jpg"></a></p>
<p>Here&#8217;s the <strong>kielbasa</strong> all ready to go.</p>
<p>An etymological note. If you look up <a href="http://en.wikipedia.org/wiki/Kielbasa">the word kielbasa</a>, you&#8217;ll find that some people pronounce it differently. Wikipedia considers &#8220;kielbasa&#8221; from the Polish point of view, which, totally. It mentions that NY residents pronounce it &#8220;kielbasi&#8221;, which sounds demented to me but I guess that could pass for local color. I had originally read pronouncing it that way was Lithuanian (yes, I&#8217;ve looked this up multiple times for some reason), but the wiki article now has that pronunciation as Czech. In any case, I move we deprecate any silly i-at-the-end business; kielbasa has a long and hallowed tradition of being delicious and probably doesn&#8217;t appreciate anybody getting cute with it.</p>
<p>If you worry about your arteries, get the low-fat turkey-based stuff. On the other hand, I once found something at Wegman&#8217;s called &#8216;Holiday Kielbasa&#8217;, and <em>oh man</em>.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1459kgc.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1459kgcth.jpg"></a></p>
<p>Dice the kielbasa. Well, maybe not dice. Make disks, then cut each disk in 2 or 3 pieces. Think of the kielbasa as the main attraction. Thanks to its spongy nature, it won&#8217;t break down much so it&#8217;ll be the most recognizable part after many hours in the crockpot. Produce shapes you&#8217;ll be happy eating. Somewhere between &#8220;don&#8217;t really need to chew&#8221; and &#8220;can&#8217;t get it in my mouth&#8221;.</p>
<p>Interesting technical note: in the &#8220;Who Framed Roger Rabbit?&#8221; world of Toonville, all dachshund characters were made of kielbasa, or so I like to think.</p>
<p>Then I like to bake that for 10-15 minutes until it&#8217;s somewhat cooked but well short of being actually crispy. Black crispy kielbasa will basically ruin your chili experience. I did it last time.</p>
<p>A note that I&#8217;m sure hints at past abuses: see the silver stuff peeking through the kielbasa smithereens? There is basically no reason ever to put a pan in the oven with food on it and the food not sitting on tin foil, and here&#8217;s why. You, or whoever has the strongest sword-arm in the village (probably you), is going to have to scrub off whatever is on that pan when it comes out of the oven. It takes two seconds to put tin foil on and is the gift you give your future self by planning ahead. As you can plainly see, I&#8217;ve used tinfoil here &#8212; of course, because I&#8217;m the kind of gangster who don&#8217;t stop thinking about tomorrow.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1460f1d.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1460f1dth.jpg"></a></p>
<p>Now, while that&#8217;s baking, you can start your <strong>onions</strong>. Or maybe I just got the pictures out of order here; not sure. In any case, caramelize your onions. This takes like 20 or 30 minutes, even though multiple people I&#8217;ve spoken to claim it takes 5. I always quietly wonder if I&#8217;m doing it wrong. (Please consider this your reply homework.)</p>
<p>When you take the <strong>stewmeat</strong> out of what I hope is a nice cast iron pan, don&#8217;t go rushing off to put it in the crockpot. Put it in a tupperware thing and stash it in the fridge until later. Why? Because you&#8217;re going to cook all this stuff for several to many hours, during which time your stewmeat will fall all the hell apart and sublimate into a gross mealy matter. One day, randomly checking out recipes, I accidentally stumbled onto what braising is, and why you don&#8217;t want to braise the living hell out of your stewmeat &#8212; and realized that&#8217;s what had been going wrong with my stewmeat. Braising is cooking meat in liquid, and it breaks down the connective tissues, which is great for a bit, to make meat tender, and then sucks, as it eventually pulverizes your meat into a grody nothingness. If you get the feeling I&#8217;m typing this not so much to educate you as to exercise my self-pleasedness at mastering this hard-won intel, then&#8230; well-spotted.</p>
<p>When the kielbasa is done, put it in the crockpot, with another round of the <strong>spices</strong>. Phase 1 is complete: we have a boring but technically edible collection of objects getting warm in the crockpot.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1462i7q.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1462i7qth.jpg"></a></p>
<p>Chop hell out of the <strong>garlic</strong>. You want as much surface area as possible. I hate peeling garlic, and I&#8217;ve tried every device and method known to man, and I can&#8217;t do any better than crushing it beneath the flat of the chef&#8217;s knife and then cutting off the little foot. I loathe doing it, which is why you see that shameful &#8220;someone with more patience than me chopped this garlic and put it in a jar and I bought it&#8221;  jar up there. Can&#8217;t skimp on the garlic but you also don&#8217;t want to be in the situation where you&#8217;d rather bite your own face off than make some delicious chili, so&#8230;</p>
<p>When the garlic is as tiny as it&#8217;ll get, you may want to toss it in with the onions for a bit. I&#8217;m not sure how much effect this really has on the end product, but it&#8217;s fun and feels like a sophisticated thing to do.</p>
<p>Once <strong>onions</strong> are limp and translucent, dump them and all <strong>garlic</strong>, crypto-sauteed or otherwise, into the crockpot.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1463ewh.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1463ewhth.jpg"></a></p>
<p>Let&#8217;s have a look at how it&#8217;s doing. This is a pretty boring picture. Luckily, this next part is technically dangerous, especially if you have eyeballs.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1464yi0.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1464yi0th.jpg"></a></p>
<p>The <strong>habaneros</strong>. These are the chief force multiplier in the battle against your own face, with garlic running a respectably distant second. Here, I&#8217;ve used six. I think my crockpot is a 6-quart &#8212; my mom gave it to me long ago and I&#8217;ve casually looked around for a high-tech model but I&#8217;ve never found one as big &#8212; so maybe one habanero per quart is a decent yardstick if you like hot foods. Ratchet up/down as warranted.</p>
<p>Be warned that habaneros are intensely hot, though. Every so often, I make the chili too hot to eat at normal speed, and I resolve at those times to make it less hot next time, but then the next time I fear, Nikola-Tesla-there-are-feathers-on-my-back-style, that I&#8217;ve gotten a fluke batch of weak habaneros (This happened once: I could literally eat the habanero like a bellpepper. It was like I was walking on the moon.) and my chili will be pointless and sad, so it has become the art of <em>almost</em> ruining my own day while just barely not, every time.</p>
<p>In any event, they&#8217;re hot enough that you&#8217;ll want to wear <strong>gloves</strong> cutting them, no joke.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1465one.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1465oneth.jpg"></a></p>
<p>In the sink, rip &#8212; wait</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1466wpy.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1466wpyth.jpg"></a></p>
<p>Seriously, put on some <strong>gloves</strong>. Wash your gloved hands in between working with the habaneros and touching anything else. Scoville units are fun and delicious but you want to be careful choosing when and how your body ingests them. All it takes is one errant swipe to your eye and *BAM*, you&#8217;re busy yelling and/or lavaging for at least the next 10 minutes, when you could be producing delicious chili.</p>
<p>Keep the gloves on during clean-up too. There is only winner in <em>Habaneros vs Your Mucous Membranes</em>, and it&#8217;s not the local favorite.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1465one.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1465oneth.jpg"></a></p>
<p>In the sink, rip off the black stem of each pepper (technically, I believe these are termed &#8216;fruits&#8217;), then split the body down the middle and get the webbing and the seeds out. You may want to do this under running water. Then again, it may be that the concussive force of the water is what&#8217;s driving all that capsaicin into the air and directly into your unwitting lungs, making you cough like ridiculous. Player&#8217;s choice, really.</p>
<p>In any case, <em>definitely</em> get all the <strong>seeds</strong> out. You do <em>not</em> want to be passing these on down the gastro-intestinal line. Another gift you set aside for your future self to enjoy. I&#8217;m reminded of the quote about how the stock market can stay irrational a lot longer than you can stay solvent. In quantity, those seeds will outlast your very best attempts to break them down, and a grim shadow will darken thy threshold, and a doom will be visited upon thee, and there will be much beating of breasts and gnashing of teeth and weeping in the streets that day.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1468lfz.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1468lfzth.jpg"></a></p>
<p>Dice like mad. Again, surface area.</p>
<p>Here, we&#8217;re at phase 2. When you dump the habaneros into the crockpot, only then is the battle well and truly joined. Turn the heat up to high. Put on some C&#038;C Music Factory if you like. Life is a party.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1469m8q.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1469m8qth.jpg"></a></p>
<p>Do the same rip/gut deal with the <strong>goyas</strong>. </p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1470osg.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1470osgth.jpg"></a></p>
<p>And dice. Do you like the way I keep the chef&#8217;s knife in the shots, as a consistent yardstick to aid your perspective? It&#8217;s a thoughtful and classy touch.</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1471bnt.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1471bntth.jpg"></a></p>
<p>Goyas, incidentally, kind of revolutionized the way I ate for several years. Here&#8217;s the jar; if you haven&#8217;t had the pleasure, run don&#8217;t walk.</p>
<p>So add the goyas, which, yes, are technically &#8216;Goya Jalapenos&#8217;, but that&#8217;s just not the way it&#8217;s worked out so far.</p>
<p>Toss in the can of <strong>green chiles</strong>, which, to be honest, I&#8217;m not sure what effect those can really have, if any, versus the dominating flavors of everything else. I add them out of a sense of tradition.</p>
<p>Toss in two cans of <strong>chipotles</strong>, pictured here for your convenience (note that, despite everything you&#8217;ve ever heard in pop culture, the T comes <em>before</em> the L. I predict that in 40 years the average English-speaker&#8217;s discomfort with this pair of consonants pronounced in that order will have smoothed that rough edge over and it really <em>will</em> be pronounced &#8220;chipo<strong>lt</strong>e&#8221;)&#8230;</p>
<p><img src="http://daemianmack.com/wp-content/uploads/2009/05/513mbx2qm0ldul.jpg"></p>
<p>Also toss in the two cans of <strong>stewed tomatoes</strong>. I drain them first. One of the complex subplots of this hectic affair is monitoring your liquid levels. You don&#8217;t want this all to be too liquidy. I press the water (or whatever it is) out of the onions before I toss those in, too.</p>
<p>Do another round of <strong>spices</strong>. Do a bunch of <strong>salt</strong>.</p>
<p>At this point, I&#8217;ll bust out the <strong>beef broth</strong>. I&#8217;ve tried a couple different things, including a turkey stock my fiancee made for me last Thanksgiving (finding, sadly, that turkey is too mild a flavor to defeat the various tastes currently in your crockpot), and I think I&#8217;ve settled on &#8220;Better than Bouillon&#8221; Beef Base, which is actually a vegemite-like mealy black paste, which is definitely a phrase that doesn&#8217;t go out of its way to reward contemplation. If you can, avoid mixing it into water, because what does water do for you here? Instead, I like to take the juice from the two goya jars (maybe one if I&#8217;ve got too much liquid on board already), nuke it for a minute or so, and then mix in a giant teaspoon or two of the beef broth. Toss it into your chili. I like to do A/B tests, i.e. set aside a bit of the chili liquid, add the broth to the main batch, and then compare flavors. The beef broth is crucial.</p>
<p>Lastly, I&#8217;ll add a couple large chunks of <strong>brown sugar</strong>. Sounds wierd, but try it. Once you&#8217;re able to pick it out amongst the other flavors, you&#8217;ll do backflips. Subtle, smoky-sweet ones though.</p>
<p>Put the lid on that concoction and walk away for as long as you can bear. I know I&#8217;ve made a really decent batch when it&#8217;s substantially gone by the time it&#8217;s done.</p>
<p>Several hours before dinner, toss in the browned <strong>stewmeat</strong> and let it cook on low. Check back every hour or so. You want the stewmeat tender and delicious, not all grainy and gross. (&#8230;which, come to think of it, is a pretty good algorithm for basically everything else, too.)</p>
<p><a href="http://daemianmack.com/wp-content/uploads/2009/05/dscf1472asw.jpg"><img src="http://daemianmack.com/wp-content/uploads/2009/05/dscf1472aswth.jpg"></a></p>
<p>Final lackluster shot of crockpot full of red-brown semi-liquid matter. This is roughly 450 times better-tasting than it looks. Eat with a nice bread (e.g., a good sourdough) and some sharp cheese and a large glass of milk or other coolant of choice. (As part of this routine, I make sure to have a couple gallons of skim milk on hand. There&#8217;s nothing better.)</p>
<p>TODO:</p>
<p>- Experiment with adding corn. (I usually plan to do this &#8220;next time&#8221; but then balk at the last minute. I expect it&#8217;s a pretty substantial departure.)</p>
<p>- Find a way to make cornmeal work more consistently as a thickener. I&#8217;ve stopped using it because between the too-strong cornmeal flavor, the occasional graininess, and the alarming efficiency with which one can seriously mess up a nice pot during preparation, it seems a bit uncalled-for.</p>
<p>A final post-implementation note: I think I&#8217;m skipping the stewmeat from here on out. The process is kind of annoying, it sucks up all the heat, and the return on investment is sub-optimal.</p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=46</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making emacs&#8217; word navigation respect underscores everywhere</title>
		<link>http://daemianmack.com/?p=45</link>
		<comments>http://daemianmack.com/?p=45#comments</comments>
		<pubDate>Tue, 28 Apr 2009 18:58:23 +0000</pubDate>
		<dc:creator>daemianmack</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://daemianmack.com/?p=45</guid>
		<description><![CDATA[I&#8217;ve been playing with emacs lately, using technomancy&#8217;s emacs starter kit. It&#8217;s awesome so far, but some piece of the (rather large) config fileset is clobbering what I&#8217;d consider normal navigation behavior. I work with a ton of stuff that uses underscores, especially SQL, and it&#8217;s been driving me crazy that, on its own, my [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with emacs lately, using technomancy&#8217;s <a href="http://github.com/technomancy/emacs-starter-kit/tree/master">emacs starter kit</a>. It&#8217;s awesome so far, but some piece of the (rather large) config fileset is clobbering what I&#8217;d consider normal navigation behavior. </p>
<p>I work with a ton of stuff that uses underscores, especially SQL, and it&#8217;s been driving me crazy that, on its own, my emacs config</a> doesn&#8217;t consider the underscore punctuation in all modes, so hitting M-DEL (Alt+Backspace) to delete back one word in sqlplus mode deletes the whole string &#8212; underscores and all.</p>
<p>That is, if <code><b>|</b></code> is our cursor, and we&#8217;re inside emacs at a <a href="http://www.emacswiki.org/emacs/SqlPlus">sqlplus</a> prompt like so&#8230;</p>
<p><code>desc prod.some_long_table_name<b>|</b></code></p>
<p>hitting Alt+Backspace once gets you&#8230;</p>
<p><code>desc prod.<b>|</b></code></p>
<p>which is annoying, especially because emacs&#8217; autocomplete is so awesomely useful in sqlplus mode. I&#8217;d guess most database schemas have lots of tablenames that share prefixes (e.g., user_history, user_bookmarks, user_buddies, etc), which renders that autocomplete somewhat less than effective.</p>
<p>I&#8217;d much rather have it so that the cursor stopped at underscores. On successive keypresses, you&#8217;d zap back another segment, stopping at the underscore, like so&#8230;</p>
<p><code>desc prod.some_long_table_name<b>|</b></code><br />
<code>desc prod.some_long_table_<b>|</b></code><br />
<code>desc prod.some_long_<b>|</b></code><br />
<code>desc prod.some_<b>|</b></code><br />
<code>desc prod.<b>|</b></code></p>
<p>This is already the long-established behavior of interfaces that <I>inherit from emacs</i>, like BASH&#8217;s emacs mode, and irssi, but is evidently a legacy design decision within Emacs without an obvious config handle, nearly undiscussed as far as I could google&#8230;</p>
<blockquote><p><a href="http://www.nabble.com/underscore-syntax-td20743591.html#a20750337">From a comment in python-mode.el:</a></p>
<p>  ;; For historical reasons, underscore is word class instead of<br />
  ;; symbol class.  GNU conventions say it should be symbol class, but<br />
  ;; there&#8217;s a natural conflict between what major mode authors want<br />
  ;; and what users expect from `forward-word&#8217; and `backward-word&#8217;.<br />
  ;; Guido and I have hashed this out and have decided to keep<br />
  ;; underscore in word class.  If you&#8217;re tempted to change it, try<br />
  ;; binding M-f and M-b to py-forward-into-nomenclature and<br />
  ;; py-backward-into-nomenclature instead.  This doesn&#8217;t help in all<br />
  ;; situations where you&#8217;d want the different behavior<br />
  ;; (e.g. backward-kill-word). </p></blockquote>
<p>Luckily, <a href="http://www.slac.stanford.edu/comp/unix/gnu-info/elisp_32.html#SEC463">TFM</a> is rather nice. </p>
<p>The short answer is: one needs to specify the underscore character as a member of emacs&#8217; punctuation class&#8230;</p>
<p><code>(modify-syntax-entry ?_ "_")</code></p>
<p>That will only work for text-mode, and gets overwritten on a major-mode switch by any new syntax table specified, so the following hook reference is necessary for this change to be global for all major modes&#8230;</p>
<p><code>(defun change-major-mode-hook ()<br />
  (modify-syntax-entry ?_ "_"))</code></p>
<p>Folks who aren&#8217;t emacs newbs might be aware of further subtleties, but this seems to produce exactly what I want &#8212; autocomplete and word navigation in every mode that&#8217;s identical to the other command-line interfaces I use.</p>
]]></content:encoded>
			<wfw:commentRss>http://daemianmack.com/?feed=rss2&amp;p=45</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
