<?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</title>
	<atom:link href="http://langui.sh/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[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[<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[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[<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[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[<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[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[<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[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[<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[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[<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[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[<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>How to install qcachegrind (kcachegrind) on Mac OSX Snow Leopard</title>
		<link>http://langui.sh/2011/06/16/how-to-install-qcachegrind-kcachegrind-on-mac-osx-snow-leopard/</link>
		<comments>http://langui.sh/2011/06/16/how-to-install-qcachegrind-kcachegrind-on-mac-osx-snow-leopard/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 18:49:14 +0000</pubDate>
		<dc:creator>justfalter</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://langui.sh/?p=1501</guid>
		<description><![CDATA[Guest post by Mike! I had originally posted this as a gist on github, but Paul selflessly insisted that I blog about it, so here you go. I like to use kcachegrind for doing profiling of my ruby code via &#8230;<p class="read-more"><a href="http://langui.sh/2011/06/16/how-to-install-qcachegrind-kcachegrind-on-mac-osx-snow-leopard/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><em>Guest post by Mike! I had originally posted this as a <a href="https://gist.github.com/1029580">gist</a> on github, but Paul <a title="selflessly insisted" href="https://twitter.com/#!/reaperhulk/status/81395560162136064">selflessly insisted</a> that I blog about it, so here you go.</em><em></em></p>
<p>I like to use <a title="kcachegrind" href="http://kcachegrind.sourceforge.net/html/Home.html">kcachegrind</a> for doing profiling of my ruby code via <a title="ruby-prof" href="http://github.com/rdp/ruby-prof">ruby-prof</a>. This works fantastically if you&#8217;re on a platform that has KDE installed. However, most of my development is done on OSX, and while you can install kcachegrind via macports, it takes hours and hours because it has to build KDE, as well. Much to my surprise, the fine folks who wrote kcachegrind also made a QT version, qcachegrind. I was able to build this on OSX in about 10 minutes without too much effort, only having to install QT and GraphViz. Yippie!</p>
<p>I should note that I&#8217;m running OSX 10.6.7, with Xcode 4. My default gcc/g++ version is 4.2. I&#8217;m sure it will build just fine on earlier versions of Xcode, but I haven&#8217;t tested it.</p>
<h3>Step 1: Install QT</h3>
<p>You could do this via &#8220;brew install qt&#8221; if you have <a title="homebrew" href="http://mxcl.github.com/homebrew/">homebrew</a>, but this takes a long time, so I downloaded the binary distribution of version 4.7.3 for OSX 10.5/10.6 from <a title="this page" href="http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x/">this page</a>. Installing is easy: open up the dmg, and install QT via the mpkg file contained within.</p>
<h3>Step 2: Install Graphviz</h3>
<p>Second, you should install <a title="Graphviz" href="http://www.graphviz.org/">Graphviz</a> so that qcachegrind can generate pretty call graphs for you. Like before, you could install this via &#8220;brew install graphviz&#8221;, but this also takes a really long time and I&#8217;m super impatient, so I just downloaded the latest binary installer from <a title="this page" href="http://www.graphviz.org/Download_macos.php">this page</a>.</p>
<div>The only component of Graphviz that qcachegrind uses, to the best of my knowledge, is the <em>dot</em> binary. By default, the Graphviz installer drops <em>dot</em> to <em>/usr/local/bin/dot</em>, which qcachgrind.app might not find since /usr/local/bin isn&#8217;t in PATH by default (at least, not on my system). In order</div>
<div># to ensure that qcachegrind can find <em>dot</em>, I created a symlink from /usr/bin/dot to /usr/local/bin/dot:</div>
<pre>sudo ln -s /usr/local/bin/dot /usr/bin/dot</pre>
<h3>Step 3: Building qcachegrind</h3>
<p>This is actually simple. Check out the source code for kcachegrind and switch to the qcachegrind directory:</p>
<pre>svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdesdk/kcachegrind kcachegrind
cd kcachegrind/qcachegrind</pre>
<p>You build the application by running &#8216;qmake&#8217;, a QT utility that can generate a boring-old Makefile, if we ask it nicely enough. By default, qmake wanted to build an xcode project on my box. I pointed it at spec profile that generates a Makefile that will build using g++, and things seemed to work fine. You can see all the profiles available in this directory: /usr/local/Qt4.7/mkspecs. This command also managed to spit out a whole bunch of errors and warnings, yet everything seemed to build properly.</p>
<pre>qmake -spec 'macx-g++'
make</pre>
<h3>Step 4: Enjoy!</h3>
<p>You should now have a beautiful little &#8220;qcachegrind.app&#8221; sitting in your build directory. You can run this directly via &#8220;open qcachegrind.app&#8221;, or you can drop it in your /Applications directory for easy access.</p>
<h3>Update (Aug 30, 2011):</h3>
<ul>
<li>I removed the step where I would apply a patch that added the ability to open any file name. The qcachegrind source has since been updated to include a functionally identical change.</li>
<li>There are several comments about installing Qt via brew, and trying to build qcachegrind using that, yet failing. John Rood, looking to enable other gluttons for punishment, suggested installing Qt like so will get you on your way
<pre>brew install qt --with-qt3support</pre>
<p>(I haven&#8217;t tested this out, myself).</li>
<li>For those who have installed Qt via brew and are having problems: try uninstalling it if you&#8217;re not using it for anything else (&#8216;brew uninstall qt&#8217;). You may or may not have to reinstall the binary version, afterward; I&#8217;m not sure.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://langui.sh/2011/06/16/how-to-install-qcachegrind-kcachegrind-on-mac-osx-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>23</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[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[<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[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[<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>
	</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 10/66 queries in 0.023 seconds using memcached
Object Caching 926/1028 objects using memcached

Served from: langui.sh @ 2012-02-04 11:38:27 -->
