<?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>Sam Pierson&#039;s Blog</title>
	<atom:link href="http://sampierson.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://sampierson.com/blog</link>
	<description>Augmentation of an Imperfect Memory.</description>
	<lastBuildDate>Wed, 21 Jul 2010 01:41:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How do dump a Javascript object&#8217;s methods</title>
		<link>http://sampierson.com/blog/software-development/how-do-dump-a-javascript-objects-methods/</link>
		<comments>http://sampierson.com/blog/software-development/how-do-dump-a-javascript-objects-methods/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 01:41:32 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=695</guid>
		<description><![CDATA[
&#160;
for&#40;var i in objectname&#41; &#123;console.log&#40;i&#41;;&#125;

]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&nbsp;
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #000066; font-weight: bold;">in</span> objectname<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>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/how-do-dump-a-javascript-objects-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decoding the Rails session cookie</title>
		<link>http://sampierson.com/blog/uncategorized/decoding-the-rails-session-cookie/</link>
		<comments>http://sampierson.com/blog/uncategorized/decoding-the-rails-session-cookie/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 14:10:45 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=689</guid>
		<description><![CDATA[
&#160;
Marshal.load&#40;Base64.decode64&#40;CGI.unescape&#40;cookie.split&#40;&#34;\n&#34;&#41;.join&#41;.split&#40;'--'&#41;.first&#41;&#41;

As found here.
Update: you can dump your session and verify your session signature using:

&#160;
secret = &#34;your session secret&#34; # from config/initializers/session_store.rb
verifier = ActiveSupport::MessageVerifier.new&#40;secret&#41;
signed_message = CGI.unescape&#40;cookie.split&#40;&#34;\n&#34;&#41;.join
verifier.verify&#40;signed_message&#41;

]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
<span style="color:#CC00FF; font-weight:bold;">Marshal</span>.<span style="color:#CC0066; font-weight:bold;">load</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">Base64</span>.<span style="color:#9900CC;">decode64</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">CGI</span>.<span style="color:#9900CC;">unescape</span><span style="color:#006600; font-weight:bold;">&#40;</span>cookie.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;<span style="color:#000099;">\n</span>&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">join</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'--'</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">first</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>As found <a href="http://yanpritzker.com/2008/07/16/debugging-technique-for-rails-decode-the-session-cookie/">here</a>.</p>
<p>Update: you can dump your session <strong>and</strong> verify your session signature using:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
secret = <span style="color:#996600;">&quot;your session secret&quot;</span> <span style="color:#008000; font-style:italic;"># from config/initializers/session_store.rb</span>
verifier = <span style="color:#6666ff; font-weight:bold;">ActiveSupport::MessageVerifier</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>secret<span style="color:#006600; font-weight:bold;">&#41;</span>
signed_message = <span style="color:#CC00FF; font-weight:bold;">CGI</span>.<span style="color:#9900CC;">unescape</span><span style="color:#006600; font-weight:bold;">&#40;</span>cookie.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;<span style="color:#000099;">\n</span>&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">join</span>
verifier.<span style="color:#9900CC;">verify</span><span style="color:#006600; font-weight:bold;">&#40;</span>signed_message<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/uncategorized/decoding-the-rails-session-cookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to optimize a Solr index from Sunspot</title>
		<link>http://sampierson.com/blog/software-development/how-to-optimize-a-solr-index-from-sunspot/</link>
		<comments>http://sampierson.com/blog/software-development/how-to-optimize-a-solr-index-from-sunspot/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 03:37:10 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[solr]]></category>
		<category><![CDATA[sunspot]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=678</guid>
		<description><![CDATA[It doesn&#8217;t look like SunSpot has a builtin optimize command.
Here&#8217;s one way you can do it:

&#160;
Sunspot.session.session.send&#40;:connection&#41;.update RSolr::Message::Generator.new.build &#123; &#124;b&#124; b.optimize &#125;

Anyone know of a simpler one?
]]></description>
			<content:encoded><![CDATA[<p>It doesn&#8217;t look like SunSpot has a builtin optimize command.<br />
Here&#8217;s one way you can do it:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
Sunspot.<span style="color:#9900CC;">session</span>.<span style="color:#9900CC;">session</span>.<span style="color:#9900CC;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:connection</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">update</span> <span style="color:#6666ff; font-weight:bold;">RSolr::Message::Generator</span>.<span style="color:#9900CC;">new</span>.<span style="color:#9900CC;">build</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>b<span style="color:#006600; font-weight:bold;">|</span> b.<span style="color:#9900CC;">optimize</span> <span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>Anyone know of a simpler one?</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/how-to-optimize-a-solr-index-from-sunspot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A whole new level of Fluid Layout</title>
		<link>http://sampierson.com/blog/uncategorized/a-whole-new-level-of-fluid-layout/</link>
		<comments>http://sampierson.com/blog/uncategorized/a-whole-new-level-of-fluid-layout/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 03:24:15 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=686</guid>
		<description><![CDATA[Courtesy of Jacob Maine:
This is a whole different level of fluid layouts: http://hicksdesign.co.uk/journal/finally-a-fluid-hicksdesign.  Worth playing with.
And the tools it&#8217;s based on: http://www.alistapart.com/articles/responsive-web-design
]]></description>
			<content:encoded><![CDATA[<p>Courtesy of Jacob Maine:</p>
<p>This is a whole different level of fluid layouts: <a href="http://hicksdesign.co.uk/journal/finally-a-fluid-hicksdesign">http://hicksdesign.co.uk/journal/finally-a-fluid-hicksdesign</a>.  Worth playing with.</p>
<p>And the tools it&#8217;s based on: <a href="http://www.alistapart.com/articles/responsive-web-design">http://www.alistapart.com/articles/responsive-web-design</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/uncategorized/a-whole-new-level-of-fluid-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resque</title>
		<link>http://sampierson.com/blog/software-development/resque/</link>
		<comments>http://sampierson.com/blog/software-development/resque/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 03:15:14 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[resque]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=683</guid>
		<description><![CDATA[Github&#8217;s excellent analysis of the extant background jobs runners and introduction to Resque
]]></description>
			<content:encoded><![CDATA[<p>Github&#8217;s excellent analysis of the extant background jobs runners and <a href="http://github.com/blog/542-introducing-resque">introduction to Resque</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/resque/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selenium-RC and Snow Leopard</title>
		<link>http://sampierson.com/blog/software-development/selenium-rc-and-snow-leopard/</link>
		<comments>http://sampierson.com/blog/software-development/selenium-rc-and-snow-leopard/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 00:47:34 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=661</guid>
		<description><![CDATA[Selenium-RC was having issues on Snow Leopard:

&#160;
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0

Web searches produced a lot of information including some workarounds that didn&#8217;t.  Finally I read that Selenium-RC 1.x has some hardcoded paths in it that mean it won&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Selenium-RC was having issues on Snow Leopard:</p>

<div class="wp_syntax"><div class="code"><pre class="foo" style="font-family:monospace;">&nbsp;
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0</pre></div></div>

<p>Web searches produced a lot of information including some workarounds that didn&#8217;t.  Finally I read that Selenium-RC 1.x has some hardcoded paths in it that mean it won&#8217;t work with Snow Leopard, and you need to get the Selenium-RC 2.x jar (alpha at this time).  The easiest way to do this is to install the <a href="http://gemcutter.org/gems/selenium-rc">selenium-rc gem</a> that <a href="http://github.com/pivotal/selenium-rc">Pivotal packaged</a>.</p>
<p>[Update]</p>
<p>More recently,  have been having issues running Cucumber/Webrat/Selenium on new MacOS systems.  It turns out that Webrat contains an out-of-date version of the selenium server jar file.  If you are using Webrat, you need to copy the good selenium-server.jar from the selenium-rc package over the version contained in the Webrat gem.  Something like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Ruby<span style="color: #000000; font-weight: bold;">/</span>Gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>selenium-rc-2.2.1<span style="color: #000000; font-weight: bold;">/</span>vendor<span style="color: #000000; font-weight: bold;">/</span>selenium-server.jar <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Ruby<span style="color: #000000; font-weight: bold;">/</span>Gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span>webrat-0.7.0<span style="color: #000000; font-weight: bold;">/</span>vendor<span style="color: #000000; font-weight: bold;">/</span>selenium-server.jar</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/selenium-rc-and-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RubyMine not recognizing cucumber features</title>
		<link>http://sampierson.com/blog/software-development/rubymine-not-recognizing-cucumber-features/</link>
		<comments>http://sampierson.com/blog/software-development/rubymine-not-recognizing-cucumber-features/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 22:19:23 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rubymine]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=658</guid>
		<description><![CDATA[If RubyMine isn&#8217;t recognizing cucumber features, ensure the following:

Cucumber gem is attached to project: RM &#124; Settings &#124; Ruby SDK and Gems &#124; Attach gems.
If you edited *.feature files in early version of RubyMine it may be mapped on Text file. So you should check that *.feature extension is mapped on &#8220;Cucumber scenario files&#8221; in [...]]]></description>
			<content:encoded><![CDATA[<p>If RubyMine isn&#8217;t recognizing cucumber features, ensure the following:</p>
<ol>
<li>Cucumber gem is attached to project: RM | Settings | Ruby SDK and Gems | Attach gems.</li>
<li>If you edited *.feature files in early version of RubyMine it may be mapped on Text file. So you should check that *.feature extension is mapped on &#8220;Cucumber scenario files&#8221; in RM | Settings | File Types |  Recognized File Types.</li>
</ol>
<p>per <a href="http://www.jetbrains.net/devnet/message/5238832#5238832">Roman at JetBrains</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/rubymine-not-recognizing-cucumber-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Superstar Developers</title>
		<link>http://sampierson.com/blog/software-development/superstar-developers/</link>
		<comments>http://sampierson.com/blog/software-development/superstar-developers/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 17:11:57 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=655</guid>
		<description><![CDATA[Zed Shaw is at it again.  This is an excellent post, that contains much truth: 3 Simple Rules That Will Make You a ‘Superstar’ Developer.
Which also provoked a great comment.
]]></description>
			<content:encoded><![CDATA[<p>Zed Shaw is at it again.  This is an excellent post, that contains much truth: <a href="http://coderoom.wordpress.com/2010/01/28/3-simple-rules-that-will-make-you-a-superstar-developer/">3 Simple Rules That Will Make You a ‘Superstar’ Developer</a>.</p>
<p>Which also provoked a <a href="http://coderoom.wordpress.com/2010/02/01/the-best-comment-ever-no-i-didnt-write-it/">great comment</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/superstar-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Synergy keyboard/mouse sharing</title>
		<link>http://sampierson.com/blog/uncategorized/setting-up-synergy-keyboardmouse-sharing/</link>
		<comments>http://sampierson.com/blog/uncategorized/setting-up-synergy-keyboardmouse-sharing/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 17:55:02 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=649</guid>
		<description><![CDATA[Download synergy from http://sourceforge.net/projects/synergy2/files/ and install on the machines you want to participate in sharing.  For this example let&#8217;s say I two systems with hostnames notebook and desktop, and I want to share the keyboard and mouse of desktop.
Create a configuration file, something like this:

&#160;
section: screens
  mydesktop:
  mynotebook:
end
&#160;
section: links
  mynotebook:
  [...]]]></description>
			<content:encoded><![CDATA[<p>Download synergy from <a href="http://sourceforge.net/projects/synergy2/files/">http://sourceforge.net/projects/synergy2/files/</a> and install on the machines you want to participate in sharing.  For this example let&#8217;s say I two systems with hostnames <em>notebook</em> and <em>desktop</em>, and I want to share the keyboard and mouse of <em>desktop</em>.</p>
<p>Create a configuration file, something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;">&nbsp;
section: screens
  mydesktop:
  mynotebook:
end
&nbsp;
section: links
  mynotebook:
    left = mydesktop
&nbsp;
  mydesktop:
    right = mynotebook
end</pre></div></div>

<p>On <em>desktop</em> run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
synergys <span style="color: #660033;">-f</span> <span style="color: #660033;">--config</span> synergy.conf</pre></div></div>

<p>On <em>notebook</em> run:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">&nbsp;
synergyc <span style="color: #660033;">-f</span> desktop</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/uncategorized/setting-up-synergy-keyboardmouse-sharing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy rspec matchers</title>
		<link>http://sampierson.com/blog/software-development/easy-rspec-matchers/</link>
		<comments>http://sampierson.com/blog/software-development/easy-rspec-matchers/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 00:04:09 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=646</guid>
		<description><![CDATA[http://rspec.rubyforge.org/rspec/1.2.9/classes/Spec/Matchers.html
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rspec.rubyforge.org/rspec/1.2.9/classes/Spec/Matchers.html">http://rspec.rubyforge.org/rspec/1.2.9/classes/Spec/Matchers.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/software-development/easy-rspec-matchers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
