<?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>langui.sh &#187; Paul Kehrer</title>
	<atom:link href="http://langui.sh/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://langui.sh</link>
	<description>Fun hacks, WP plugins, photography, and PKI junk.  Languishing since 2008.</description>
	<lastBuildDate>Tue, 17 Jan 2012 20:23:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>r509 v0.6</title>
		<link>http://langui.sh/2012/01/17/r509-v0-6/</link>
		<comments>http://langui.sh/2012/01/17/r509-v0-6/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 20:23:53 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[r509]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[x509]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1567</guid>
		<description><![CDATA[<a href="http://langui.sh/2012/01/17/r509-v0-6/" title="r509 v0.6"></a>r509 v0.6 is out. There were 39 commits encompassing the following changes from 0.5 to 0.6. * Gemfile updated to set proper versions of supporting gems for doc generation * Fixes to load_yaml in Config * OCSP handling extensively refactored &#8230;<p class="read-more"><a href="http://langui.sh/2012/01/17/r509-v0-6/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2012/01/17/r509-v0-6/" title="r509 v0.6"></a><p><a href="http://r509.org">r509</a> v0.6 is out. There were 39 commits encompassing the following changes from 0.5 to 0.6.</p>
<p>* Gemfile updated to set proper versions of supporting gems for doc generation<br />
* Fixes to load_yaml in Config<br />
* OCSP handling extensively refactored and most of the logic moved into the <a href="https://github.com/reaperhulk/r509-ocsp-responder">r509 OCSP responder</a> project.<br />
* Cert#subject_component no longer improperly upcases elements<br />
* SAN is now supported in self-signed certificates<br />
* Cert#san_names returns an empty array if no san_names exist<br />
* Cert#fingerprint is now an available method<br />
* Cert#subject_names returns a concatenation (de-duped) of CN and SANs<br />
* General refactoring in several areas to improve code quality<br />
* Csr now takes :san_names in constructor instead of :domains. This is more consistent<br />
* Files renamed to lowercase to match Ruby conventions<br />
* Cert#in_validity_range? method added<br />
* Fixed some order dependent tests</p>
<p>The majority of work went into improving the OCSP codebase, which was moved into the r509-ocsp-responder project, but that&#8217;s a subject for another blog entry!</p>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2012/01/17/r509-v0-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>r509 v0.5</title>
		<link>http://langui.sh/2011/12/27/r509-v0-5/</link>
		<comments>http://langui.sh/2011/12/27/r509-v0-5/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 04:01:50 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[r509]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1542</guid>
		<description><![CDATA[<a href="http://langui.sh/2011/12/27/r509-v0-5/" title="r509 v0.5"></a>I haven&#8217;t talked about r509 here in awhile, but since v0.5 just got tagged I thought I&#8217;d plug it again. r509 is a wrapper for the OpenSSL libraries in Ruby. It&#8217;s designed to allow you to do a wide variety &#8230;<p class="read-more"><a href="http://langui.sh/2011/12/27/r509-v0-5/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2011/12/27/r509-v0-5/" title="r509 v0.5"></a><p>I haven&#8217;t talked about <a href="http://r509.org">r509</a> here in awhile, but since v0.5 just got tagged I thought I&#8217;d plug it again. r509 is a wrapper for the OpenSSL libraries in Ruby. It&#8217;s designed to allow you to do a wide variety of certificate authority related operations (issuance, revocation, CRL generation, OCSP responses, et cetera). There are also some ancillary gems that are under active development (<a href="https://github.com/sirsean/r509-ca-http">r509-ca-http</a>, <a href="https://github.com/reaperhulk/r509-ocsp-responder">r509-ocsp-responder</a>, <a href="https://github.com/sirsean/r509-validity-redis">r509-validity-redis</a>) which will gain more documentation as these projects progress.</p>
<p>Check it out, file issues, fork, and contribute!</p>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/12/27/r509-v0-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby OpenSSL::X509::Name#to_a Dissection</title>
		<link>http://langui.sh/2011/12/21/ruby-opensslx509nameto_a-dissection/</link>
		<comments>http://langui.sh/2011/12/21/ruby-opensslx509nameto_a-dissection/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 21:54:31 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1559</guid>
		<description><![CDATA[<a href="http://langui.sh/2011/12/21/ruby-opensslx509nameto_a-dissection/" title="Ruby OpenSSL::X509::Name#to_a Dissection"></a>Over at Viking Hammer my coworker Sean Schulte has written up a great article dissecting an issue we ran into regarding the way Ruby&#8217;s OpenSSL::X509::Name#to_a currently builds its array. He discusses the problem, the two solutions we came up with, &#8230;<p class="read-more"><a href="http://langui.sh/2011/12/21/ruby-opensslx509nameto_a-dissection/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2011/12/21/ruby-opensslx509nameto_a-dissection/" title="Ruby OpenSSL::X509::Name#to_a Dissection"></a><p>Over at <a href="http://vikinghammer.com">Viking Hammer</a> my coworker Sean Schulte has written up a <a href="http://vikinghammer.com/2011/12/21/ruby-opensslx509name-throws-away-unknown-subject-component-names/">great article</a> dissecting an issue we ran into regarding the way Ruby&#8217;s OpenSSL::X509::Name#to_a currently builds its array. He discusses the problem, the two solutions we came up with, and shares code examples. Go check it out!</p>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/12/21/ruby-opensslx509nameto_a-dissection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Hooks For Pre-Commit Rspec Testing</title>
		<link>http://langui.sh/2011/12/19/git-hooks-for-pre-commit-rspec-testing/</link>
		<comments>http://langui.sh/2011/12/19/git-hooks-for-pre-commit-rspec-testing/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 03:12:12 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1554</guid>
		<description><![CDATA[<a href="http://langui.sh/2011/12/19/git-hooks-for-pre-commit-rspec-testing/" title="Git Hooks For Pre-Commit Rspec Testing"></a>Here&#8217;s a pair of scripts for automatically running Ruby rspec tests, refusing to commit if they fail, and pulling in the results into the commit msg. If you want to use them place them in your project&#8217;s .git/hooks directory as &#8230;<p class="read-more"><a href="http://langui.sh/2011/12/19/git-hooks-for-pre-commit-rspec-testing/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2011/12/19/git-hooks-for-pre-commit-rspec-testing/" title="Git Hooks For Pre-Commit Rspec Testing"></a><p>Here&#8217;s a pair of scripts for automatically running Ruby rspec tests, refusing to commit if they fail, and pulling in the results into the commit msg. If you want to use them place them in your project&#8217;s .git/hooks directory as executable scripts.</p>
<p>These scripts assume you have rspec writing to rspec_results.html. To do this by default add a .rspec file in your project dir with &#8220;-f doc -f h -o rspec_results.html&#8221; inside.</p>
<p>pre-commit</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'pty'</span>
html_path = <span style="color:#996600;">&quot;rspec_results.html&quot;</span>  
<span style="color:#008000; font-style:italic;">#PTY.spawn trick from</span>
<span style="color:#008000; font-style:italic;">#http://stackoverflow.com/questions/1154846/continuously-read-from-stdout-of-external-process-in-ruby</span>
<span style="color:#9966CC; font-weight:bold;">begin</span>
	PTY.<span style="color:#9900CC;">spawn</span><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#996600;">&quot;rake spec&quot;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>stdin, stdout, pid<span style="color:#006600; font-weight:bold;">|</span>
	<span style="color:#9966CC; font-weight:bold;">begin</span>
		stdin.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>line<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC0066; font-weight:bold;">print</span> line <span style="color:#006600; font-weight:bold;">&#125;</span>
	<span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#CC00FF; font-weight:bold;">Errno</span>::EIO
		<span style="color:#9966CC; font-weight:bold;">end</span>
	<span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#6666ff; font-weight:bold;">PTY::ChildExited</span>
	<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;The child process exited!&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># find out how many errors were found  </span>
html = <span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>html_path<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">read</span>  
examples = html.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>\d<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span> examples<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006666;">0</span>  
failures = html.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>\d<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span> failures<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006666;">0</span>  
<span style="color:#9966CC; font-weight:bold;">if</span> failures == <span style="color:#006666;">0</span> <span style="color:#9966CC; font-weight:bold;">then</span>
	failures = html.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>\d<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span> failure<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006666;">0</span>  
<span style="color:#9966CC; font-weight:bold;">end</span>
pending = html.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>\d<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span> pending<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006666;">0</span>  
&nbsp;
<span style="color:#9966CC; font-weight:bold;">if</span> failures.<span style="color:#9900CC;">zero</span>?  
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;0 failed! #{examples} run, #{pending} pending&quot;</span>  
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;View rspec results at #{File.expand_path(html_path)}&quot;</span>  
  <span style="color:#CC0066; font-weight:bold;">sleep</span> <span style="color:#006666;">1</span>
  <span style="color:#CC0066; font-weight:bold;">exit</span> <span style="color:#006666;">0</span>
<span style="color:#9966CC; font-weight:bold;">else</span>  
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;<span style="color:#000099;">\a</span>DID NOT COMMIT YOUR FILES!&quot;</span>  
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;View rspec results at #{File.expand_path(html_path)}&quot;</span>  
  <span style="color:#CC0066; font-weight:bold;">puts</span>  
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;#{failures} failed! #{examples} run, #{pending} pending&quot;</span>  
  <span style="color:#996600;">`open #{html_path}`</span>
  <span style="color:#CC0066; font-weight:bold;">exit</span> <span style="color:#006666;">1</span>  
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>prepare-commit-msg</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span>
html_path = <span style="color:#996600;">&quot;rspec_results.html&quot;</span>
<span style="color:#008000; font-style:italic;"># find out how many errors were found  </span>
html = <span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>html_path<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">read</span>
examples = html.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>\d<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span> examples<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006666;">0</span>
failures = html.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>\d<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span> failures<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006666;">0</span>
<span style="color:#9966CC; font-weight:bold;">if</span> failures == <span style="color:#006666;">0</span> <span style="color:#9966CC; font-weight:bold;">then</span>
        failures = html.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>\d<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span> failure<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006666;">0</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
pending = html.<span style="color:#9900CC;">match</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>\d<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#41;</span> pending<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_i</span> <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006666;">0</span>
&nbsp;
&nbsp;
message_file = ARGV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>
message = <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">read</span><span style="color:#006600; font-weight:bold;">&#40;</span>message_file<span style="color:#006600; font-weight:bold;">&#41;</span>
index = message.<span style="color:#9900CC;">index</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'# Please enter the commit message for your changes. Lines starting'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
message.<span style="color:#9900CC;">insert</span><span style="color:#006600; font-weight:bold;">&#40;</span>index<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1</span>, <span style="color:#996600;">&quot;<span style="color:#000099;">\n</span><span style="color:#000099;">\n</span>#{failures} failed! #{examples} run, #{pending} pending&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span>message_file,<span style="color:#996600;">'w'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span>
        f.<span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span>message<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/12/19/git-hooks-for-pre-commit-rspec-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Growl For turntable.fm</title>
		<link>http://langui.sh/2011/12/14/growl-for-turntable-fm/</link>
		<comments>http://langui.sh/2011/12/14/growl-for-turntable-fm/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 01:54:35 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1545</guid>
		<description><![CDATA[<a href="http://langui.sh/2011/12/14/growl-for-turntable-fm/" title="Growl For turntable.fm"></a>turntable.fm is a fun place to discover new music and play it for your friends, but it&#8217;s frustrating to use at work since you have to switch to the tab to see what song is playing and who&#8217;s saying what. &#8230;<p class="read-more"><a href="http://langui.sh/2011/12/14/growl-for-turntable-fm/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2011/12/14/growl-for-turntable-fm/" title="Growl For turntable.fm"></a><p>turntable.fm is a fun place to discover new music and play it for your friends, but it&#8217;s frustrating to use at work since you have to switch to the tab to see what song is playing and who&#8217;s saying what. I wrote a <a href="http://fluidapp.com">Fluid</a> userscript that you can use to growl songs and chat lines to solve this problem. It also prevents idle timeouts from occuring in turntable if you don&#8217;t interact with it for awhile.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> debug <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> sendChat <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
logger<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'loading userscript'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> bindDOM<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    logger<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'binding'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.messages'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'DOMNodeInserted'</span><span style="color: #339933;">,</span>parseChat<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #000066;">blur</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        sendChat <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #000066;">focus</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        sendChat <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> parseChat<span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> message <span style="color: #339933;">=</span> event.<span style="color: #660066;">target</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> author <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>message<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.speaker'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> body <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>message<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.text'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>body.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'started playing'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> artist <span style="color: #339933;">=</span> body.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/by (.*)/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> song <span style="color: #339933;">=</span> body.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/&quot;(.+)&quot;/</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        logger<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'growling now'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        logger<span style="color: #009900;">&#40;</span>artist<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        logger<span style="color: #009900;">&#40;</span>song<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        showGrowl<span style="color: #009900;">&#40;</span>artist<span style="color: #339933;">,</span>song<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
        body <span style="color: #339933;">=</span> body.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>sendChat<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            showGrowl<span style="color: #009900;">&#40;</span>author<span style="color: #339933;">,</span>body<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> showGrowl<span style="color: #009900;">&#40;</span>title<span style="color: #339933;">,</span>description<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    window.<span style="color: #660066;">fluid</span>.<span style="color: #660066;">showGrowlNotification</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
        title<span style="color: #339933;">:</span> title<span style="color: #339933;">,</span> 
        description<span style="color: #339933;">:</span> description<span style="color: #339933;">,</span> 
        priority<span style="color: #339933;">:</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> 
        sticky<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
        identifier<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;sh.langui.turntable&quot;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> idlePreventer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    logger<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'invoking idle preventer'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.addSongsButton'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.cancelButton'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> logger<span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>debug<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
setTimeout<span style="color: #009900;">&#40;</span>bindDOM<span style="color: #339933;">,</span><span style="color: #CC0000;">5000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
setInterval<span style="color: #009900;">&#40;</span>idlePreventer<span style="color: #339933;">,</span><span style="color: #CC0000;">300000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>You&#8217;ll need a licensed version of Fluid to use this userscript.</p>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/12/14/growl-for-turntable-fm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS 4.3.5 Certificate Handling Vulnerability</title>
		<link>http://langui.sh/2011/07/25/ios-4-3-5-certificate-handling-vulnerability/</link>
		<comments>http://langui.sh/2011/07/25/ios-4-3-5-certificate-handling-vulnerability/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 20:32:54 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1514</guid>
		<description><![CDATA[<a href="http://langui.sh/2011/07/25/ios-4-3-5-certificate-handling-vulnerability/" title="iOS 4.3.5 Certificate Handling Vulnerability"></a>Apple released a new iOS today to fix a bug I reported. More info here. I&#8217;ll also be giving a talk with Nick Percoco about this and other SSL issues in mobile OSes at DEFCON 19. Hope to see you &#8230;<p class="read-more"><a href="http://langui.sh/2011/07/25/ios-4-3-5-certificate-handling-vulnerability/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2011/07/25/ios-4-3-5-certificate-handling-vulnerability/" title="iOS 4.3.5 Certificate Handling Vulnerability"></a><p>Apple released a new iOS today to fix a bug I reported. More info <a href="https://www.trustwave.com/spiderlabs/advisories/TWSL2011-007.txt">here</a>. I&#8217;ll also be giving a talk with Nick Percoco about this and other SSL issues in mobile OSes at DEFCON 19. Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/07/25/ios-4-3-5-certificate-handling-vulnerability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unhide ~/Library in OS X 10.7 Lion</title>
		<link>http://langui.sh/2011/07/09/unhide-library-in-os-x-10-7-lion/</link>
		<comments>http://langui.sh/2011/07/09/unhide-library-in-os-x-10-7-lion/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 21:32:35 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1507</guid>
		<description><![CDATA[<a href="http://langui.sh/2011/07/09/unhide-library-in-os-x-10-7-lion/" title="Unhide ~/Library in OS X 10.7 Lion"></a>Lion hides the user home directory by default. You can navigate to it with cmd-shift-G easily, but if you happen to want it to be visible all the time just run this command in a Terminal.app window. chflags nohidden ~/Library &#8230;<p class="read-more"><a href="http://langui.sh/2011/07/09/unhide-library-in-os-x-10-7-lion/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2011/07/09/unhide-library-in-os-x-10-7-lion/" title="Unhide ~/Library in OS X 10.7 Lion"></a><p>Lion hides the user home directory by default. You can navigate to it with cmd-shift-G easily, but if you happen to want it to be visible all the time just run this command in a Terminal.app window.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">chflags nohidden ~<span style="color: #000000; font-weight: bold;">/</span>Library</pre></div></div>

<p>Thanks to <a href="http://twitter.com/#!/pennig">Matt Pennig</a> for the command.</p>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/07/09/unhide-library-in-os-x-10-7-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mongo Monitoring Via Mongo Live In Safari 5</title>
		<link>http://langui.sh/2011/06/01/mongo-monitoring-via-mongo-live-in-safari-5/</link>
		<comments>http://langui.sh/2011/06/01/mongo-monitoring-via-mongo-live-in-safari-5/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 22:50:52 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1496</guid>
		<description><![CDATA[<a href="http://langui.sh/2011/06/01/mongo-monitoring-via-mongo-live-in-safari-5/" title="Mongo Monitoring Via Mongo Live In Safari 5"></a>We&#8217;ve recently started integrating MongoDB more extensively into our systems at work and found ourselves wanting some basic monitoring during dev to see what the DB was doing. A friend suggested Mongo Live, which fit the bill but was only &#8230;<p class="read-more"><a href="http://langui.sh/2011/06/01/mongo-monitoring-via-mongo-live-in-safari-5/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2011/06/01/mongo-monitoring-via-mongo-live-in-safari-5/" title="Mongo Monitoring Via Mongo Live In Safari 5"></a><p>We&#8217;ve recently started integrating MongoDB more extensively into our systems at work and found ourselves wanting some basic monitoring during dev to see what the DB was doing. A friend suggested <a href="https://github.com/deftlabs/mongo-live">Mongo Live</a>, which fit the bill but was only compatible with Chrome. Since I switch frequently between Safari and Chrome I decided to port it.</p>
<p>Fortunately the extension for Chrome required only minimal changes to get it working in Safari. The most significant change is that the Safari extension uses a toolbar button to activate. The fork is available on <a href="https://github.com/reaperhulk/mongo-live">Github</a> and supports Chrome and Safari. Hopefully someone finds it helpful!</p>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/06/01/mongo-monitoring-via-mongo-live-in-safari-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Revocation Article</title>
		<link>http://langui.sh/2011/04/04/revocation-article/</link>
		<comments>http://langui.sh/2011/04/04/revocation-article/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 16:09:25 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1486</guid>
		<description><![CDATA[<a href="http://langui.sh/2011/04/04/revocation-article/" title="Revocation Article"></a>I&#8217;ve posted an article about the current state of X.509 revocation on the internet over at the Spiderlabs blog. Check out Defective By Design? &#8211; Certificate Revocation Behavior In Modern Browsers!]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2011/04/04/revocation-article/" title="Revocation Article"></a><p>I&#8217;ve posted an article about the current state of X.509 revocation on the internet over at the Spiderlabs blog. Check out <a href="http://blog.spiderlabs.com/2011/04/certificate-revocation-behavior-in-modern-browsers.html">Defective By Design? &#8211; Certificate Revocation Behavior In Modern Browsers</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/04/04/revocation-article/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using dd in OS X</title>
		<link>http://langui.sh/2011/04/02/using-dd-in-os-x/</link>
		<comments>http://langui.sh/2011/04/02/using-dd-in-os-x/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 04:28:05 +0000</pubDate>
		<dc:creator>Paul Kehrer</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[diskutil]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1478</guid>
		<description><![CDATA[<a href="http://langui.sh/2011/04/02/using-dd-in-os-x/" title="Using dd in OS X"></a>Doing device level copies with dd is a reasonably common Linux task, but not something OS X users typically do. However, if you find yourself needing to write an image file1 to a microSD card or some other media then &#8230;<p class="read-more"><a href="http://langui.sh/2011/04/02/using-dd-in-os-x/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://langui.sh/2011/04/02/using-dd-in-os-x/" title="Using dd in OS X"></a><p>Doing device level copies with dd is a reasonably common Linux task, but not something OS X users typically do. However, if you find yourself needing to write an image file<sup class='footnote'><a href='#fn-1478-1' id='fnref-1478-1'>1</a></sup> to a microSD card or some other media then here&#8217;s a simple guide to using it.</p>
<p>First, you&#8217;ll want to see the device labels.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">diskutil list
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>disk0
   <span style="color: #666666; font-style: italic;">#:                       TYPE NAME                    SIZE       IDENTIFIER</span>
   <span style="color: #000000;">0</span>:      GUID_partition_scheme                        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">250.1</span> GB   disk0
   <span style="color: #000000;">1</span>:                        EFI                         <span style="color: #000000;">209.7</span> MB   disk0s1
   <span style="color: #000000;">2</span>:                  Apple_HFS Macintosh HD            <span style="color: #000000;">249.7</span> GB   disk0s2
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>disk2
   <span style="color: #666666; font-style: italic;">#:                       TYPE NAME                    SIZE       IDENTIFIER</span>
   <span style="color: #000000;">0</span>:     FDisk_partition_scheme                        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2.0</span> GB     disk2
   <span style="color: #000000;">1</span>:                 DOS_FAT_32 THUMB_DRIVE             <span style="color: #000000;">2.0</span> GB     disk2s1</pre></div></div>

<p>The output from above shows that we have a mounted 2GB USB flash drive named &#8220;THUMB_DRIVE&#8221; that has been given the identifier /dev/disk2. To write to it we need to unmount it, but ejecting it in the normal Mac way won&#8217;t work here.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">diskutil unmountDisk <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>disk2</pre></div></div>

<p>There we go! Now we just need to write our image file.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=inputfile.img <span style="color: #007800;">of</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>disk2</pre></div></div>

<p>The shell will appear to hang, but you can check disk activity to see that it&#8217;s writing. Once the command returns you&#8217;re done!</p>
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-1478-1'>Frequently these guides will talk about using Win32DiskImager on Windows <span class='footnotereverse'><a href='#fnref-1478-1'>&#8617;</a></span></li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/04/02/using-dd-in-os-x/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached
Database Caching 30/82 queries in 0.029 seconds using memcached
Object Caching 1326/1420 objects using memcached

Served from: langui.sh @ 2012-02-04 13:40:05 -->
