<?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>matthewwhitworth.com</title>
	<atom:link href="http://matthewwhitworth.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://matthewwhitworth.com</link>
	<description>The Personal Homepage of Matthew Whitworth (duh!)</description>
	<lastBuildDate>Tue, 19 Mar 2013 01:32:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Dad Band II</title>
		<link>http://matthewwhitworth.com/2013/03/18/dad-band-ii/</link>
		<comments>http://matthewwhitworth.com/2013/03/18/dad-band-ii/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 16:44:33 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/?p=61</guid>
		<description><![CDATA[I got to strap on the telecaster (and haul out the pedalboard) for the annual Keneseth Israel Preschool fundraiser party last weekend.  This year&#8217;s theme was &#8220;Sock Hop&#8221;, so the Dad Band put together a set of 14 rock&#8217;n'roll oldies.  My personal highlights were playing the harmonica on &#8220;Not Fade Away&#8221;, singing lead on &#8220;La [...]]]></description>
			<content:encoded><![CDATA[<p>I got to strap on the telecaster (and haul out the pedalboard) for the annual Keneseth Israel Preschool fundraiser party last weekend.  This year&#8217;s theme was &#8220;Sock Hop&#8221;, so the Dad Band put together a set of 14 rock&#8217;n'roll oldies.  My personal highlights were playing the harmonica on &#8220;Not Fade Away&#8221;, singing lead on &#8220;La Bamba&#8221;, and faking my way through the guitar solos on &#8220;Slow Down&#8221; and &#8220;Rock Around the Clock&#8221;.  As usual, I had a fantastic time rocking with the Dads.</p>
<div id="attachment_62" class="wp-caption alignnone" style="width: 490px"><a href="http://matthewwhitworth.com/wordpress/wp-content/uploads/2013/03/KIP-Sock-Hop.jpg"><img class=" wp-image-62 " title="KIP Sock Hop Band" src="http://matthewwhitworth.com/wordpress/wp-content/uploads/2013/03/KIP-Sock-Hop.jpg" alt="KIP Sock Hop Band" width="480" height="360" /></a><p class="wp-caption-text">Whole Lotta Shakin&#8217; Goin&#8217; On</p></div>
<p>Everything went great until I went to take a solo on &#8220;Johnny B. Goode&#8221;, stomped on my boost pedal, dug in and heard&#8230;nothing.  My first assumption was that the booster had stopped working, so I clicked it off, but still nothing.  I turned around to check the amp (a rental Blues Jr.) and the lamp was flickering wildly on and off.  Imagining a grounding fault or a short, I started to panic &#8212; I don&#8217;t want to die playing a Blues Jr.!   I switched it off and back on again.  Still nothing.  Luckily there were three other guitarists picking up the slack, so I just killed the amp, mimed along and tried to look cool for the remainder of the tune.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2013/03/18/dad-band-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Think I Smell a RAT&#8230;</title>
		<link>http://matthewwhitworth.com/2011/07/23/i-think-i-smell-a-rat/</link>
		<comments>http://matthewwhitworth.com/2011/07/23/i-think-i-smell-a-rat/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 21:27:13 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[guitar]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/?p=48</guid>
		<description><![CDATA[I stumbled across the schematic for Dead Easy Dirt the other day and (a.) it looked like something fun and easy to breadboard, and (b.) it got me thinking about diode clipping.  I cranked out and tested the original schematic last night &#8212; basically just an op-amp set for maximum gain straight into symmetrical diode [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled across the schematic for <a href="http://www.forrestwhitesides.com/node/93">Dead Easy Dirt</a> the other day and (a.) it looked like something fun and easy to breadboard, and (b.) it got me thinking about <a href="http://www.instructables.com/id/Add-Diode-Clipping-Distortion-to-your-Guitar-Amp/step2/Types-of-diode-clipping/">diode clipping</a>.  I cranked out and tested the original schematic last night &#8212; basically just an op-amp set for maximum gain straight into symmetrical diode clipping.  It was god-awful, but pretty much what I expected.  The more I monkeyed around with it, the more I caught myself wondering if this was related to the old ProCo <a href="http://ratdistortion.com/">RAT</a> <a href="http://diystompboxes.com/pedals/PCRAT1.GIF">circuit</a>.  Sure enough, it&#8217;s almost exactly the heart of a RAT using a different op-amp and minus any tone shaping or buffers.*  Cool.</p>
<p>I played around with several diode variations, but ripping them out of and stuffing them back into the breadboard was getting tiresome.  The solution: Simon and I ran to Radio Shack after our coffee date this morning and picked up an eight-position dipswitch.  I spent about a half hour this afternoon reworking the board with the switches, and now I&#8217;ve got 16 varieties of diode clipping goodness on tap.</p>
<p><a href="http://matthewwhitworth.com/fxbox2011/diode_clipping1.jpg"><img class="alignnone" title="16 varieties of diode clipping goodness" src="http://matthewwhitworth.com/fxbox2011/diode_clipping1.jpg" alt="" width="483" height="362" /></a></p>
<p>Switch Positions:</p>
<ol>
<li>1N4001, anode to ground (because I have a million 1N4001&#8242;s lying around)</li>
<li>Red LED, anode to ground (lights up more the harder you drive it &#8212; fun!)</li>
<li>Nothing (for single-sided assymetrical clipping, kinda redundant)</li>
<li>1N914, anode to ground (the original RAT diode)</li>
<li>1N4001, cathode to ground</li>
<li>Red LED, cathode to ground</li>
<li>Two 1N914&#8242;s in series, cathode to ground (for double-sided assymetrical clipping)</li>
<li>1N914, cathode to ground</li>
</ol>
<p>Select one switch from switches 1-4 and another from 5-8 and you&#8217;re in trashy distortion heaven!</p>
<p>&#8212;&#8211;</p>
<p>* Also seen in the MXR Distortion+, and I&#8217;m sure several other distortion pedals.  So-called overdrive pedals frequently use diode clipping, too, but tend to put it in a less intrusive portion of the signal-shaping circuit.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2011/07/23/i-think-i-smell-a-rat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Guitar Effects Test Box</title>
		<link>http://matthewwhitworth.com/2011/07/19/my-guitar-effects-test-box/</link>
		<comments>http://matthewwhitworth.com/2011/07/19/my-guitar-effects-test-box/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 19:16:38 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[guitar]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/?p=33</guid>
		<description><![CDATA[Inspired by the Beavis Board and other similar designs, I finally got around to building my own effects circuit test box. +9VDC in from an adapter goes to a MadBean Road Rage board, which uses a TC1044 and a voltage regulator to provide 9V, 12V, ~18V and -9V &#8212; the leftmost knob is a rotary [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by the <a href="http://www.beavisaudio.com/bboard/">Beavis Board</a> and other similar designs, I finally got around to building my own effects circuit test box.</p>
<p><a href="http://matthewwhitworth.com/fxbox2011/TestBox1.jpg"><img class="alignnone" title="Guitar Effects Test Box" src="http://matthewwhitworth.com/fxbox2011/TestBox1.jpg" alt="" width="483" height="362" /></a></p>
<p>+9VDC in from an adapter goes to a <a href="http://www.madbeanpedals.com/">MadBean</a> <a href="http://www.madbeanpedals.com/projects/RoadRage/docs/RoadRage_ver.3.pdf">Road Rage</a> board, which uses a TC1044 and a voltage regulator to provide 9V, 12V, ~18V and -9V &#8212; the leftmost knob is a rotary switch. Power then goes to a voltage sag knob before it heads to the outside world.</p>
<p><a href="http://matthewwhitworth.com/fxbox2011/TestBox2.jpg"><img class="alignnone" title="Test Box Guts" src="http://matthewwhitworth.com/fxbox2011/TestBox2.jpg" alt="" width="483" height="362" /></a></p>
<p>I used a four-output speaker connection panel from Radio Shack for my connections to the external circuit. From top to bottom it goes: power, ground, circuit input, circuit output. The 1PDT switch is there to select whether circuit output or test probe output goes to the out-to-amplifier jack, but I haven&#8217;t wired in the test probe yet.</p>
<p><a href="http://matthewwhitworth.com/fxbox2011/TestBoxCB.jpg"><img class="alignnone" title="Testing a Confidence Boost" src="http://matthewwhitworth.com/fxbox2011/TestBoxCB.jpg" alt="" width="483" height="362" /></a></p>
<p>To test the test box, I connected an old <a href="http://www.buildyourownclone.com/index1.html">BYOC</a> <a href="http://www.buildyourownclone.com/confidence.html">Confidence Booster</a> board I had lying around. Worked like a charm.</p>
<p>Here I am testing Channel 1 of my MadBean <a href="http://www.madbeanpedals.com/projects/Aristocrat/docs/Aristocrat_ver.4.pdf">Aristocrat</a> board. Sounds great configured for overdrive with a B250K Gain pot. I&#8217;ll try the B100K later today.</p>
<p><a href="http://matthewwhitworth.com/fxbox2011/TestBoxKT.jpg"><img class="alignnone" src="http://matthewwhitworth.com/fxbox2011/TestBoxKT.jpg" alt="" width="483" height="362" /></a></p>
<p>It&#8217;s great to &#8220;rock it before you box it&#8221;. Not only do you make sure the circuit is functional before you spend a lot of time cramming the board into the enclosure and wiring up the jacks and the switches, but you can make subtle tweaks much more easily, too.</p>
<p>Of course if you really wanna tweak an effects circuit before you even heat up your soldering iron, you can breadboard it first. A friend of mine has expressed interest in the Echoplex preamp booster, so I put this together last night. (Notice that I have the voltage selector knob on the left in 18V position.)</p>
<p><a href="http://matthewwhitworth.com/fxbox2011/TestBoxEP.jpg"><img class="alignnone" src="http://matthewwhitworth.com/fxbox2011/TestBoxEP.jpg" alt="" width="483" height="362" /></a></p>
<p>It&#8217;s essentially the schematic for the MadBean <a href="http://www.madbeanpedals.com/projects/FatPants/docs/FatPants_ver.2.pdf">FatPants</a> board, but I replaced all the potentiometers with median-value resistors.</p>
<p>The problem with working on these guitar projects at night is that, unless you live by yourself in an underground bunker, you can never properly test them at serious volume when you&#8217;re finished. I could tell there was a boost, but I couldn&#8217;t tell how much it was fattening up the sound or if I even liked it.</p>
<p><a href="http://matthewwhitworth.com/fxbox2011/TestBoxTC.jpg"><img class="alignnone" src="http://matthewwhitworth.com/fxbox2011/TestBoxTC.jpg" alt="" width="362" height="474" /></a></p>
<p>Sounded great this morning when I finally had a chance to crank up the amp! I&#8217;ll grab some pots and alligator clip leads and head over to my friend&#8217;s place later this week to see if he likes it.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2011/07/19/my-guitar-effects-test-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Celtics Win (Big)!</title>
		<link>http://matthewwhitworth.com/2008/06/17/celtics-win-big/</link>
		<comments>http://matthewwhitworth.com/2008/06/17/celtics-win-big/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 04:53:54 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[basketball]]></category>
		<category><![CDATA[nba]]></category>
		<category><![CDATA[sports]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/?p=24</guid>
		<description><![CDATA[Congratulations to the Boston Celtics (including Louisville native and University of Kentucky alumnus Rajon Rondo with 21 points, 7 rebounds, 8 assists and 6 steals) on their huge win earlier tonight against the L.A. Lakers to clinch the 2008 NBA Finals. They&#8217;ve had a heck of a season and a heck of a playoffs, and [...]]]></description>
			<content:encoded><![CDATA[<p>Congratulations to the Boston Celtics (including Louisville native and University of Kentucky alumnus <a href="http://www.rajonrondo9.com/" target="_self">Rajon Rondo</a> with 21 points, 7 rebounds, 8 assists and 6 steals) on their huge win earlier tonight against the L.A. Lakers to clinch the 2008 NBA Finals.  They&#8217;ve had a heck of a season and a heck of a playoffs, and they finished this series out with a heck of a game, <a href="http://www.nba.com/finals2008/series/index.html" target="_self">blowing out L.A. by a stunning 39 points</a> (131-92).</p>
<p>Now I can finally get some sleep this year.  This Eastern timezone up &#8217;til midnight stuff has been killing me.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2008/06/17/celtics-win-big/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure Apache, Shoot Foot</title>
		<link>http://matthewwhitworth.com/2008/02/15/configure-apache-shoot-foot/</link>
		<comments>http://matthewwhitworth.com/2008/02/15/configure-apache-shoot-foot/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 04:26:08 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/2008/02/15/configure-apache-shoot-foot/</guid>
		<description><![CDATA[Shortly after the big server rebuild a few weeks back I was examining the web server logs and I noticed that several sites were stealing okcomputer.org bandwidth by linking images from the okcomputer.org Photo Gallery directly into their web sites. This is just a tacky thing to do on numerous levels. In the past, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Shortly after the big server rebuild a few weeks back I was examining the web server logs and I noticed that several sites were stealing okcomputer.org bandwidth by linking images from the <a href="http://www.okcomputer.org/gallery/">okcomputer.org Photo Gallery</a> directly into their web sites.  This is just a tacky thing to do on numerous levels.  In the past, I&#8217;ve had people contact me and ask for permission to use an image from the Photo Gallery, and I&#8217;ve always been happy to direct them to the photo&#8217;s owner.  If they are given permission, I expect them to download a copy of image file and serve it directly from their own server.  Otherwise, every hit to www.jack.ass causes a hit on my web server and uses some of my bandwidth.</p>
<p>So while I was rebuilding the web server I implemented a <a href="http://rewrite.drbacchus.com/rewritewiki/ImageTheft">very common Apache mod_rewrite recipe</a> so that these bandwidth thieves would get a very different image than the one they linked to.  I didn&#8217;t do anything gross &#8212; just a small version of the <a href="http://www.okcomputer.org/mgw-ukelele.jpg">pic of me playing the ukulele</a> that I drag out every now and then.  I week later I checked in on one of the bandwidth thieves&#8217; web sites &#8212; a tourism site for some city in the Netherlands &#8212; and there I was wailing away on the uke.  Not only was my recipe working, but this doofus hadn&#8217;t even noticed it yet.</p>
<p>As usual, I (a.) didn&#8217;t think this one through very well, and (b.) forgot I had even done it.  That is until my dad tried to print some Photo Gallery photos through Shutterfly the other night.  Luckily I was watching over his shoulder.  Still, I was stumped for at least 8 seconds when the picture of Simon that my dad had selected showed up as me and my uke on Shutterfly.</p>
<p>Fixed now.  As much fun as implementing this type of recipe always sounds when you read about it, it&#8217;s almost always more trouble than it&#8217;s worth.  Almost.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2008/02/15/configure-apache-shoot-foot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WRT54G vs WRE54G</title>
		<link>http://matthewwhitworth.com/2008/02/14/wrt54g-vs-wre54g/</link>
		<comments>http://matthewwhitworth.com/2008/02/14/wrt54g-vs-wre54g/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 20:38:49 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/2008/02/14/wrt54g-vs-wre54g/</guid>
		<description><![CDATA[Remember a few weeks ago when I was having all the wireless troubles?  The problem seemed to go away for a bit, and then WHAMMO!  It bit me again recently&#8230;again when I was downstairs in the living room. Jessica heard me crying about it and mentioned that she had been having the same problem for [...]]]></description>
			<content:encoded><![CDATA[<p>Remember a few weeks ago when I was having all the <a href="http://matthewwhitworth.com/2008/01/19/network-manager-vs-keyring-manager/">wireless troubles</a>?  The problem seemed to go away for a bit, and then WHAMMO!  It bit me again recently&#8230;again when I was downstairs in the living room.</p>
<p>Jessica heard me crying about it and mentioned that she had been having the <em>same problem</em> for the last few weeks.  What?!  Why hadn&#8217;t she mentioned this?  Dunno, but at least now I could eliminate my own laptop as the problem and concentrate on debugging a general wifi problem in the house.</p>
<p>The problem really only happened at DHCP lease acquisition time.  Once either of us had a lease we could roam all over the house, but successfully acquiring a lease in the first place was really only working upstairs.  Hmmm&#8230;.</p>
<p>Well, apologies to all you potential <em>Encyclopedia Browns</em> out there, but you havn&#8217;t been given all the facts &#8212; because I had forgotten about one very important one: I had installed a Linksys WRE54G Wireless Range Extender for Jessica when she moved her office to the basement about two years ago.  Honestly, I had forgotten all about it.  I mean, I saw it every now and then, but I never bothered to think about what it was doing.  Or what it wasn&#8217;t doing.</p>
<p>One unplugged WRE54G later and Jessica and I are both acquiring DHCP leases all over the house again.  Apparently we were trying to associate with the range extender when our wireless interfaces were reconfiguring, and it must not have been bridging correctly with the router since I installed the new firmware.</p>
<p>I don&#8217;t know if we even need the range extender anymore since now that I&#8217;m running DD-WRT on my WRT54G I&#8217;m transmitting at 84 mW (instead of the default 28).  I&#8217;ll play around with connectivity in the basement this weekend, and if I still need the range extender I&#8217;ll configure <a href="http://www.smallnetbuilder.com/content/view/24297/98/">WDS Bridging</a> between it and the router so that they play together nicely this time.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2008/02/14/wrt54g-vs-wre54g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Escape from mod_rewrite!</title>
		<link>http://matthewwhitworth.com/2008/02/06/escape-from-mod_rewrite/</link>
		<comments>http://matthewwhitworth.com/2008/02/06/escape-from-mod_rewrite/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 06:47:22 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/2008/02/06/escape-from-mod_rewrite/</guid>
		<description><![CDATA[I&#8217;ve spent the last few days investigating Plone as a potential replacement for WordPress for the okcomputer.org web site, but, as is frequently the case when experimenting with new technology around here, I&#8217;ve been beating my head against the wall trying to get my Plone installation to work behind an Apache proxy. I could successfully [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the last few days investigating <a href="http://www.plone.org/">Plone</a> as a potential replacement for <a href="http://www.wordpress.org/">WordPress</a> for the <a href="http://www.okcomputer.org/">okcomputer.org web site</a>, but, as is frequently the case when experimenting with new technology around here, I&#8217;ve been beating my head against the wall trying to get my Plone installation to work behind an Apache proxy.  I could successfully pull up the main page&#8217;s content in my browser, but none of the Cascading Style Sheets or Javascript files were making it.  The result was less than inspiring.  So while I was waiting for the <a href="http://www.courier-journal.com/apps/pbcs.dll/article?AID=/20080205/NEWS01/80205002">tornadoes</a> to pass through tonight, I fired up my browser, tailed my log files and started beating on it.</p>
<p>First off, the mod_rewrite rule from the <a href="http://betabug.ch/zope/witch">RewriteRuleWitch</a> wasn&#8217;t matching.  Fantastic.  Here&#8217;s what it gave me:</p>
<p><code>RewriteRule ^($|/.*) \</p>
<p>http://127.0.0.1:8080/VirtualHostBase/\</p>
<p>http/%{SERVER_NAME}:80/okcomputer/VirtualHostRoot$1 [L,P]</code></p>
<p>The root document was matching, but nothing else was.  After setting my RewriteLogLevel to 9, I saw that the URI as it was being tested against the regex didn&#8217;t begin with a /.  So I removed the slash from the regex and added one to the substitution pattern:</p>
<p><code>RewriteRule ^($|.*) \</p>
<p>http://127.0.0.1:8080/VirtualHostBase/\</p>
<p>http/%{SERVER_NAME}:80/okcomputer/VirtualHostRoot/$1 [L,P]</code></p>
<p>Now the RewriteRule was matching, but the proxied requests were generating <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1">400 errors</a> on the Zope HTTP server.  The obvious culprits were the spaces in some of the URL&#8217;s, specifically in URL&#8217;s containing the string &#8220;Plone Default&#8221;.  My browser was (correctly) escaping the spaces as &#8220;%20&#8243;, but by the time mod_rewrite had processed the request and passed it on to mod_proxy the spaces were back resulting in a malformed HTTP request.</p>
<p>I found the fix for this last bit at <a href="http://blog.buro9.com/2007/08/17/mod_rewrite-mod_proxy-spaces-in-uri-boom/">Velo World</a>.  The trick is to define a RewriteMap and then use mod_rewrite&#8217;s built in escape function, like so:</p>
<p><code>RewriteMap escape int:escape<br />
...<br />
RewriteEngine On<br />
RewriteRule ^($|.*) \</p>
<p>http://127.0.0.1:8081/VirtualHostBase/\</p>
<p>http/%{SERVER_NAME}:80/okcomputer/VirtualHostRoot/${escape:$1} [L,P]</code></p>
<p>And success!  But what a pain in the ass!  I&#8217;d love to blame mod_rewrite, but I&#8217;m sure there&#8217;s some valid reason it doesn&#8217;t re-escape  substitutions by default.  Instead I&#8217;ll blame Plone.  Why?  Why do you put <em>spaces</em> in your %$#@! URL&#8217;s.  And given the number of pages on the web explaining how to set up Plone behind an Apache server with mod_rewrite and mod_proxy &#8212; including Plone&#8217;s own documentation &#8212; how come none of <em>them</em> mentioned this?  Very frustrated, but the problem is fixed, the tornadoes have passed, it&#8217;s going on 2:00 AM, I&#8217;m going to bed.</p>
<p><strong>UPDATE 2/14/2008:</strong> Special thanks to Sascha, who&#8217;s been helping me debug my RewriteRule issue.  The Witch&#8217;s rule <em>should</em> work, I just can&#8217;t figure out why apache is stripping that slash of the front of my URI&#8217;s.  I&#8217;m not using a RewriteBase, and the RewriteRule isn&#8217;t an a .htaccess file, so I just have no idea what the problem is.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2008/02/06/escape-from-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Great Photo Salvage</title>
		<link>http://matthewwhitworth.com/2008/01/26/the-great-photo-salvage/</link>
		<comments>http://matthewwhitworth.com/2008/01/26/the-great-photo-salvage/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 19:30:47 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/2008/01/26/the-great-photo-salvage/</guid>
		<description><![CDATA[After the filesystem crash back in October I had 11 gigabytes worth of files without meaningful names just sitting in a lost+found directory. I was forced to come up with some creative ways to salvage data. $ find lost+found/ -type f &#124; wc -l 79370 $ du -sh lost+found/ 11G lost+found/ One of the first [...]]]></description>
			<content:encoded><![CDATA[<p>After the filesystem crash back in October I had 11 gigabytes worth of files without meaningful names just sitting in a lost+found directory.  I was forced to come up with some creative ways to salvage data.</p>
<p><code>$ find lost+found/ -type f | wc -l<br />
79370<br />
$ du -sh lost+found/<br />
11G     lost+found/</code></p>
<p>One of the first things I thought people might want access to would be their digital photographs, so I decided to cook up a little program to sort through the entire lost+found directory, find JPEG&#8217;s with a &#8220;Camera Model&#8221; EXIF tag and then copy them into an appropriate directory based on the value of that tag.</p>
<p>My first attempt used the shell, but that proved unacceptably slow so I fell back to my good friend Python.  I installed the Python Image Library (python-imaging in Ubuntu), which I used to identify the JPEG&#8217;s (very fast, by the way), and which also has (kludgy, experimental) support for reading EXIF tags.</p>
<p>Here&#8217;s the code:</p>
<p><code>#! /usr/bin/python</p>
<p>import sys<br />
import os<br />
import Image<br />
from ExifTags import TAGS<br />
from shutil import copyfile</p>
<p>INDIR = 'lost+found'<br />
OUTDIR = 'recovered-photos'</p>
<p>def recover_photo(infile, outdir):<br />
    try:<br />
        im = Image.open(infile)</p>
<p>        if im.format == 'JPEG':<br />
            tags = {}<br />
            exif = im._getexif()</p>
<p>            for tag, val in exif.items():<br />
                lookup = TAGS.get(tag, tag)<br />
                tags[lookup] = val</p>
<p>            dirname = tags['Model'].strip()<br />
            dirname = dirname.replace(' ', '_')<br />
            outdirname = os.path.join(outdir, dirname)</p>
<p>            if not os.path.isdir(outdirname):<br />
                os.makedirs(outdirname)</p>
<p>            outfile = os.path.basename(infile)</p>
<p>            if not outfile.endswith(('.jpg', '.JPG')):<br />
                outfile = outfile + '.jpg'</p>
<p>            outfile = os.path.join(outdirname, outfile)</p>
<p>            copyfile(infile, outfile)<br />
            print infile, '->', outfile</p>
<p>    except IOError, v:<br />
        try:<br />
            (errno, errmsg) = v<br />
        except:<br />
            errmsg = v<br />
        print infile, errmsg<br />
    except:<br />
        print infile, 'unknown error'</p>
<p>for root, dirs, files in os.walk(INDIR):<br />
    for name in files:<br />
        infile = os.path.join(root, name)<br />
        recover_photo(infile, OUTDIR)</code></p>
<p>After running for 28m18s:</p>
<p><code>$ ls -l recovered-photos/<br />
total 492<br />
drwxr-xr-x 2 matthew matthew  4096 2008-01-26 13:58 C2100UZ<br />
drwxr-xr-x 2 matthew matthew  4096 2008-01-26 14:18 C3100Z,C3020Z<br />
drwxr-xr-x 2 matthew matthew 12288 2008-01-26 14:18 C860L,D360L<br />
drwxr-xr-x 2 matthew matthew 36864 2008-01-26 14:17 C960Z,D460Z<br />
...<br />
$ find recovered-photos/ -type f | wc -l<br />
9293<br />
$ du -sh recovered-photos/<br />
7.3G    recovered-photos/</code></p>
<p>9293 digital photographs all nicely sorted.</p>
<p>I&#8217;ll clean the code up, flesh it out with some handy command-line args and post a link to the updated version here as soon as I have a few spare cycles.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2008/01/26/the-great-photo-salvage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy, Empty Gravatars</title>
		<link>http://matthewwhitworth.com/2008/01/23/easy-empty-gravatars/</link>
		<comments>http://matthewwhitworth.com/2008/01/23/easy-empty-gravatars/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 04:53:06 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/2008/01/23/easy-empty-gravatars/</guid>
		<description><![CDATA[For some unknown reason, I got vaguely interested in Gravatars this week. I&#8217;ll spare you the Google search &#8212; Gravatars are Globally Recognized Avatars. (And for you total lame-os, avatars are the little pictures next to people&#8217;s names in some forums and blog comments.) The idea is that you upload your avatars to gravatar.com and [...]]]></description>
			<content:encoded><![CDATA[<p>For some unknown reason, I got vaguely interested in Gravatars this week.  I&#8217;ll spare you the Google search &#8212; Gravatars are <em>Globally Recognized Avatars</em>.  (And for you total lame-os, <em>avatars</em> are the little pictures next to people&#8217;s names in some forums and blog comments.)  The idea is that you upload your avatars to <a href="http://site.gravatar.com/">gravatar.com</a> and associate them with your email address (which just happens to be a globally unique identifier that you&#8217;ve probably already provided to most systems you use), and then services that are configured to use Gravatars can always pull your latest and greatest avatar from a central repository.  Rocket science it ain&#8217;t.</p>
<p><img src="http://matthewwhitworth.com/wordpress/wp-content/uploads/2008/01/me-newyears-2004-80x80.jpg" alt="PG Gravatar" align="right" border="2" hspace="10" vspace="5" /><img src="http://matthewwhitworth.com/wordpress/wp-content/uploads/2008/01/mgw-ukelele-80x80.jpg" alt="G Gravatar" align="right" border="2" hspace="10" vspace="5" />First, I set up a couple of Gravatars myself: one rated PG (I&#8217;m holding a beer), another rated G of me playing the ukulele at Ian and Christine&#8217;s wedding party.  I&#8217;m not sure why I bothered as I don&#8217;t really post to any forums these days, but they&#8217;re there.</p>
<p>Next, I spent about three minutes setting up the <a href="http://wordpress.org/extend/plugins/easygravatars/">Easy Gravatars</a> WordPress plugin over on <a href="http://kidamnesiac.okcomputer.org/">Kid Amnesiac</a>.  Man, does Easy Gravatars live up to its name!  Not much flexibility, but a default setting that was perfect for my needs.  (The only tweaks I made were to change the URL for the default image for missing Gravatars to one being served off my own server and then to set the default maximum-naughtiness rating to PG.)</p>
<p>Here&#8217;s the kicker: not a single person who has posted comments to Kid Amnesiac has a Gravatar. I checked &#8216;em all.  Nothing.  I even posted a comment myself (since deleted) just to see if the plugin worked (it did).  I figured at least one person (*cough* Diana *cough*) would have a Gravatar.  Nope.  None.  So that was a bummer.</p>
<p>I&#8217;m leaving the plugin enabled in hopes that someone might read this and go nuts and actually set up a Gravatar.  Please, make me feel useful.  Oh, and I suppose I should set the plugin up for matthewwhitworth.com, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2008/01/23/easy-empty-gravatars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shredding Serenity</title>
		<link>http://matthewwhitworth.com/2008/01/22/shredding-serenity/</link>
		<comments>http://matthewwhitworth.com/2008/01/22/shredding-serenity/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 13:23:19 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://matthewwhitworth.com/2008/01/22/shredding-serenity/</guid>
		<description><![CDATA[All okcomputer.org services and accounts have been migrated to the new okcomputer.org server, firefly, for a couple of weeks now, so today I started work on decommissioning the old server, serenity. Normally I&#8217;d wipe the disks like so: # dd infile=/dev/urandom outfile=/dev/hda1 But that has been complicated by the annoying fact that the hosting company [...]]]></description>
			<content:encoded><![CDATA[<p>All okcomputer.org services and accounts have been migrated to the new okcomputer.org server, firefly, for a couple of weeks now, so today I started work on decommissioning the old server, serenity.  Normally I&#8217;d wipe the disks like so:</p>
<p><code># dd infile=/dev/urandom outfile=/dev/hda1</code></p>
<p>But that has been complicated by the annoying fact that the hosting company built the OS on a single disk partition.  An attempt to destroy the contents of hda1 would risk causing an<br />
operating system crash before all the contents had been destroyed.*  If I had physical access to the server I could boot from a live CD and have a free go at the hard drive, but that isn&#8217;t an option.  I needed a tool that would give me some precision as to what I was destroying.</p>
<p>I&#8217;ve opted to use shred, a program included in the coreutils package that writes random data over a file&#8217;s bytes.  Learning about shred was funny because there is a lot of misinformation out there.  Its primary weakness is that it assumes that the filesystem overwrites data in-place, and not all modern filesystems do that &#8212; in fact most modern filesystems don&#8217;t do that.  serenity used the ext3 filesystem, and there&#8217;s quite a number of people screaming on the &#8216;Net that shred is ineffective on ext3 filesystems.  Well, I actually R&#8217;ed the FM, where I learned that ext3 filesystems are only problematic to shred in data=journal mode (not the default).  Seems I was all clear.</p>
<p>I couldn&#8217;t shred the entire filesystem or I would find myself in the same conundrum as if I had used the dd method, so I decided to concentrate on user data, databases, certificates and system passwords.  After that I could let loose a more dangerous (but less precise) method and call it a night.</p>
<p>shred&#8217;s other weakness is that it was designed to be used on single files (or whole filesystems via their device files) rather than recursing through a directory tree like &#8220;rm -Rf&#8221;.  So I wrapped it in a find statement and then deleted the empty user home directory trees by hand before deleting each user&#8217;s account.  Actually the whole thing can be neatly wrapped up in some awk:</p>
<p><code># for u in `awk -F ':' '$3 <= 1000 &#038;&#038; $3 > 65534 { print $1 }' /etc/passwd`; do<br />
> find / -type f -user $u -exec shred -n 3 -zu {} \;<br />
> rm -Rf /home/$u<br />
> deluser $u<br />
> done</code></p>
<p>So serenity has been wiped clean.  I&#8217;m going to call the hosting company in just a bit and terminate service.  Everything is chugging along on firefly.  Our long national nightmare is over.</p>
<p>&#8211;</p>
<p>* I don&#8217;t really know if this is true, but it seems a good guess.  Input appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://matthewwhitworth.com/2008/01/22/shredding-serenity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
