<?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>the jof &#187; hacks</title>
	<atom:link href="http://thejof.com/blog/category/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://thejof.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 06 Apr 2009 11:54:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>&#8220;brain&#8221; process</title>
		<link>http://thejof.com/blog/2009/02/22/brain-process/</link>
		<comments>http://thejof.com/blog/2009/02/22/brain-process/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 19:37:57 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/?p=220</guid>
		<description><![CDATA[I&#8217;ve been brainstorming with the idea of having a sort of &#8220;brain&#8221; process to keep tabs on systems I watch. For recurring problems with consistent solutions, my hope is that it can eventually take care of these without human intervention.

Attracting or sending too much traffic to/from a peer? Query a snapshot of cFlow records and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been brainstorming with the idea of having a sort of &#8220;brain&#8221; process to keep tabs on systems I watch. For recurring problems with consistent solutions, my hope is that it can eventually take care of these without human intervention.</p>
<ul>
<li>Attracting or sending too much traffic to/from a peer? Query a snapshot of cFlow records and pick some CIDR blocks to block accordingly.</li>
<li>Inbound DDOS attack to a single source? Sink the traffic to a mitigator device up to a certain threshold of collateral damage. Past that, automatically inject a BGP-blackhole-community-tagged /32 route upstream.</li>
<li>Route being hijacked? Determine hijacked block size, and slice up an aggregate into more specific routes where possible.</li>
<li>Router CPU spiking again? Capture a process list as it happens.</li>
</ul>
<p>I&#8217;m envisioning a set of ruby or python libraries that can interact with different systems and tools in a monitored environment, make some sane choices about what to do, and at the very least, be smart about alerting the administrator. I would much rather receive nagios and cacti threshold alerts over XMPP/Jabber than SMS while I&#8217;m in front of a real keyboard.</p>
<p>Come to think of it, receiving alerts over SMS isn&#8217;t that great. Email to SMS gateways add a lot of garbage to the message, and they show up as coming from different senders, so they never seem to thread on my phone. Having a programatic way to access alert data would make gathering this data into a &#8216;Systems Alerts&#8217; type of app on the mobile phone possible.</p>
<p>Here&#8217;s what I was brainstorming in OmniGraffle:</p>
<p><img class="alignnone size-medium wp-image-221" title="admin_brain" src="http://thejof.com/blog/wp-content/uploads/2009/02/admin_brain-300x165.png" alt="admin_brain" width="300" height="165" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2009/02/22/brain-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8216;Referrer:&#8217;</title>
		<link>http://thejof.com/blog/2009/02/16/referrer/</link>
		<comments>http://thejof.com/blog/2009/02/16/referrer/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 12:16:20 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/?p=217</guid>
		<description><![CDATA[BoingBoing Gadgets &#39;Referer&#39; hiding in effect
I saw this the other day on a BoingBoing gadgets post from within Google Reader. Perhaps an over-zealous .htaccess over at BBG?
Interesting spelling nitpick: the original HTTP 1.0 spec (now in RFC1945)Â misspelledÂ referrer as &#8216;referer&#8217; and now it has stuck as a proper misspelling for many things HTTP.
So, note to self: [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_216" class="wp-caption alignnone" style="width: 310px"><img class="size-medium wp-image-216" title="picture-2" src="http://thejof.com/blog/wp-content/uploads/2009/02/picture-2-300x145.png" alt="BoingBoing Gadgets 'Referer' hiding in effect" width="300" height="145" /><p class="wp-caption-text">BoingBoing Gadgets &#39;Referer&#39; hiding in effect</p></div>
<p>I saw this the other day on a BoingBoing gadgets post from within Google Reader. Perhaps an over-zealous .htaccess over at BBG?</p>
<p>Interesting spelling nitpick: the original HTTP 1.0 spec (now in <a href="http://www.rfc-editor.org/rfc/rfc1945.txt">RFC1945</a>)Â misspelledÂ referrer as &#8216;referer&#8217; and now it has stuck as a proper misspelling for many things HTTP.</p>
<p>So, note to self: when searching through natural language text, be fuzzy about spelling &#8211; it&#8217;s not so static changing over time and through repeated use in varied contexts. It sucks to miss a good result just because of a common misspelling.</p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2009/02/16/referrer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slightly faster&#8230; but still faster!</title>
		<link>http://thejof.com/blog/2009/02/12/slightly-faster-but-still-faster/</link>
		<comments>http://thejof.com/blog/2009/02/12/slightly-faster-but-still-faster/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 14:58:41 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/?p=206</guid>
		<description><![CDATA[Â 
Bandwidth graph for sfo.thejof.com
Here&#8217;s an example of how poking into what your applications are really doing can really save you some compute resources. In early December, I was adding a new job to my crontab and wanted to go over all the things that were running from there.
One of these cron jobs was a script [...]]]></description>
			<content:encoded><![CDATA[<p>Â </p>
<div id="attachment_205" class="wp-caption aligncenter" style="width: 432px"><img class="size-full wp-image-205 " title="sfo graph" src="http://thejof.com/blog/wp-content/uploads/2009/02/graph_imagephp-png-image-603x322-pixels-vimperator-2.jpg" alt="Bandwidth graph for sfo.thejof.com" width="422" height="225" /><p class="wp-caption-text">Bandwidth graph for sfo.thejof.com</p></div>
<p>Here&#8217;s an example of how poking into what your applications are really doing can really save you some compute resources. In early December, I was adding a new job to my <a href="http://en.wikipedia.org/wiki/Cron">crontab</a> and wanted to go over all the things that were running from there.</p>
<p>One of these cron jobs was a script snippet to instantiate <a href="http://isync.sourceforge.net/mbsync.html">mbsync</a> to synchronize my remote IMAP store at work to a local <a href="http://en.wikipedia.org/wiki/Maildir">maildir</a> for perusal with <a href="http://www.mutt.org/">mutt</a>. When I wanted to grab a capture of some example network traffic of some of its polling cycles, I was surprised to find that it was always <a href="http://www.rfc-editor.org/rfc/rfc3501.txt">SELECT</a>-ing each folder and iterating through each UID to check if it had seen it before. This took a decent amount of bandwidth to poll every five minutes &#8211; around 200 kbps. And of course, with the remote mailstore being an Exchange shop, this stretched the polling cycles on big folders out longer than it should have, blurring the lines between the stop of one cycle and the start of another.</p>
<p>Taking a look at some of the alternatives for remote mailstore synchronization, I started taking a look at <a href="http://fetchmail.berlios.de/">fetchmail</a> and eventually settled on switching. By configuring it to use IMAP <a href="http://www.rfc-editor.org/rfc/rfc2177.txt">IDLE</a>-ing, the same process happens faster at around only 5-20 kbps &#8212; an almost four-fold reduction in network utilization.</p>
<p>Efficiency victory dance!</p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2009/02/12/slightly-faster-but-still-faster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New GPG Key</title>
		<link>http://thejof.com/blog/2009/02/07/new-gpg-key/</link>
		<comments>http://thejof.com/blog/2009/02/07/new-gpg-key/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 06:13:20 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/2009/02/07/new-gpg-key/</guid>
		<description><![CDATA[For the last six years, I&#8217;ve been making use of the same gpg identity. I&#8217;ve copied my private key onto more workstations than I can recall at this point, so I&#8217;ve decided to try and be a little bit better about keeping my keys and signatures in-order and up-to-date.
A couple of steps I took tonight [...]]]></description>
			<content:encoded><![CDATA[<p>For the last six years, I&#8217;ve been making use of the same gpg identity. I&#8217;ve copied my private key onto more workstations than I can recall at this point, so I&#8217;ve decided to try and be a little bit better about keeping my keys and signatures in-order and up-to-date.</p>
<p>A couple of steps I took tonight in moving to a key set of keypairs:</p>
<ol>
<li>Generated a new signing keypair with <code>gpg --gen-key</code> I cycled through the process several times until I had a nice-sounding trailing 4-bytes. I ended up going with 0&#215;8F8CAD3D &#8212; &#8220;eight-fate-CAD-3D&#8221; I say aloud in my head.</li>
<li>Signed the new signing keypair with my old signing keypair, 0xC8579EE5. This is just to mark the new key as trusted by the old one, and to demonstrate that cryptographically.</li>
<li>Generated a revocation certificate for the old key, with the old key using <code>gpg -u 0xC8579EE5 --gen-revoke 0xC8579EE5 | gpg --import</code></li>
<li>Sent the revoked, old signing keypair to a keyserver with <code>gpg --send-key 0xC8579EE5</code></li>
<li>Old keypair disappears from keyservers, begin using new signing/encrypting keypairs.</li>
</ol>
<p>As a result, I&#8217;m interesting in finding people I know that want to swap key signatures.</p>
<p>My new key is <a href="http://thejof.com/0x8f8cad3d.asc" target="_blank">available here</a>.</p>
<p><strong>Update:</strong> I figured &#8220;what the heck, it&#8217;s 2009, what&#8217;s an extra 20k?&#8221;, so I embedded a photo in my key as well just for grins. <a href="http://thejof.com/0x8f8cad3d_photo.asc" target="_blank">Bask in the glory of a big blob of base-64</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2009/02/07/new-gpg-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vimperator, slick.</title>
		<link>http://thejof.com/blog/2009/01/23/vimperator-slick/</link>
		<comments>http://thejof.com/blog/2009/01/23/vimperator-slick/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 08:10:55 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/2009/01/23/vimperator-slick/</guid>
		<description><![CDATA[Vimperator is great. It&#8217;s a Firefox 3 add-on that implements a separate input layer above normal Firefox controls so that you can navigate around all the browsing and browser settings with vim-like keybindings.
A coworker turned me onto the thing, and I&#8217;ve found it makes working in a browser much more productive, as I&#8217;m not always [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://vimperator.org/trac/wiki/Vimperator" target="_blank">Vimperator</a> is great. It&#8217;s a <a href="http://www.mozilla.com/en-US/firefox/3.0.5/releasenotes/" target="_blank">Firefox 3</a> add-on that implements a separate input layer above normal Firefox controls so that you can navigate around all the browsing and browser settings with <a href="http://www.vim.org/" target="_blank">vim</a>-like keybindings.<br />
A coworker turned me onto the thing, and I&#8217;ve found it makes working in a browser much more productive, as I&#8217;m not always alternating between the keyboard and mouse to navigate between different input focuses.</p>
<p>It keeps my hands where they belong when using the computer &#8212; on the keyboard!</p>
<p>One feature I like in particular is a binding for &#8216;[[' and ']]&#8217;. The bindings in their respective directions will search for anchor (&lt;a &#8230; &gt;) tags on the page and do a little regexp in the inside HTML for &#8216;prev&#8217; and &#8216;next&#8217;.</p>
<p>This is mucho awesome on sites like Flickr, or multi-page articles where you can justÂ  double-tap the brackets either forward to backward to flip to the next or previous page.</p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2009/01/23/vimperator-slick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stupid sanity check</title>
		<link>http://thejof.com/blog/2008/11/07/stupid-sanity-check/</link>
		<comments>http://thejof.com/blog/2008/11/07/stupid-sanity-check/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 05:40:54 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/2008/11/07/stupid-sanity-check/</guid>
		<description><![CDATA[Found this bash gem on some corporate BIND management scripts at work &#8211; ugh:
ZTEST=$1
if [ "x$ZTEST" == "x" ]; then
 echo &#8220;Usage: &#8230;..&#8221;
]]></description>
			<content:encoded><![CDATA[<p>Found this bash gem on some corporate BIND management scripts at work &#8211; ugh:</p>
<p>ZTEST=$1<br />
if [ "x$ZTEST" == "x" ]; then<br />
 echo &#8220;Usage: &#8230;..&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2008/11/07/stupid-sanity-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IP over DNS</title>
		<link>http://thejof.com/blog/2006/12/18/ip-over-dns/</link>
		<comments>http://thejof.com/blog/2006/12/18/ip-over-dns/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 21:49:40 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/2006/12/18/ip-over-dns/</guid>
		<description><![CDATA[Is ab-so-fucking-lutely awesome. Granted, this link probably has latencies of almost 100-200 ms on just the first hop to my gateway at MAE-West, and my max throughput is only about 90k at best. However, the cool hax element of the whole thing is hard to ignore.
Thanks Boingo!
]]></description>
			<content:encoded><![CDATA[<p>Is ab-so-fucking-lutely awesome. Granted, this link probably has latencies of almost 100-200 ms on just the first hop to my gateway at MAE-West, and my max throughput is only about 90k at best. However, the cool hax element of the whole thing is hard to ignore.</p>
<p>Thanks Boingo!</p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2006/12/18/ip-over-dns/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Post-Halloween</title>
		<link>http://thejof.com/blog/2006/11/01/post-halloween/</link>
		<comments>http://thejof.com/blog/2006/11/01/post-halloween/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 12:03:46 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/2006/11/01/post-halloween/</guid>
		<description><![CDATA[So the webcam idea worked, but all of the photos pretty much sucked. >95% of them were completely blurry&#8230;
I think about 50 people recognized that I was a LEGO minifig, and about 150 thought I was a wheel of cheese. 
I really think I could do a much better job next time by making the [...]]]></description>
			<content:encoded><![CDATA[<p>So the webcam idea worked, but all of the photos pretty much sucked. >95% of them were completely blurry&#8230;</p>
<p>I think about 50 people recognized that I was a LEGO minifig, and about 150 thought I was a wheel of cheese. <img src='http://thejof.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I really think I could do a much better job next time by making the foam discs a little more round. I had envisioned a glossy and perfect lego head and wound up with something that looked more like a sarcastic-lumpy-wheel of cheese or a smirking-drunk-yellow marshmallow.<br />
<a title="Photo Sharing" href="http://www.flickr.com/photos/thejof/285281277/"><img width="240" height="180" alt="LEGO Head" src="http://static.flickr.com/122/285281277_ec56cc1fa9_m.jpg" /></a></p>
<p>Perhaps next year I&#8217;ll put in an old point-and-shoot digital camera with a remote trigger and have a usb cable running down to my pack that&#8217;ll read off the card.<br />
One thing that would have been nice is some kind of heads-up-display inside the helmet. Just a simple backlit LCD would have been perfect. It would display the timer length remaining until the next snapshot, and some other arbitrary piece of random crap just &#8217;cause it&#8217;d be cool.<br />
A shutter trigger button on the side of the headpiece would be pretty useful as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2006/11/01/post-halloween/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Halloween Webcam</title>
		<link>http://thejof.com/blog/2006/10/31/halloween-webcam/</link>
		<comments>http://thejof.com/blog/2006/10/31/halloween-webcam/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 02:04:24 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/2006/10/31/halloween-webcam/</guid>
		<description><![CDATA[Hopefully you&#8217;ll be able to follow along tonight for Halloween in the Castro.
I&#8217;m going to try and put a webcam in my Lego head this year and keep a laptop tethered to my phone to upload images in realtime. It seems to work at the moment, but I still haven&#8217;t tested it with my phone [...]]]></description>
			<content:encoded><![CDATA[<p>Hopefully you&#8217;ll be able to follow along tonight for Halloween in the Castro.</p>
<p>I&#8217;m going to try and put a webcam in my Lego head this year and keep a laptop tethered to my phone to upload images in realtime. It seems to work at the moment, but I still haven&#8217;t tested it with my phone or made a mounting hole in the head.<br />
Once everything is set, it&#8217;ll upload images to <a href="http://thejof.com/halloweencam2006">http://thejof.com/halloweencam2006</a></p>
<p>Build photos at:Â  <a href="http://flickr.com/photos/thejof/sets/72157594354884204/">http://flickr.com/photos/thejof/sets/72157594354884204/</a></p>
<p>Update: Everything seems to work, so I&#8217;ll be testing out 1 min. intervals on my way out to Shannon&#8217;s</p>
<p>Update #2: Pictures are a little blurry, but it totally works!</p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2006/10/31/halloween-webcam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oh. My. God.</title>
		<link>http://thejof.com/blog/2006/10/23/oh-my-god/</link>
		<comments>http://thejof.com/blog/2006/10/23/oh-my-god/#comments</comments>
		<pubDate>Tue, 24 Oct 2006 02:53:01 +0000</pubDate>
		<dc:creator>jof</dc:creator>
				<category><![CDATA[hacks]]></category>
		<category><![CDATA[main]]></category>

		<guid isPermaLink="false">http://thejof.com/blog/2006/10/23/oh-my-god/</guid>
		<description><![CDATA[Orace OpenWorld is at Moscone this week.
ESSID: vpn
64-bit WEP and way more than enough traffic  
]]></description>
			<content:encoded><![CDATA[<p>Orace OpenWorld is at Moscone this week.</p>
<p>ESSID: vpn<br />
64-bit WEP and way more than enough traffic <img src='http://thejof.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://thejof.com/blog/2006/10/23/oh-my-god/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
