<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Chicken of the Web</title>
	<atom:link href="http://webkist.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://webkist.wordpress.com</link>
	<description>webkist.com</description>
	<lastBuildDate>Tue, 24 Jan 2012 21:24:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='webkist.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Chicken of the Web</title>
		<link>http://webkist.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://webkist.wordpress.com/osd.xml" title="Chicken of the Web" />
	<atom:link rel='hub' href='http://webkist.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Authenticating to git with a non-standard SSH key</title>
		<link>http://webkist.wordpress.com/2010/12/23/authenticating-to-git-with-a-non-standard-ssh-key/</link>
		<comments>http://webkist.wordpress.com/2010/12/23/authenticating-to-git-with-a-non-standard-ssh-key/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 22:00:08 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=75</guid>
		<description><![CDATA[Normally git uses your default keys for authentication – ~/.ssh/id_rsa or whatever. Sometimes though, you want to use some other key pair. The fix is simple, but not obviously documented in the few places I looked, so here you go: Let&#8217;s say you would typically use something like this: # git remote add origin git@git.foo.com:bar/baz.git [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=75&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Normally git uses your default keys for authentication – <code>~/.ssh/id_rsa</code> or whatever. Sometimes though, you want to use some other key pair. The fix is simple, but not obviously documented in the few places I looked, so here you go:</p>
<p>Let&#8217;s say you would typically use something like this:</p>
<p><code># git remote add origin git@git.foo.com:bar/baz.git</code></p>
<p>But you want to use <code>~/.ssh/my_other_key</code> to authenticate.</p>
<p>In <code>~/.ssh/config</code> add a block like this:</p>
<pre>Host git-foo-com-other-key
  HostName git.foo.com
  IdentityFile ~/.ssh/my_other_key</pre>
<p>Then, instead of the above git-remote, use this:</p>
<p><code># git remote add origin git@git-foo-com-other-key:bar/baz.git</code></p>
<p>Now, <code>git push origin</code> will use the appropriate key (the corresponding public key is known to git.foo.com, right?)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=75&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2010/12/23/authenticating-to-git-with-a-non-standard-ssh-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>Easy URL shortener for Apache</title>
		<link>http://webkist.wordpress.com/2010/10/06/easy-url-shortener-for-apache/</link>
		<comments>http://webkist.wordpress.com/2010/10/06/easy-url-shortener-for-apache/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 18:02:50 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=67</guid>
		<description><![CDATA[In httpd.conf: RewriteEngine On RewriteMap urlshort txt:/path/to/file/map.txt RewriteRule ^/s/([a-zA-Z0-9]+)$ ${urlshort:$1} [R] in map.txt: abcdef http://www.foo.com/blah/ bcdefg http://www.bar.com/foo/ The RewriteRule can be tweaked (removing the /s, using a fixed-length key, whatever) as long as whatever matches in the parens is the key to the map.txt table. And map.txt could be a different kind of map (including [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=67&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">In httpd.conf:</div>
<pre>RewriteEngine On
RewriteMap urlshort txt:/path/to/file/map.txt
RewriteRule ^/s/([a-zA-Z0-9]+)$ ${urlshort:$1} [R]</pre>
<div id="_mcePaste">in map.txt:</div>
<pre>abcdef http://www.foo.com/blah/
bcdefg http://www.bar.com/foo/</pre>
<div id="_mcePaste">The RewriteRule can be tweaked (removing the /s, using a fixed-length key, whatever) as long as whatever matches in the parens is the key to the map.txt table. And map.txt could be a different kind of map (including an external program that looks the key up in a DB, logs the request, etc.)</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=67&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2010/10/06/easy-url-shortener-for-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>mod_concat</title>
		<link>http://webkist.wordpress.com/2010/10/01/mod_concat/</link>
		<comments>http://webkist.wordpress.com/2010/10/01/mod_concat/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 18:55:13 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=64</guid>
		<description><![CDATA[I was recently asked about enabling mod_concat on the work servers to make it easier to combine things like .js and .css files into a single request. It works nicely: &#60;script src="foo.js" type="text/javascript"&#62;&#60;/script&#62; &#60;script src="bar.js" type="text/javascript"&#62;&#60;/script&#62; becomes &#60;script src="./??foo.js,bar.js" type="text/javascript"&#62;&#60;/script&#62; This is nice and it&#8217;s reasonable with Last-Modified-Date headers, etc. But if you have some [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=64&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was recently asked about enabling <a href="http://code.google.com/p/modconcat/">mod_concat</a> on the work servers to make it easier to combine things like .js and .css files into a single request. It works nicely:</p>
<p><code>&lt;script src="foo.js" type="text/javascript"&gt;&lt;/script&gt;<br />
&lt;script src="bar.js" type="text/javascript"&gt;&lt;/script&gt;</code></p>
<p>becomes</p>
<p><code>&lt;script src="./??foo.js,bar.js" type="text/javascript"&gt;&lt;/script&gt;</code></p>
<p>This is nice and it&#8217;s reasonable with Last-Modified-Date headers, etc. But if you have some PHP files in your document tree and request something like this:</p>
<p><code>http://www.foo.com/blah/??foo.php,bar.php</code></p>
<p>It&#8217;ll expose unparsed PHP which is almost never what you want to happen.</p>
<p>The right solution, obviously, would be to use subrequests to get the content back from each file and then concatenate all of that. But that&#8217;s much more complicated and 90% of the time unnecessary: how often do you really want to combine the output of two dynamic URLs but can&#8217;t just do it within the application?</p>
<p>Anyway&#8230;the obvious answer was to just not do it. Let mod_concat return static files that would have been returned but the standard static content handler, but bail on everything else. <a href="http://code.google.com/p/modconcat/issues/detail?id=7">This patch</a> does exactly that.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=64&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2010/10/01/mod_concat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating an Amazon EC2 EBS AMI from a running instance</title>
		<link>http://webkist.wordpress.com/2010/03/16/creating-an-amazon-ec2-ebs-ami-from-a-running-instance/</link>
		<comments>http://webkist.wordpress.com/2010/03/16/creating-an-amazon-ec2-ebs-ami-from-a-running-instance/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 22:02:54 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[amazonws]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[amazonaws]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=54</guid>
		<description><![CDATA[So you have a running EC2 instance. It works great, except it's one of the ephemeral, kill-it-and-you-lose-everything kind. An EBS-backed instance is the logical choice, so how do you convert it?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=54&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So you have a running EC2 instance. It works great, except it&#8217;s one of the ephemeral, kill-it-and-you-lose-everything kind. An EBS-backed instance is the logical choice, so how do you convert it? Easy:</p>
<h1>Step 1: Create the EBS volume</h1>
<p>Just do it in the web interface. You could use the command-line tools, but why? While you&#8217;re there, attach it to your running EC2 instance, making note of the volume-id and device it&#8217;s connected to, eg: vol-abcd1234 and /dev/sdf</p>
<p>While you&#8217;re in the web interface, make a note of the ramdisk and kernel your running instance is using. This will be important later. They&#8217;ll be something like &#8220;ari-12345678&#8243; and &#8220;aki-abcdef12&#8243;, respectively.</p>
<h1>Step 2: Sync your running instance</h1>
<p>If you have things like mysql running, shut them down. It&#8217;ll save you hassles later. Then create a FS on your EBS volume:</p>
<p style="padding-left:30px;"># mkfs.ext3 /dev/sdf</p>
<p>Next, mount it:</p>
<p style="padding-left:30px;"># mkdir /mnt/ebs</p>
<p style="padding-left:30px;"># mount /dev/sdf /mnt/ebs</p>
<p>Now, use rsync to copy everything over to the EBS volume:</p>
<p style="padding-left:30px;"># rsync -a &#8211;delete &#8211;progress -x / /mnt/ebs</p>
<p>You won&#8217;t have /dev/sda2 for your /mnt partition on EBS, so you need to remove it from the copied fstab in /mnt/ebs/etc/fstab. Comment it out, remove it, whatever.</p>
<p>(Added 11/2010 thanks to <a href="http://webkist.wordpress.com/2010/03/16/creating-an-amazon-ec2-ebs-ami-from-a-running-instance/#comment-86">Mark Smithson in the comments</a>)</p>
<p>You may need to create some device files on the new EBS volume. If console, zero or null don&#8217;t exist in /mnt/ebs/dev, create them using some or all of these:</p>
<p style="padding-left:30px;"># MAKEDEV -d /mnt/ebs/dev -x console<br />
# MAKEDEV -d /mnt/ebs/dev -x zero<br />
# MAKEDEV -d /mnt/ebs/dev -x null</p>
<p>Unmount the EBS volume:</p>
<p style="padding-left:30px;"># umount /mnt/ebs</p>
<h1>Step 3: Get your keys in order</h1>
<p>You&#8217;ll need an EC2 X.509 cert and private key. You get these through the web interface&#8217;s &#8220;Security Credentials&#8221; area. This is NOT the private key you use to SSH into an instance. You can have as many as you want, just keep track of the private key because Amazon doesn&#8217;t keep it for you. If you lose it, it&#8217;s gone for good. Once you have the files, set some environment variables to make it easy:</p>
<p style="padding-left:30px;"># export EC2_CERT=`pwd`/cert-*.pem</p>
<p style="padding-left:30px;"># export EC2_PRIVATE_KEY=`pwd`/pk-*.pem</p>
<h1>Step 4: Make your AMI</h1>
<p>Now you can make a snapshot of your EBS volume. This is the basis of the AMI you&#8217;ll be creating. Whatever you copied to the EBS volume in step 2 will be there &#8212; user accounts, database data, etc. First, the snapshot (using the volume-id from step 1):</p>
<p style="padding-left:30px;"># ec2-create-snapshot vol-abcd1234</p>
<p>That&#8217;ll give you a snapshot-id back. You then need to wait for the snapshot to finish. Keep running this until it says it&#8217;s &#8220;completed&#8221;:</p>
<p style="padding-left:30px;"># ec2-describe-snapshots snap-1234abcd</p>
<p>Finally, you can register the snapshot as an AMI:</p>
<p style="padding-left:30px;"># ec2-register &#8211;snapshot snap-1234abcd &#8211;description &#8220;your description here&#8221; &#8211;name &#8220;something-significant-here&#8221; &#8211;ramdisk ari-12345678 &#8211;kernel aki-abcdef12</p>
<p><em>(The arguments to ec2-register should be normal Unix-style long options: &#8220;-&#8221;, &#8220;-&#8221;, &#8220;snapshot&#8221;; &#8220;-&#8221;, &#8220;-&#8221;, &#8220;kernel&#8221;. WordPress seems to be displaying those as an mdash instead. It needs to be a double-dash.)</em></p>
<h1>Step 5: Launch!</h1>
<p>At this point, you should see your EBS volume, the snapshot, and your AMI in their respective areas of the web interface. Launch an instance from the AMI and you&#8217;ll find it pretty much exactly where you left your original instance.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=54&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2010/03/16/creating-an-amazon-ec2-ebs-ami-from-a-running-instance/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>YUI Sparkline Widget</title>
		<link>http://webkist.wordpress.com/2009/06/30/yui-sparkline-widget/</link>
		<comments>http://webkist.wordpress.com/2009/06/30/yui-sparkline-widget/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 19:26:06 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[internet]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=37</guid>
		<description><![CDATA[Edward Tufte&#8217;s sparklines are a nice way to present small minimal graphs in contexts where larger, full charts are not needed or warranted. The growing support for the HTML &#60;canvas&#62; tag gives an opportunity to create these graphs dynamically in Javascript. (Download yahoo-widget-sparkline-1.0b.zip.) This widget was built against YUI version 2.7.0 but may work in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=37&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Edward Tufte&#8217;s <a href="http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR">sparklines</a> are a nice way to present small minimal graphs in contexts where larger, full charts are not needed or warranted. The growing support for the HTML &lt;canvas&gt;  tag gives an opportunity to create these graphs dynamically in Javascript.</p>
<p>(Download <a href="http://s3.amazonaws.com/MikeWebkistShared/yahoo-widget-sparkline-1.0b.zip">yahoo-widget-sparkline-1.0b.zip</a>.)</p>
<p>This widget was built against YUI version 2.7.0 but may work in other versions. It subclasses the &#8220;charts&#8221; module and is easily loaded via YUILoader. The <a href="http://www.webkist.com/secret/sparkline/test.html">test.html</a> creates a auto-updating sparkline based on a simple FunctionDataSource within a paragraph of text.</p>
<h2>Features:</h2>
<ul>
<li>If passed a height of &#8220;font-size&#8221; or &#8220;line-height&#8221; will cause the module to examine the CSS of the element to which it will be rendered to determine its height. This allows you to easily insert a sparkline into blocks of text without worrying about scaling the graph by hand.</li>
<li>By default it will remove all content within the element that will contain the &lt;canvas&gt;. This allows &#8220;alt=&#8221; type data to be displayed when &lt;canvas&gt; is not available.</li>
<li>Arbitrary highlighting of points with custom colors.</li>
<li>mean, median, standard deviation and arbitrary &#8220;normal&#8221; range shading.</li>
<li>Uses the Chart object&#8217;s polling setup to auto-update charts by re-polling the DataSource.</li>
</ul>
<h2>Usage:</h2>
<h3>Pull in the module:</h3>
<pre style="padding-left:30px;">var loader = new YAHOO.util.YUILoader();
loader.addModule({ name: 'sparklinecss', type: 'css',
                   fullpath: 'Sparkline.css'});
loader.addModule({ name: 'widget.Sparkline', type: 'js',
                   requires: ['charts', 'sparklinecss'],
                   fullpath: 'Sparkline.js'});
loader.require('widget.Sparkline', 'datasource', 'element');</pre>
<h3>Then create a sparkline:</h3>
<pre>var sl = new YAHOO.widget.Sparkline("sparkline-container",
                                    myDataSource,
                                    { height: 20, yField: "value" });
sl.subscribe("sparklineUpdate", updateHandler);</pre>
<h2>Configuration Options:</h2>
<p style="padding-left:30px;">
<dl>
<dt>max</dt>
<dd>Force a maximum y-value. Default is the largest value in the data.</dd>
<dt>min</dt>
<dd>Force a minimum y-value. Default is the smallest value in the data.</dd>
<dt>width</dt>
<dd>Width of the graph. Default is one pixel per data point.</dd>
<dt>height</dt>
<dd>A pixel value or &#8220;font-size&#8221; or &#8220;line-height&#8221;. Default is 20 pixels.</dd>
<dt>logscale</dt>
<dd>Change the y-axis to a logarithmic scale.</dd>
<dt>clearParent</dt>
<dd>Remove any children of the node passed to <code>render()</code> before adding the canvas. Default <code>true</code></dd>
<dt>zero, mean, median</dt>
<dd>Add horizontal lines at the appropriate places. Each can have a boolean <code>true</code> value or a string specifying the color for the line.</dd>
<dt>stddev</dt>
<dd>Calculate the standard deviation of the data and shade the background between +/- one standard deviation from the mean. Can be <code>true</code> or a color.</dd>
<dt>normal</dt>
<dd>An object with two or three fields: min, max, and (optionally) color. A background rectangle covering the range will be drawn in the specified (or default) color.</dd>
<dt>color</dt>
<dd>Graph color</dd>
<dt>highlightPoints</dt>
<dd>An array of two-field objects: x and color. <code>x</code> is the index of the point in <code>data</code> to highlight and <code>color</code> is the color to use. x-values of <code>max</code> and <code>min</code> highlight the maximum and minimum values. An x-value of <code>-1</code> highlights the last point in the data. </dd>
</dl>
<h2>To Do:</h2>
<ol>
<li>Graceful failure when &lt;canvas&gt; is unavailable.</li>
<li>Allow graphing of data extracted from HTML markup.</li>
</ol>
<p>(updated 7/7/2009)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=37&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2009/06/30/yui-sparkline-widget/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>Perl Memcached Message Queue</title>
		<link>http://webkist.wordpress.com/2008/10/29/perl-memcached-message-queue/</link>
		<comments>http://webkist.wordpress.com/2008/10/29/perl-memcached-message-queue/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 21:17:22 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=29</guid>
		<description><![CDATA[Many years ago I wrote a simple perl+mysql polling script for work. It collected votes for multiple-choice polls, stored them in a database, and returned a results page. It was so simple and easy to use, we&#8217;ve continued using it for YEARS. Every so often we ask a question that is HIGHLY controversial (I&#8217;m looking [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=29&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Many years ago I wrote a simple perl+mysql polling script for work. It collected votes for multiple-choice polls, stored them in a database, and returned a results page. It was so simple and easy to use, we&#8217;ve continued using it for YEARS. Every so often we ask a question that is HIGHLY controversial (I&#8217;m looking at you <a href="http://www.pbs.org/now/palin-poll.html">NOW</a>) and we are suddenly inundated with votes, causing much of the site to slow down or return errors.</p>
<p>The last time this happened I made some changes to the code that made it more difficult to vote more than once. Part of that involved storing the current vote totals in Memcached instead of asking the database each time. But even with that change, we&#8217;re still running a steady 3 or 4 votes per second and would be vulnerable to legitimate spikes in traffic from on-air promotion or something similar.</p>
<p>So today, I&#8217;ve reworked the script to run ALL traffic through memcached and NEVER hit the database at all unless memcached is completely unavailable. The basis for this is <a href="http://broddlit.wordpress.com/2008/04/09/memcached-as-simple-message-queue/">BroddlIT&#8217;s &#8220;memcached as simple message queue&#8221;</a> at least as far as I can figure from his rough sketch.</p>
<p>The general idea is, there&#8217;s a lock, a pointer to the next slot in the queue, and the queue entries themselves.</p>
<h2>Getting the lock</h2>
<p>This waits up to a second to get the lock by sleeping for 1/1000th of a second between attempts. You can implement multiple queues by varying the $key_prefix. If the loop exits without getting the lock, you have to decide what to do.</p>
<pre>  my $key_prefix = "poll-queue";
  my $total_sleep = 1000000;
  while($total_sleep &gt; 0) {
    my $lock_key = $memd-&gt;incr("$key_prefix-lock");

    if(!defined $lock_key) { # No key in cache.
      $memd-&gt;set("$key_prefix-lock", $lock_key = 1);
      $memd-&gt;set("$key_prefix-curr", 0);
      last;
    } elsif($lock_key == 1) { # We got the lock.
      last;
    }

    # Someone else has the lock, so wait 1/1000th of a second.
    $total_sleep -= usleep(1000);
  }
  if($total_sleep &lt;= 0) {
    # You didn't get the lock. Figure something out.
  }</pre>
<p>If you make sure you normally hold the lock for a very small amount of time, you can assume that waiting significantly longer than that without success gives you reasonable cause to take over the lock. The only trick there, as you might expect, is that you need to then release it before another process makes the same assumption.</p>
<h2>Get Next Key Pointer</h2>
<p>The $key_prefix-curr memcached key contains the index of the last entry in the queue. By calling the $memd-&gt;incr() method we get the next one and update the memcache at the same time. If for some reason the pointer doesn&#8217;t exist, it is created. The $key variable becomes the memcached key for this message.</p>
<pre>  my $next_key = $memd-&gt;incr("$key_prefix-curr");
  if(!defined($next_key)) { $memd-&gt;set("$key_prefix-curr", 1); }
  my $key = sprintf("$key_prefix-key-%d", $next_key);</pre>
<h2>Store the Message in the Queue</h2>
<p>Simple. Run this and the previous step in a loop to insert multiple values. But be careful because the lock is active, so the longer you take the longer you block other requests.</p>
<pre>  $memd-&gt;set($key, $message);</pre>
<h2>Release the Lock</h2>
<p>This releases the lock, which allows another process to insert its messages.</p>
<pre>  $memd-&gt;set("$key_prefix-lock", 0);</pre>
<h2>Reading and Flushing the Queue</h2>
<p>Obtain the lock in the same way as above, then get the $key_prefix-curr value and loop from 1. Just make sure you process the values after you release the lock so you don&#8217;t block new entries.</p>
<pre>  my $last_key = $memd-&gt;get("$key_prefix-curr");
  for(my $i=1; $i&lt;=$last_key; $i++) {
    my $key = sprintf("$key_prefix-key-%d", $i);
    push @messages, $memd-&gt;get($key);
  }
  $memd-&gt;set("$key_prefix-curr", 0);
  $memd-&gt;set("$key_prefix-lock", 0);

  process_messages(@messages);</pre>
<p>So that&#8217;s it. It should require only Cache::Memcached and Time::HiRes.</p>
<p>Update: if you run multiple memcached daemons and connect to them all (allowing key-hash load balancing), you will probably want to set the &#8220;no_rehash&#8221; flag and add a bit more error checking. If you allow Cache::Memcached to re-hash your keys if a server connection fails, you could end up losing the various keys temporarily.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=29&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2008/10/29/perl-memcached-message-queue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>rsync&#8217;ing a defined set of subdirectories</title>
		<link>http://webkist.wordpress.com/2008/10/06/rsyncing-a-defined-set-of-subdirectories/</link>
		<comments>http://webkist.wordpress.com/2008/10/06/rsyncing-a-defined-set-of-subdirectories/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 16:49:35 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=27</guid>
		<description><![CDATA[So you have a directory structure that contains all of the applications needed to run a set of servers, but no server needs the entire tree. This rsync configuration is the easiest way I can come up with to rsync only what is needed for a single server: If /export/apps contains bin, lib, var, etc, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=27&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So you have a directory structure that contains all of the applications needed to run a set of servers, but no server needs the entire tree. This rsync configuration is the easiest way I can come up with to rsync only what is needed for a single server:</p>
<p>If <code>/export/apps</code> contains <code>bin</code>, <code>lib</code>, <code>var</code>, <code>etc</code>, <code>share</code> and <code>sbin</code> but you only want <code>bin</code>, <code>lib</code>, and one subdirectory of <code>share</code> rsynced, <code>`hostname`-exclude-list.txt</code> then looks like this:</p>
<pre>+ /apps/bin/
+ /apps/lib/
+ /apps/share/vim/
- /apps/share/*
- /apps/*</pre>
<p>Using this command, you can then sync the directories:</p>
<pre># rsync -avz --delete-excluded \
        --exclude-from=`hostname`-exclude-list.txt \
        /export/apps /local</pre>
<p>With the <code>--delete-excluded</code>, if you change the exclude file, newly excluded entries will be removed from the destination. The copy will end up in <code>/local/apps</code>. More usefully, <code>/export/apps</code> could be on a remote server and the destination would be <code>/export</code>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=27&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2008/10/06/rsyncing-a-defined-set-of-subdirectories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>Reservoir Sampling in Perl</title>
		<link>http://webkist.wordpress.com/2008/10/01/reservoir-sampling-in-perl/</link>
		<comments>http://webkist.wordpress.com/2008/10/01/reservoir-sampling-in-perl/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 17:45:23 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=21</guid>
		<description><![CDATA[A method for randomly selecting N values from a finite (but unknown length) list of elements, without replacement. Algorithm is from Taming Uncertainty. This version takes lines of input on STDIN (or files on @ARGV) and selects 20 of them at random and prints the results to STDOUT. #!/usr/bin/perl use strict; my $N = 20; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=21&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A method for randomly selecting N values from a finite (but unknown length) list of elements, without replacement. Algorithm is from <a href="http://blogs.msdn.com/spt/archive/2008/02/05/reservoir-sampling.aspx">Taming Uncertainty</a>. This version takes lines of input on STDIN (or files on @ARGV) and selects 20 of them at random and prints the results to STDOUT.</p>
<pre>#!/usr/bin/perl

use strict;
my $N = 20;
my $k;
my @r;

while(&lt;&gt;) {
  if(++$k &lt;= $N) {
    push @r, $_;
  } elsif(rand(1) &lt;= ($N/$k)) {
    $r[rand(@r)] = $_;
  }
}

print @r;</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=21&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2008/10/01/reservoir-sampling-in-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#8217;ll eat just about anything.</title>
		<link>http://webkist.wordpress.com/2008/08/29/ill-eat-just-about-anything/</link>
		<comments>http://webkist.wordpress.com/2008/08/29/ill-eat-just-about-anything/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 17:11:29 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=19</guid>
		<description><![CDATA[The VGT Omnivore’s Hundred 1) Copy this list into your blog or journal, including these instructions. 2) Bold all the items you’ve eaten. 3) Cross out any items that you would never consider eating. 4) Optional extra: Post a comment at www.verygoodtaste.co.uk linking to your results. I’ve eaten 60/100. I’ll skip 4/100. (via. Dean Sabatino) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=19&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="blog">
<h2>The VGT Omnivore’s Hundred</h2>
<div id="entry">
<div class="storycontent">
<p>1) Copy this list into your blog or journal, including these instructions.<br />
2) Bold all the items you’ve eaten.<br />
3) Cross out any items that you would never consider eating.<br />
4) Optional extra: Post a comment at <a href="http://www.verygoodtaste.co.uk/uncategorised/the-omnivores-hundred/">www.verygoodtaste.co.uk</a> linking to your results.</p>
<p>I’ve eaten 60/100.<br />
I’ll skip 4/100.</p>
<p>(via. <a href="http://www.deansabatino.com/2008/08/29/138/">Dean Sabatino</a>)</p>
<p><strong>1. Venison</strong><br />
2. Nettle tea<br />
<strong> 3. Huevos rancheros<br />
4. Steak tartare<br />
5. Crocodile</strong><br />
6. Black pudding<br />
<strong> 7. Cheese fondue<br />
8. Carp<br />
9. Borscht<br />
10. Baba ghanoush<br />
11. Calamari<br />
12. Pho<br />
13. PB&amp;J sandwich<br />
14. Aloo gobi<br />
15. Hot dog from a street cart</strong><br />
16. Epoisses<br />
<strong> 17. Black truffle</strong><br />
18. Fruit wine made from something other than grapes<br />
<strong>19. Steamed pork buns<br />
20. Pistachio ice cream<br />
21. Heirloom tomatoes<br />
22. Fresh wild berries<br />
23. Foie gras<br />
24. Rice and beans</strong><br />
25. Brawn, or head cheese<br />
<strong> 26. Raw Scotch Bonnet pepper</strong><br />
<strong>27. Dulce de leche<br />
28. Oysters<br />
29. Baklava</strong><br />
30. Bagna cauda<br />
<strong>31. Wasabi peas<br />
32. Clam chowder in a sourdough bowl<br />
33. Salted lassi<br />
34. Sauerkraut<br />
35. Root beer float</strong><br />
<span style="text-decoration:line-through;"> 36. Cognac with a fat cigar</span><br />
37. Clotted cream tea<br />
<strong>38. Vodka jelly/Jell-O<br />
39. Gumbo<br />
40. Oxtail<br />
41. Curried goat</strong><br />
<span style="text-decoration:line-through;"> 42. Whole insects</span><br />
43. Phaal<br />
44. Goat’s milk<br />
45. Malt whisky from a bottle worth £60/$120 or more<br />
46. Fugu<br />
<strong>47. Chicken tikka masala<br />
48. Eel<br />
49. Krispy Kreme original glazed doughnut</strong><br />
50. Sea urchin<br />
51. Prickly pear<br />
52. Umeboshi<br />
53. Abalone<br />
<strong>54. Paneer<br />
55. McDonald’s Big Mac Meal<br />
56. Spaetzle<br />
57. Dirty gin martini<br />
58. Beer above 8% ABV</strong><br />
<strong> 59. Poutine</strong><br />
<strong> 60. Carob chips</strong><br />
<strong> 61. S’mores</strong><br />
62. Sweetbreads<br />
<span style="text-decoration:line-through;"> 63. Kaolin</span><br />
64. Currywurst<br />
65. Durian<br />
66. Frogs’ legs<br />
<strong> 67. Beignets, churros, elephant ears or funnel cake</strong><br />
68. Haggis<br />
<strong> 69. Fried plantain</strong><br />
70. Chitterlings, or andouillette<br />
<strong> 71. Gazpacho</strong><br />
72. Caviar and blini<br />
<strong> 73. Louche absinthe</strong><br />
74. Gjetost, or brunost<br />
75. Roadkill<br />
76. Baijiu<br />
<strong> 77. Hostess Fruit Pie</strong><br />
<strong> 78. Snail</strong><br />
79. Lapsang souchong<br />
80. Bellini<br />
81. Tom yum<br />
<strong>82. Eggs Benedict<br />
83. Pocky</strong><br />
84. Tasting menu at a three-Michelin-star restaurant.<br />
85. Kobe beef<br />
<strong>86. Hare</strong><br />
87. Goulash<br />
88. Flowers<br />
<span style="text-decoration:line-through;"> 89. Horse</span><br />
90. Criollo chocolate<br />
<strong> 91. Spam</strong><br />
<strong> 92. Soft shell crab</strong><br />
93. Rose harissa<br />
<strong> 94. Catfish</strong><br />
<strong> 95. Mole poblano</strong><br />
<strong> 96. Bagel and lox</strong><br />
97. Lobster Thermidor<br />
<strong>98. Polenta<br />
99. Jamaican Blue Mountain coffee</strong><br />
100. Snake</div>
</div>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/webkist.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/webkist.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=19&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2008/08/29/ill-eat-just-about-anything/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL for getting the closest Zipcodes</title>
		<link>http://webkist.wordpress.com/2008/06/04/sql-for-getting-the-closest-zipcodes/</link>
		<comments>http://webkist.wordpress.com/2008/06/04/sql-for-getting-the-closest-zipcodes/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 19:02:35 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[geography]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://webkist.wordpress.com/?p=14</guid>
		<description><![CDATA[If you have a database of zipcodes and their latitudes and longitudes, you can use a version of this query to get the geographically closest zipcodes: SELECT b.zipcode, b.city, b.state, b.latitude, b.longitude, ACOS(SIN(RADIANS(a.latitude)) * SIN(RADIANS(b.latitude)) + COS(RADIANS(a.latitude)) * COS(RADIANS(b.latitude)) * COS(RADIANS(a.longitude - b.longitude))) as distance FROM zipcodes.zip_to_latlong a, zipcodes.zip_to_latlong b WHERE a.zipcode=? ORDER BY distance [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=14&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you have a database of zipcodes and their latitudes and longitudes, you can use a version of <a href="http://www.zcentric.com/blog/2007/03/calculate_distance_in_mysql_wi.html">this query</a> to get the geographically closest zipcodes:</p>
<pre>SELECT b.zipcode, b.city, b.state, b.latitude, b.longitude,
       ACOS(SIN(RADIANS(a.latitude))
          * SIN(RADIANS(b.latitude)) +
            COS(RADIANS(a.latitude))
          * COS(RADIANS(b.latitude))
          * COS(RADIANS(a.longitude - b.longitude))) as distance
 FROM zipcodes.zip_to_latlong a,
      zipcodes.zip_to_latlong b
WHERE a.zipcode=?
ORDER BY distance
LIMIT 20</pre>
<p>The &#8220;distance&#8221; there is&#8230;I dunno&#8230;radians? I think the original is assuming the points are on a sphere, and converts from radians to degrees to miles using the <a href="http://en.wikipedia.org/wiki/Mile#Nautical_miles">1.1515 statue miles per nautical mile</a> standard.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/webkist.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/webkist.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webkist.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webkist.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webkist.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webkist.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webkist.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webkist.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webkist.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webkist.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webkist.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webkist.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webkist.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webkist.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webkist.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webkist.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webkist.wordpress.com&amp;blog=1459179&amp;post=14&amp;subd=webkist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webkist.wordpress.com/2008/06/04/sql-for-getting-the-closest-zipcodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c080d32f94ed01529c5d140d34288fbf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mike</media:title>
		</media:content>
	</item>
	</channel>
</rss>
