<?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 &#187; Uncategorized</title>
	<atom:link href="http://sampierson.com/blog/category/uncategorized/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>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>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>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>Upgrading to Snow Leopard</title>
		<link>http://sampierson.com/blog/uncategorized/upgrading-to-snow-leopard/</link>
		<comments>http://sampierson.com/blog/uncategorized/upgrading-to-snow-leopard/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 15:48:09 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=610</guid>
		<description><![CDATA[Somewhat following the instructions from rubyonrails.org:

Install Snow Leopard from DVD.
Install XCode tools from Optional Installs on same DVD.
Start 1Password &#8211; install 1Password3 when prompted.
Evernote Safari clipper seemed to be overwriting the 1Password button in Safari.  Upgraded Evernote to release candidate, still had problem.  Disabled Evernote Safari Clipper.  Also enabled &#8220;Show in Top [...]]]></description>
			<content:encoded><![CDATA[<p>Somewhat following the instructions from <a href="http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard">rubyonrails.org</a>:</p>
<ul>
<li>Install Snow Leopard from DVD.</li>
<li>Install XCode tools from Optional Installs on same DVD.</li>
<li>Start 1Password &#8211; install 1Password3 when prompted.</li>
<li>Evernote Safari clipper seemed to be overwriting the 1Password button in Safari.  Upgraded Evernote to release candidate, still had problem.  Disabled Evernote Safari Clipper.  Also enabled &#8220;Show in Top Menu&#8221; in 1Password preferences.</li>
<li>Installed updates including 10.6.1 from Software Update. (restart required).</li>
<li>Installed latest MySQL 10.5 x86_64 package: mysql-5.1.39-osx10.5-x86_64.dmg.  Installed startup task then pref-pane.  Started server.  Set root password with <em>sudo mysqladmin password &lt;password</em>&gt;.</li>
<li>Reinstalled mysql gem for x86_64 architecture only:</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">env</span> <span style="color: #007800;">ARCHFLAGS</span>=<span style="color: #ff0000;">&quot;-arch x86_64&quot;</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> mysql <span style="color: #660033;">--</span> <span style="color: #660033;">--with-mysql-config</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mysql_config</pre></div></div>

<ul>
<li>Reinstalled iStat Menus.</li>
<li>Installed MacPorts-1.8.0.pkg.  Removed all ports.</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">port installed <span style="color: #000000; font-weight: bold;">&amp;</span>gt; myports.txt
<span style="color: #c20cb9; font-weight: bold;">sudo</span> port clean installed
<span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #660033;">-f</span> uninstall installed
<span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> unison
<span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> git-core +<span style="color: #c20cb9; font-weight: bold;">svn</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #c20cb9; font-weight: bold;">install</span> ImageMagick</pre></div></div>

<p>Upgraded SuperDuper to version 2.6.1 as it failed to backup Snow Leopard.</p>
<h3>Debugging</h3>
<p>Got this error when trying to run cucumber/webrat:</p>
<pre>
dlopen(/Users/sam/.gem/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/nokogiri.bundle, 9): no suitable image found.  Did find:
	/Users/sam/.gem/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/nokogiri.bundle: mach-o, but wrong architecture - /Users/sam/.gem/ruby/1.8/gems/nokogiri-1.3.3/lib/nokogiri/nokogiri.bundle
</pre>
<p>To fix it I uninstalled then reinstalled the nokogiri gem.</p>
<p>Got this error when trying to run cucumber/webrat/selenium:</p>
<pre>
==> Waiting for rails application server on port 3001... /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5.1/bin/../lib/http11.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5.1/bin/../lib/http11.bundle, 9): no suitable image found.  Did find: (LoadError)
	/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5.1/bin/../lib/http11.bundle: no matching architecture in universal wrapper - /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5.1/bin/../lib/http11.bundle
</pre>
<p>To fix it I uninstalled then reinstalled the mongrel gem.</p>
<p>On a different machine I got this error when trying to run cucumber/webrat/selenium:</p>
<pre>
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>
<p>Per <a href="http://stackoverflow.com/questions/1364523/firefox-bin-quit-unexpectedly-while-running-selenium-test">http://stackoverflow.com/questions/1364523/firefox-bin-quit-unexpectedly-while-running-selenium-test</a>, I moved /Applications/Firefox.app/Contents/MacOS/libsqlite3.dylib out of the way and that fixed it.  It is not clear why this happened on one machine (with Firefox 3.0.13 which I upgraded to 3.5.3 while debugging) but did not happen on another machine (Firefox 3.0.14).</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/uncategorized/upgrading-to-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS grid system resources</title>
		<link>http://sampierson.com/blog/uncategorized/css-grid-system-resources/</link>
		<comments>http://sampierson.com/blog/uncategorized/css-grid-system-resources/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 13:45:19 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=595</guid>
		<description><![CDATA[This is just a place to hold my bookmarks relating to use of CSS Grid Systems:

YUI/Blueprint/960gs comparison chart: http://synapse.neural9.com/css-frameworks-comparison-chart/
Site dedicated to grid system design: http://www.thegridsystem.org/

]]></description>
			<content:encoded><![CDATA[<p>This is just a place to hold my bookmarks relating to use of CSS Grid Systems:</p>
<ul>
<li>YUI/Blueprint/960gs comparison chart: <a href="http://synapse.neural9.com/css-frameworks-comparison-chart/">http://synapse.neural9.com/css-frameworks-comparison-chart/</a></li>
<li>Site dedicated to grid system design:<a href="http://www.thegridsystem.org/"> http://www.thegridsystem.org/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/uncategorized/css-grid-system-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Completely uninstall mysql from Mac OS X</title>
		<link>http://sampierson.com/blog/uncategorized/completely-uninstall-mysql-from-mac-os-x/</link>
		<comments>http://sampierson.com/blog/uncategorized/completely-uninstall-mysql-from-mac-os-x/#comments</comments>
		<pubDate>Thu, 14 May 2009 23:54:42 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=576</guid>
		<description><![CDATA[Remove mysql, prefpane item, startup item.
then:

sudo rm -rf /Library/Receipts/mysql*

There is a good complete explanation of this here.
]]></description>
			<content:encoded><![CDATA[<p>Remove mysql, prefpane item, startup item.<br />
then:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Receipts<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p>There is a good complete explanation of this <a href="http://akrabat.com/2008/09/11/uninstalling-mysql-on-mac-os-x-leopard/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/uncategorized/completely-uninstall-mysql-from-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Password protected CruiseControl.rb with git support</title>
		<link>http://sampierson.com/blog/uncategorized/password-protected-cruise-control-rb-with-git-support/</link>
		<comments>http://sampierson.com/blog/uncategorized/password-protected-cruise-control-rb-with-git-support/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 03:58:55 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sampierson.com/blog/?p=534</guid>
		<description><![CDATA[Here is how I setup my internet accessible CruiseControl.rb server and password protected it, using apache on MacOS.
As I use Git for VCS so I installed the version from GitHub that supports it.  This appears to be the most actively developed version as far as I can tell.
After cloning it to ~/cruisecontrol.rb I wrote [...]]]></description>
			<content:encoded><![CDATA[<p>Here is how I setup my internet accessible <a href="http://cruisecontrolrb.thoughtworks.com/">CruiseControl.rb</a> server and password protected it, using apache on MacOS.</p>
<p>As I use Git for VCS so I installed <a href="http://github.com/thoughtworks/cruisecontrol.rb/tree/master">the version from GitHub</a> that supports it.  This appears to be the most actively developed version as far as I can tell.</p>
<p>After cloning it to ~/cruisecontrol.rb I wrote a startup script for the server that gets it to bind only to interface 127.0.0.1.  The key is the &#8211;binding option:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>cruisecontrol.rb
.<span style="color: #000000; font-weight: bold;">/</span>cruise start <span style="color: #660033;">--binding</span>=127.0.0.1 <span style="color: #660033;">--port</span>=<span style="color: #000000;">3333</span> <span style="color: #660033;">--daemon</span></pre></div></div>

<p>Then I setup an apache virtual server with a reverse proxy for / to localhost:3333, and set it to be password protected:</p>

<div class="wp_syntax"><div class="code"><pre class="foo" style="font-family:monospace;">  ...
  ProxyPass / balancer://balancer-group/
  ProxyPassReverse / balancer://balancer-group/
  &lt;Proxy &quot;balancer://balancer-group&quot;&gt;
    BalancerMember http://127.0.0.1:3333 loadfactor=100
    AuthType Basic
    AuthName &quot;cc.sampierson.net private&quot;
    Require user sam
  &lt;/Proxy&gt;
  ...</pre></div></div>

<p>MacOS Apache integrates AuthType Basic with its own authorization system so you don&#8217;t need to tell it about an htpasswd file.</p>
]]></content:encoded>
			<wfw:commentRss>http://sampierson.com/blog/uncategorized/password-protected-cruise-control-rb-with-git-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
