<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>MyUtil&#8482; - Home</title>
  <id>tag:myutil.com,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://myutil.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://myutil.com/" rel="alternate" type="text/html"/>
  <updated>2008-06-02T20:44:03Z</updated>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-06-02:1929</id>
    <published>2008-06-02T19:46:00Z</published>
    <updated>2008-06-02T20:44:03Z</updated>
    <category term="Systems"/>
    <category term="osx"/>
    <link href="http://myutil.com/2008/6/2/toolbar-boomark-icons-in-firefox-on-osx-leopard" rel="alternate" type="text/html"/>
    <title>Toolbar bookmark icons in Firefox 3 on OSX Leopard</title>
<content type="html">
            &lt;div&gt;&lt;a href=&quot;http://getfirefox.com/&quot;&gt;&lt;img src=&quot;/assets/2008/6/2/bookmark.png&quot; alt=&quot;Screen shot of bookmarks&quot;&gt;/&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  toolbarbutton.bookmark-item[container] &amp;gt; .toolbarbutton-icon {&lt;tt&gt;
&lt;/tt&gt;  display: none !important;&lt;tt&gt;
&lt;/tt&gt;} &lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-03-06:320</id>
    <published>2008-03-06T01:06:00Z</published>
    <updated>2008-03-06T01:17:35Z</updated>
    <category term="Web Design"/>
    <category term="OpenID"/>
    <category term="openid"/>
    <category term="Rails"/>
    <category term="rails"/>
    <category term="Ruby"/>
    <category term="ruby"/>
    <link href="http://myutil.com/2008/3/6/yahoo-openid-has-extra-security-constaints" rel="alternate" type="text/html"/>
    <title>Yahoo OpenID has extra security constaints</title>
<content type="html">
            &lt;div&gt;&lt;a href=&quot;http://openid.net/&quot;&gt;&lt;img src=&quot;/assets/2007/12/29/openid-logo.gif&quot; alt=&quot;OpenID logo&quot;&gt;&lt;/a&gt;&lt;/div&gt; 
&lt;p&gt;
I have a feeling this will help some of y&#8217;all if you are getting the following error:

&lt;pre&gt;Sorry! Something is not quite right with the request we received from the website you are trying to use. Please try again in a few minutes. If this error persists, please contact the site administrator for the website you are trying to use. If you are the site administrator, click here to contact us.&lt;/pre&gt;

	&lt;p&gt;I get this error if I try to login on my development environment because localhost:3000 just won&#8217;t cut it for Yahoo&#8217;s OpenID security policy.    If I run from a production &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt; on port 80, say http://myutil.com/ then signin works (though I haven&#8217;t gotten Simple Registration Attribute Exchange working with Yahoo).&lt;/p&gt;


From the &lt;a href=&quot;http://developer.yahoo.com/openid/faq.html&quot;&gt;Yahoo OpenID Developers &lt;span class=&quot;caps&quot;&gt;FAQ&lt;/span&gt;:&lt;/a&gt;
&lt;blockquote&gt;
Yahoo! Security Policies

Yahoo! will only support Relying Parties running on webservers with real hostnames (IP addresses are not supported) running on standard ports (Port 80 for &lt;span class=&quot;caps&quot;&gt;HTTP&lt;/span&gt; and Port 443 for &lt;span class=&quot;caps&quot;&gt;HTTPS&lt;/span&gt;).
&lt;/blockquote&gt;

	&lt;p&gt;Hope this saves ya some time!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-02-28:208</id>
    <published>2008-02-28T09:16:00Z</published>
    <updated>2008-07-16T22:29:09Z</updated>
    <category term="Systems"/>
    <category term="OpenBSD"/>
    <category term="openbsd"/>
    <category term="Ruby"/>
    <category term="ruby"/>
    <link href="http://myutil.com/2008/2/28/openbsd-port-of-sphinx" rel="alternate" type="text/html"/>
    <title>OpenBSD port of Sphinx</title>
<content type="html">
            &lt;div&gt;&lt;a href=&quot;http://www.sphinxsearch.com/&quot;&gt;&lt;img src=&quot;/assets/2008/2/28/sphinx.jpg&quot; alt=&quot;Sphinx Free open-source SQL full-text search engine&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&amp;lt;font&gt;Update July 16th, 2008:  &amp;lt;/font&gt;Sphinx sphinx-0.9.8 has been released and this port has been updated.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://myutil.com/ports/4.4/sphinx.tgz&quot;&gt;Here&lt;/a&gt; is a OpenBSD port of &lt;a href=&quot;http://www.sphinxsearch.com/&quot;&gt;Sphinx&lt;/a&gt;, Free open-source &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; full-text search engine.   Sphinx is a wonderfully fast and memory efficient deep text search engine.   I have found integrates nicely with Ruby and Ruby-On-Rails.

	&lt;p&gt;I hope at some point to get this port committed to the OpenBSD &lt;span class=&quot;caps&quot;&gt;CVS&lt;/span&gt; repository.  In the meantime this will be the ports home.    Till it hits the OpenBSDs repository, it will live in &lt;a href=&quot;http://svn.myutil.com/projects/ports/textproc/sphinx/&quot;&gt;my &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; repository here.&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;You can download a snapshot of the source code for the port here: &lt;a href=&quot;/ports/4.4/sphinx.tgz&quot;&gt;sphinx.tgz.&lt;/a&gt;   So far this port has been tested with MySQL and Postgresql on &amp;lt;strike&gt;OpenBSD 4.2 and OpenBSD 4.3-beta&amp;lt;/strike&gt;OpenBSD-4.4-beta on the i386 platform with the Ultrasphinx Ruby-On-Rails plugin.&lt;/p&gt;


&lt;hr /&gt;

&lt;h1&gt;Instructions to build the port&lt;/h1&gt;

	&lt;p&gt;If your ports tree is not already prepped, please begin by &lt;a href=&quot;http://myutil.com/2007/11/5/prepping-ports-for-openbsd&quot;&gt;prepping your ports tree&lt;/a&gt;.&lt;/p&gt;


The port will build much faster if you install the prerequisites via binaries:
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;sudo su&lt;tt&gt;
&lt;/tt&gt;export &lt;span class=&quot;co&quot;&gt;PKG_PATH&lt;/span&gt;=&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.3/packages/i386&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# or, setenv PKG_PATH &amp;quot;ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.3/packages/i386&amp;quot;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;pkg_add libiconv mysql-server mysql-client&lt;tt&gt;
&lt;/tt&gt;exit&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Now we are ready to build the sphinx port:&lt;/p&gt;


&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;cd &lt;span class=&quot;rx&quot;&gt;&lt;span class=&quot;dl&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;usr&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;/&lt;/span&gt;&lt;/span&gt;ports/textproc&lt;tt&gt;
&lt;/tt&gt;lynx --source &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;http://myutil.com/ports/4.4/sphinx.tgz&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &amp;gt; sphinx.tgz&lt;tt&gt;
&lt;/tt&gt;tar xvfz sphinx.tgz &lt;tt&gt;
&lt;/tt&gt;cd sphinx&lt;tt&gt;
&lt;/tt&gt;make install  &lt;span class=&quot;c&quot;&gt;# or make package&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


There is also a Postgresql flavor.  Follow the instructions above, installing Postgresql instead of MySQL and then instead of &lt;code&gt;make install&lt;/code&gt; do:
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;env &lt;span class=&quot;co&quot;&gt;FLAVOR&lt;/span&gt;=pgsql make install&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Thanks, and feedback is always welcome!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-02-26:171</id>
    <published>2008-02-26T20:58:00Z</published>
    <updated>2008-02-27T10:07:26Z</updated>
    <category term="Systems"/>
    <category term="OpenBSD"/>
    <category term="openbsd"/>
    <category term="Ruby"/>
    <category term="ruby"/>
    <link href="http://myutil.com/2008/2/26/raspell-shared-library-problems-on-openbsd" rel="alternate" type="text/html"/>
    <title>raspell shared library problems on OpenBSD</title>
<content type="html">
            &lt;div&gt;
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;--- extconf.rb.orig     &lt;span class=&quot;co&quot;&gt;Tue&lt;/span&gt; &lt;span class=&quot;co&quot;&gt;Feb&lt;/span&gt; &lt;span class=&quot;i&quot;&gt;26&lt;/span&gt; &lt;span class=&quot;i&quot;&gt;12&lt;/span&gt;:&lt;span class=&quot;i&quot;&gt;03&lt;/span&gt;:&lt;span class=&quot;i&quot;&gt;53&lt;/span&gt; &lt;span class=&quot;i&quot;&gt;2008&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;+++ extconf.rb  &lt;span class=&quot;co&quot;&gt;Tue&lt;/span&gt; &lt;span class=&quot;co&quot;&gt;Feb&lt;/span&gt; &lt;span class=&quot;i&quot;&gt;26&lt;/span&gt; &lt;span class=&quot;i&quot;&gt;11&lt;/span&gt;:&lt;span class=&quot;i&quot;&gt;52&lt;/span&gt;:&lt;span class=&quot;i&quot;&gt;16&lt;/span&gt; &lt;span class=&quot;i&quot;&gt;2008&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;er&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;er&quot;&gt;@&lt;/span&gt; &lt;span class=&quot;i&quot;&gt;-1&lt;/span&gt;,&lt;span class=&quot;i&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;i&quot;&gt;+1&lt;/span&gt;,&lt;span class=&quot;i&quot;&gt;7&lt;/span&gt; &lt;span class=&quot;er&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;er&quot;&gt;@&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt; require &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;mkmf&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt; &lt;tt&gt;
&lt;/tt&gt;+&lt;span class=&quot;gv&quot;&gt;$LIBS&lt;/span&gt; += &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; -lstdc++ -laspell&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;+&lt;tt&gt;
&lt;/tt&gt; have_header(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;ruby.h&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt; have_header(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;aspell.h&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt; have_library(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;aspell&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;
I recently installed the raspell gem on my development box as part of an evaluation of ultrasphinx.

	&lt;p&gt;Unfortunately, the native extension to raspell doesn&#8217;t link in the dynamic libraries it uses.   A fix is provided below.&lt;/p&gt;


	&lt;p&gt;Note, using the raspell with ultrasphinx also caused a ruby core dump, this time in an assertion from the configuration for aspell.      OpenBSD uses aspell-0.50.5 and after upgrading aspell to 0.60.5, raspell started working fine.&lt;/p&gt;


Here is the output from the dynamic library problem:
&lt;/p&gt;
&lt;br class=&quot;clear&quot; /&gt;
&lt;p&gt;
&lt;pre&gt;&lt;code&gt;
** Starting Rails with development environment...
ruby:/usr/local/lib/ruby/gems/1.8/gems/raspell-1.1/lib/raspell.so: undefined symbol 'new_aspell_config'
lazy binding failed!
/home/face/urevz/vendor/plugins/ultrasphinx/lib/ultrasphinx/spell.rb:33: [BUG] Segmentation fault
ruby 1.8.6 (2007-09-24) [i386-openbsd4.2]
&lt;/pre&gt;&lt;/code&gt;
&lt;/p&gt;

	&lt;p&gt;A little poking around and I noticed the native library, raspell.so, doesn&#8217;t link in libaspell!&lt;/p&gt;


	&lt;p&gt;A quick fix is to add the libs to extconf.rb and rebuild the library:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;cd /usr/local/lib/ruby/gems/1.8/gems/raspell-1.1/ext&lt;/li&gt;
		&lt;li&gt;edit extconf.rb and add the line $LIBS &lt;ins&gt;= &#8221; -lstdc&lt;/ins&gt;+ -laspell&#8221; &lt;/li&gt;
		&lt;li&gt;sudo make clean &lt;/li&gt;
		&lt;li&gt;sudo make&lt;/li&gt;
		&lt;li&gt;sudo cp raspell.so ../lib/.&lt;/li&gt;
	&lt;/ol&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-02-13:111</id>
    <published>2008-02-13T07:30:00Z</published>
    <updated>2008-02-21T02:35:42Z</updated>
    <category term="Systems"/>
    <category term="OpenBSD"/>
    <category term="openbsd"/>
    <category term="Ruby"/>
    <category term="ruby"/>
    <link href="http://myutil.com/2008/2/13/current-ruby-and-ruby-gem-binaries-for-current-openbsd" rel="alternate" type="text/html"/>
    <title>Current Ruby and Ruby-Gem binaries for the current release of OpenBSD</title>
<content type="html">
            &amp;lt;center&gt;&lt;a href=&quot;http://rubyforge.org/projects/openbsd-dist/&quot;&gt;&lt;img src=&quot;/assets/2008/2/13/rubyforge.png&quot; alt=&quot;Ruby-Forge Header&quot;&gt;&lt;/a&gt;&amp;lt;/center&gt;
&lt;br /&gt;
&lt;p&gt;
Here is how to install i386 binaries (please choose an OpenBSD mirror near you&#8230;and please buy a &lt;a href=&quot;http://www.openbsd.org/tshirts.html&quot;&gt;t-shirt&lt;/a&gt;):
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;sudo su&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;#for ksh/bash&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;export &lt;span class=&quot;co&quot;&gt;PKG_PATH&lt;/span&gt;=&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;ftp://ftp3.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;#or, for tcsh: setenv PKG_PATH=ftp://ftp3.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# Now for Ruby&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;pkg_add &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;http://rubyforge.org/frs/download.php/32289/ruby-1.8.6.111.tgz&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# Optional, but Recommend for Rails&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;pkg_add &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;http://rubyforge.org/frs/download.php/32290/ruby-gems-1.0.1.tgz&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;pkg_add &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;http://rubyforge.org/frs/download.php/32291/ruby-iconv-1.8.6.111.tgz&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# Now you could install rails if you wanted:&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;gem install rails&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Rubyforge doesn&#8217;t allow you to have the same filename, even if it is in a different sub-package and release.  Therefore, amd64 and sparc64 binaries are distributed directly from MyUtil.com.&lt;/p&gt;


For &lt;span class=&quot;caps&quot;&gt;AMD64&lt;/span&gt; (which runs in &lt;span class=&quot;caps&quot;&gt;IA64&lt;/span&gt; of course):
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;sudo su&lt;tt&gt;
&lt;/tt&gt;export &lt;span class=&quot;co&quot;&gt;PKG_PATH&lt;/span&gt;=&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;http://myutil.com/ports/4.2/amd64/:ftp://ftp3.usa.openbsd.org/pub/OpenBSD/4.2/packages/amd64/&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# or, setenv PKG_PATH &amp;quot;http://myutil.com/ports/4.2/amd64/:ftp://ftp3.usa.openbsd.org/pub/OpenBSD/4.2/packages/amd64/&amp;quot;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;pkg_add ruby&lt;span class=&quot;fl&quot;&gt;-1.8&lt;/span&gt;.&lt;span class=&quot;fl&quot;&gt;6.111&lt;/span&gt; ruby-iconv&lt;span class=&quot;fl&quot;&gt;-1.8&lt;/span&gt;.&lt;span class=&quot;fl&quot;&gt;6.111&lt;/span&gt; ruby-gems&lt;span class=&quot;fl&quot;&gt;-1.0&lt;/span&gt;.&lt;span class=&quot;i&quot;&gt;1&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# Perhaps Ruby-On-Rails:&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;gem install rails&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


For sparc64:
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;sudo su&lt;tt&gt;
&lt;/tt&gt;export &lt;span class=&quot;co&quot;&gt;PKG_PATH&lt;/span&gt;=&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;http://myutil.com/ports/4.2/sparc64/:ftp://ftp3.usa.openbsd.org/pub/OpenBSD/4.2/packages/sparc64/&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# or, setenv PKG_PATH &amp;quot;http://myutil.com/ports/4.2/sparc64/:ftp://ftp3.usa.openbsd.org/pub/OpenBSD/4.2/packages/sparc64/&amp;quot;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;pkg_add ruby&lt;span class=&quot;fl&quot;&gt;-1.8&lt;/span&gt;.&lt;span class=&quot;fl&quot;&gt;6.111&lt;/span&gt; ruby-iconv&lt;span class=&quot;fl&quot;&gt;-1.8&lt;/span&gt;.&lt;span class=&quot;fl&quot;&gt;6.111&lt;/span&gt; ruby-gems&lt;span class=&quot;fl&quot;&gt;-1.0&lt;/span&gt;.&lt;span class=&quot;i&quot;&gt;1&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# Maybe Rails?&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;gem install rails&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Thanks, I find these useful and I hope you do too.   I now do all my development from a OpenBSD (patched) Desktop and have made these binaries as secure as possible.   All binaries are produced behind pf firewalls.&lt;/p&gt;


	&lt;p&gt;I have a old Mac Mini I can install macppc and produce binaries&#8230;if there is a demand.&lt;/p&gt;


&lt;/p&gt;

&amp;lt;center&gt;
&lt;a href=&quot;http://www.openbsd.org/&quot;&gt;&lt;img src=&quot;/assets/2008/2/13/openbsd.gif&quot; alt=&quot;Puffy swimming&quot;&gt;&lt;/a&gt;&amp;lt;/center&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-02-03:70</id>
    <published>2008-02-03T23:41:00Z</published>
    <updated>2008-02-04T00:03:49Z</updated>
    <category term="Systems"/>
    <category term="hosting"/>
    <link href="http://myutil.com/2008/2/3/down-for-a-few-hours-then-things-are-snappy" rel="alternate" type="text/html"/>
    <title>Down for a few hours then things are snappy</title>
<content type="html">
            &lt;div&gt;&lt;a href=&quot;http://www.pbs.org/wnet/nature/conditionblack/index.html&quot;&gt;&lt;img src=&quot;/assets/2008/2/3/bigwave.jpg&quot; alt=&quot;Surfer on a big wave&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;
MyUtil.com was hosted on a dedicated server from 1and1.   Now I&#8217;m hosting on a dedicated server from &lt;a href=&quot;http://www.m5hosting.com/&quot;&gt;m5hosting.com.&lt;/a&gt;    1and1 infrastructure was excellent when I leased these servers 3 years ago and I was one of their first customers.   

 I can&#8217;t say that now as speed on my &#8220;100Mbps&#8221; connection to all my servers had dwindled to a paltry 180K/s to the west coast.     

	&lt;p&gt;Then the the biggest problem was 1and1&#8217;s customer service.   Sure they answer the phone.    But then the person who answers the phone can only send one way messages to the techs.     And the techs never send information back to the customer.    Right before I dumped them,  I took a perfectly healthy machine and started their re-image process to do speed tests with their OS instead of mine.    36 hours and many phone calls after my box disappeared, 1and1 customer service could only say &#8220;We will check with level 2 tier support.   Check back with us in another 24 hours&#8221;.    Boy though, once I used their cancellation website to dump them, they had me locked out of my &lt;b&gt;prepaid&lt;/b&gt; servers within about an hour (my choice was cancel at end of contract, or, cancel in 30-120 days.   &lt;span class=&quot;caps&quot;&gt;BTW&lt;/span&gt;, MyUtil.com should have had 0 downtime&#8230;but I wasn&#8217;t expecting &#8220;end of contract&#8221; to mean 1and1 locks you out now and keeps your money.&lt;/p&gt;


	&lt;p&gt;I have been completely satisfied with &lt;a href=&quot;http://www.m5hosting.com/&quot;&gt;m5hosting.&lt;/a&gt;   It is very refreshing to have a support issue in the middle of the night, and the tech helping me designed the network.     Plus now my sites scream!&lt;/p&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-01-23:62</id>
    <published>2008-01-23T09:55:00Z</published>
    <updated>2008-01-27T21:18:15Z</updated>
    <category term="Web Design"/>
    <category term="Rails"/>
    <category term="rails"/>
    <link href="http://myutil.com/2008/1/23/prototype-translations-for-gibberish-with-google-language-tools-a-mouse-click-and-13-lines-of-code" rel="alternate" type="text/html"/>
    <title>Prototype translations for Gibberish with Google Language Tools, a mouse click, and 13 lines of code </title>
<content type="html">
            &lt;div&gt;&lt;img src=&quot;/assets/2008/1/23/googlelanguage_1.jpg&quot; alt=&quot;translated pages with google&quot;&gt;&lt;/div&gt;
&lt;p&gt;
I wanted to prototype my &lt;a href=&quot;http://errtheblog.com/posts/55-ya-talkin-gibberish&quot;&gt;Gibberish&lt;/a&gt; translations before we have an actual translator.   I grabbed &lt;a href=&quot;http://www.marklunds.com/articles/one/376&quot;&gt;gibberish_translate&lt;/a&gt; and started copying and pasting from &lt;a href=&quot;http://www.google.com/language_tools&quot;&gt;Google Language Tools.&lt;/a&gt;

	&lt;p&gt;After five minutes of this, I thought there has got to be a better way.   I googled for an &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; to the Google tools, and though I found none, I did find a scraping Ruby &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; called &lt;a href=&quot;http://code.google.com/p/rtranslate/&quot;&gt;rtranslate.&lt;/a&gt;  So&#8230;&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;gem install googletranslate&lt;/code&gt;&lt;/pre&gt;


Then I hacked the index method of translations_controller.rb from &lt;a href=&quot;http://www.marklunds.com/articles/one/376&quot;&gt;gibberish_translate.&lt;/a&gt;   I added the following lines of code
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;  require &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;rtranslate&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;index&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;     &lt;span class=&quot;c&quot;&gt;# ...Mark's entire index method goes here unchanged&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; params[&lt;span class=&quot;sy&quot;&gt;:filter&lt;/span&gt;] == &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;untranslated&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      count=&lt;span class=&quot;i&quot;&gt;0&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;iv&quot;&gt;@paginated_keys&lt;/span&gt;.each &lt;span class=&quot;r&quot;&gt;do&lt;/span&gt; |key|  &lt;tt&gt;
&lt;/tt&gt;        &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; ! &lt;span class=&quot;iv&quot;&gt;@translated_messages&lt;/span&gt;[key]&lt;tt&gt;
&lt;/tt&gt;          &lt;span class=&quot;iv&quot;&gt;@translated_messages&lt;/span&gt;[key] = { &lt;tt&gt;
&lt;/tt&gt;          &lt;span class=&quot;sy&quot;&gt;:to&lt;/span&gt; =&amp;gt; &lt;span class=&quot;co&quot;&gt;Translate&lt;/span&gt;.t(&lt;span class=&quot;iv&quot;&gt;@en_messages&lt;/span&gt;[key], &lt;span class=&quot;co&quot;&gt;Language&lt;/span&gt;::&lt;span class=&quot;co&quot;&gt;ENGLISH&lt;/span&gt;, session[&lt;span class=&quot;sy&quot;&gt;:translation_locale&lt;/span&gt;] ),&lt;tt&gt;
&lt;/tt&gt;          &lt;span class=&quot;sy&quot;&gt;:from&lt;/span&gt; =&amp;gt; &lt;span class=&quot;iv&quot;&gt;@en_messages&lt;/span&gt;[key]&lt;tt&gt;
&lt;/tt&gt;          }&lt;tt&gt;
&lt;/tt&gt;        &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class=&quot;r&quot;&gt;break&lt;/span&gt; &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; (count += &lt;span class=&quot;i&quot;&gt;1&lt;/span&gt;) == per_page&lt;tt&gt;
&lt;/tt&gt;        sleep &lt;span class=&quot;i&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# Let's be nice to google&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt; &lt;span class=&quot;c&quot;&gt;# end of index from gibberish_translate's translations_controller.rb&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;And now Google does the work for me with the click of a mouse!&lt;/p&gt;


	&lt;p&gt;Note I did make some other changes to Mark&#8217;s code.    There was a bug in translations_controller.rb in that it lost your current local when saving changes.   To fix this I changed the set_translation_locale to use the session of there is no paramater:&lt;/p&gt;


&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;set_translation_locale&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    session[&lt;span class=&quot;sy&quot;&gt;:translation_locale&lt;/span&gt;] = params[&lt;span class=&quot;sy&quot;&gt;:translation_locale&lt;/span&gt;] &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; params[&lt;span class=&quot;sy&quot;&gt;:translation_locale&lt;/span&gt;]&lt;tt&gt;
&lt;/tt&gt;    session[&lt;span class=&quot;sy&quot;&gt;:translation_locale&lt;/span&gt;] = &lt;span class=&quot;co&quot;&gt;Gibberish&lt;/span&gt;.languages.first &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;co&quot;&gt;Gibberish&lt;/span&gt;.languages &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; ! session[&lt;span class=&quot;sy&quot;&gt;:translation_locale&lt;/span&gt;]&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;I also made some changes to gibberish_translate&#8217;s extractor.rb to handle Gibberish strings with default keys (&lt;code&gt;&quot;foo&quot;[]&lt;/code&gt; is a valid Gibberish way of saying &lt;code&gt;&quot;foo&quot;[:foo]&lt;/code&gt;):&lt;/p&gt;


&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;message_pattern&lt;/span&gt;(start_token, end_token)&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;rx&quot;&gt;&lt;span class=&quot;dl&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;start_token&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;((?:[^&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;end_token&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;](?:&lt;/span&gt;&lt;span class=&quot;ch&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;end_token&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;)?)+)&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;end_token&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;ch&quot;&gt;\[&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:*([a-z_]*)[,&lt;/span&gt;&lt;span class=&quot;ch&quot;&gt;\]&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;mod&quot;&gt;m&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;add_messages&lt;/span&gt;(contents, start_token, end_token)&lt;tt&gt;
&lt;/tt&gt;      contents.scan(message_pattern(start_token, end_token)).each &lt;span class=&quot;r&quot;&gt;do&lt;/span&gt; |text, key|&lt;tt&gt;
&lt;/tt&gt;        key = text.tr(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;[  ]&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;).downcase &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; ( key == &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt; )&lt;tt&gt;
&lt;/tt&gt;        add_message(key, remove_quotes(text, end_token))&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;The final tweaks I made was to make the find system call more portable (no -regex on OpenBSD) and also have it search for strings in my &lt;a href=&quot;http://myutil.com/2008/1/22/gibberish_rails-a-ruby-on-rails-plugin-to-translate-rails-with-gibberish&quot;&gt;gibberish_rails&lt;/a&gt; plugin:&lt;/p&gt;


&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;files_with_messages&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;sh&quot;&gt;&lt;span class=&quot;dl&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;find &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;dirs_to_search.join(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;)&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; -type f '(' -name '*rb' -or -name '*.ml' ')'&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;`&lt;/span&gt;&lt;/span&gt;.split.map(&amp;amp;&lt;span class=&quot;sy&quot;&gt;:chomp&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;dirs_to_search&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;%w(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;app config lib vendor/plugins/gibberish_rails&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;)&lt;/span&gt;&lt;/span&gt;.map { |dir| &lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;co&quot;&gt;RAILS_ROOT&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;dir&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; }&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Peace!&lt;/p&gt;


	&lt;p&gt;Portions of the above code Copyright&#169; 2007 &lt;a href=&quot;http://svn.marklunds.com/plugins/gibberish_translate/MIT-LICENSE&quot;&gt;Peter Marklund&lt;/a&gt;
           &lt;/p&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-01-22:61</id>
    <published>2008-01-22T22:27:00Z</published>
    <updated>2008-01-27T19:17:08Z</updated>
    <category term="Web Design"/>
    <category term="Rails"/>
    <category term="rails"/>
    <link href="http://myutil.com/2008/1/22/gibberish_rails-a-ruby-on-rails-plugin-to-translate-rails-with-gibberish" rel="alternate" type="text/html"/>
    <title>gibberish_rails: a Ruby-On-Rails plugin to translate Rails with Gibberish</title>
<content type="html">
            &lt;div&gt;&lt;img src=&quot;/assets/2008/1/22/gibberish_rails.png&quot; alt=&quot;Translated Rails Registration&quot;&gt;&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;With migrating from Rails 1 to Rails 2, I have tried to simplify.    When I wanted to prototype a multilingual Rails application I was very intrigued by &lt;a href=&quot;http://errtheblog.com/posts/55-ya-talkin-gibberish&quot;&gt;Gibberish&lt;/a&gt; and it&#8217;s simplicity.

	&lt;p&gt;As all Gibberish does is translate strings and all this plugin attempts to do is translate srings in Rails.     This plugin is in a very early prototype stage but I expect it to be useful none the less.&lt;/p&gt;


	&lt;p&gt;If you want full localization of dates, numbers, the world etc. check out some of the other more mature localization plugins.&lt;/p&gt;


	&lt;p&gt;If you are trying to localize your Rails strings with Gibberish, then this plugin is for you.&lt;/p&gt;


	&lt;p&gt;When I set out I didn&#8217;t even expect to make a plugin, just write some simple ruby in my project.    However, it turns out there is a reason for the bloat in localization plugins&#8230;rails was never designed to be localized and has some quirks that lead to the necessity of overriding large core rails methods.    The rails core team is obviously aware the problem and are working &lt;a href=&quot;http://dev.rubyonrails.org/ticket/9726&quot;&gt;on a solution with ticket 9726.&lt;/a&gt;    I&#8217;m hoping Rails &lt;a href=&quot;http://dev.rubyonrails.org/ticket/9726&quot;&gt;ticket 9726&lt;/a&gt; will make it to edge and then I&#8217;ll be able to simplify this plugin.&lt;/p&gt;


	&lt;p&gt;Without further adieu, I give you &lt;a href=&quot;http://svn.myutil.com/projects/plugins/gibberish_rails/&quot;&gt;gibberish_rails.&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Here is a link  to the  &lt;a href=&quot;http://myutil.com/rdoc/gibberish_rails/&quot;&gt;RDoc.&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Quickie instructions (includes install for &lt;a href=&quot;http://errtheblog.com/posts/55-ya-talkin-gibberish&quot;&gt;Gibberish&lt;/a&gt;).&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;./script/plugin install svn://errtheblog.com/svn/plugins/gibberish
./script/plugin install http://svn.myutil.com/projects/plugins/gibberish_rails/&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Please read the &lt;a href=&quot;http://myutil.com/rdoc/gibberish_rails/files/README.html&quot;&gt;&lt;span class=&quot;caps&quot;&gt;README&lt;/span&gt;&lt;/a&gt; in it&#8217;s entirety before using.&lt;/p&gt;


	&lt;p&gt;Now you must translate your strings.    I recommend using &lt;a href=&quot;http://www.marklunds.com/articles/one/376&quot;&gt;gibberish_translate.&lt;/a&gt;   My next article will be on automatic prototyping translations with gibberish_translate and Google Language Tools.&lt;/p&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-01-15:59</id>
    <published>2008-01-15T00:23:00Z</published>
    <updated>2008-01-16T05:12:28Z</updated>
    <category term="Systems"/>
    <category term="OpenBSD"/>
    <category term="OpenBSD"/>
    <link href="http://myutil.com/2008/1/15/undelete-unrm-for-openbsd-4-2-with-dls" rel="alternate" type="text/html"/>
    <title>undelete / unrm for OpenBSD 4.2 with dls</title>
<content type="html">
            &lt;p&gt;While nightly backups and &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; are great, sometimes we make a mistake and rm something we need back.  This article should also be useful to anyone who needs to do forensic analysis of a filesystem.   This technique should also work under freebsd, netbsd, linux, solaris, dos, windows, etc. just the installation part of tools would be different and you might need a -t option to dls.&lt;/p&gt;


	&lt;p&gt;I did this yesterday on my development box under the &lt;code&gt;/home&lt;/code&gt; partition.    The first thing is to try to ensure nothing overwrites the deleted inodes.&lt;/p&gt;


	&lt;p&gt;In this example &lt;code&gt;/home&lt;/code&gt; is &lt;code&gt;/dev/wd0e&lt;/code&gt;.   You can use &lt;code&gt;df&lt;/code&gt; to determine your setup.&lt;/p&gt;


Get on the console and bring her into single user mode:
&lt;pre&gt;
shutdown  now
# or, if you are not alone and want to give peope 2 minutes:   shutdown  +2
&lt;/pre&gt;

	&lt;p&gt;Now that we are in single user mode, unmount the disk&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;umount /home&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Ok, the inodes are safe.   Let&#8217;s  undelete them.    On OpenBSD we have,  &lt;a href=&quot;http://www.sleuthkit.org/sleuthkit/desc.php&quot;&gt;The Sleuth Kit&lt;/a&gt; an evolution of &lt;span class=&quot;caps&quot;&gt;TCT&lt;/span&gt; and unrm is now called &lt;a href=&quot;http://wiki.sleuthkit.org/index.php?title=Dls&quot;&gt;dls.&lt;/a&gt;&lt;/p&gt;


&lt;pre&gt;
sudo su
export PKG_PATH=&quot;ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386&quot; 
# or, setenv PKG_PATH &quot;ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386&quot; 
pkg_add sleuthkit

# Now, we will need tcl for the comeforth script referenced below.  Intall if you don't have:
pkg_add tcl-8.4.7p5
ln -s  /usr/local/bin/tclsh8.4 /usr/bin/tclsh
&lt;/pre&gt;

	&lt;p&gt;Now my /var has lots of free space.   The following command will find all deleted inodes and place them in a file.&lt;/p&gt;


&lt;pre&gt;
dls  /dev/wd0e &amp;gt; /var/tmp/undelete.bin
&lt;/pre&gt;

	&lt;p&gt;You can also yous fls on the raw device to report on directory information (file names).   To get information on deleted sub directories, you would need to determine which inodes are directories and then use fls on those inodes.&lt;/p&gt;


	&lt;p&gt;If it is a text or source file you are looking for, you can just use something like less to search undelete.bin now.&lt;/p&gt;


	&lt;p&gt;Otherwise, if you want to extract files, I recommend &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=55685&amp;amp;#38;package_id=128368&quot;&gt;comeforth.&lt;/a&gt; &lt;a href=&quot;http://www.porcupine.org/forensics/tct.html&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TCT&lt;/span&gt;&lt;/a&gt; does not build correctly on OpenBSD anymore.  It is possible to get enough of &lt;span class=&quot;caps&quot;&gt;TCT&lt;/span&gt; working for lazarus to run, but comeforth is much faster.&lt;/p&gt;


	&lt;p&gt;First, download and open &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=55685&amp;amp;#38;package_id=128368&quot;&gt;comeforth.&lt;/a&gt;  Now make it executable &lt;code&gt;chmod +x ~face/comeforth/comeforth&lt;/code&gt;.  We should already have tclsh installed above so now we run comeforth which is an interactive script.    I am looking for Ruby-On-Rails files under app.   So first I create a file of regular expressions that will match the output of the file command for the files I want to retrieve:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;echo 'ASCII' &amp;gt; files
echo 'HTML' &amp;gt;&amp;gt; files&lt;/code&gt;&lt;/pre&gt;


Comeforth is an interactive script.   I accepted all the defaults except for the &lt;code&gt;File type regex&lt;/code&gt; which I set to &lt;code&gt;&amp;lt; files&lt;/code&gt;Here is a typescript from a session:
&lt;pre&gt;
Script started on Mon Jan 14 15:13:05 2008
e5:/var/tmp&amp;gt; ~face/comeforth/comeforth

comeforth 1.12, Copyright (c) 2003-2004 Danamis Associates (http://danamis.com).
This program comes with ABSOLUTELY NO WARRANTY; this is free software, and you
are welcome to redistribute it under certain conditions; for details view the
GNU Lesser General Public License at http://www.gnu.org.

Data file: undelete.bin

Data block size: 4096

Recovery directory: recov

File type regex
([?] for help): &amp;lt; files

- Found 2 regexes to use in 'files'.

Block work dir: comeforth-5045.tmp

Progress indicator block interval: 24

Start at block: 1

Scanning data for matching blocks...
24, 0.01%, 1411.8 per sec, 2.9 min rem...

# Lots of output deleted ...

Finished scanning filesystem data in 0:09:26.

Inspect and assemble files? ([y]es/[q]uit): q
&lt;/pre&gt;

	&lt;p&gt;And thats it.  You now have all your deleted files in recov.   You can use grep to find the specific files you want.   If the arglist is too long, then break it down with find.   For example, lets say you where looking for the ruby class UsersController:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;find . -print | xargs -L 10000 grep &quot;^class UsersController&quot;&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;You may have to delete some nulls at the end of your files.   I tried dls -b but that didn&#8217;t seem to help.&lt;/p&gt;


	&lt;p&gt;I hope this is useful to someone else out there&#8230;&lt;/p&gt;


References:
&lt;p&gt;
&lt;a href=&quot;http://wiki.sleuthkit.org/index.php?title=Help_Documents&quot;&gt;http://wiki.sleuthkit.org/index.php?title=Help_Documents&lt;/a&gt;
&lt;a href=&quot;http://wiki.sleuthkit.org/index.php?title=Tools_Using_TSK&quot;&gt;http://wiki.sleuthkit.org/index.php?title=Tools_Using_TSK&lt;/a&gt;
&lt;a href=&quot;http://www.linuxhaxor.net/2007/12/26/undelete-files-in-linux-with-lazarus-and-unrm/&quot;&gt;http://www.linuxhaxor.net/2007/12/26/undelete-files-in-linux-with-lazarus-and-unrm/&lt;/a&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2008-01-01:53</id>
    <published>2008-01-01T01:54:00Z</published>
    <updated>2008-01-03T20:31:57Z</updated>
    <category term="OpenBSD"/>
    <category term="OpenBSD"/>
    <category term="Ruby"/>
    <category term="Ruby"/>
    <link href="http://myutil.com/2008/1/1/the-official-ruby-1-8-6-111-ports-have-been-checked-into-cvs" rel="alternate" type="text/html"/>
    <title>The official OpenBSD Ruby 1.8.6-111 ports have been checked into CVS</title>
<content type="html">
            &lt;p&gt;Thanks to Bernd Ahlers, the official OpenBSD ruby 1.8.6-111 ports are now in the &lt;a href=&quot;http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/ruby/&quot;&gt;OpenBSD &lt;span class=&quot;caps&quot;&gt;CVS&lt;/span&gt; Repository.&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I have updated my post and associated binaries &lt;a href=&quot;/2007/11/5/ruby-1-8-6-p110-OpenBSD-4-2&quot;&gt;Ruby 1.8.6p110 on OpenBSD 4.2&lt;/a&gt; to use the official 111 port instead of mine.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2007-12-29:48</id>
    <published>2007-12-29T10:37:00Z</published>
    <updated>2008-02-28T07:34:08Z</updated>
    <category term="Web Design"/>
    <category term="OpenID"/>
    <category term="openid"/>
    <category term="Rails"/>
    <category term="rails"/>
    <link href="http://myutil.com/2007/12/29/openid-2-0-2-with-rails-2-0-2" rel="alternate" type="text/html"/>
    <title>OpenID-2.0.2 with Rails-2.0.2</title>
<content type="html">
            &lt;p&gt;&lt;img src=&quot;/assets/2007/12/29/openid-logo.gif&quot; alt=&quot;&quot; /&gt;&lt;p&gt;
OpenID makes sense.   &lt;a href=&quot;http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/&quot;&gt;Dr. Nick&#8217;s multi-OpenIDs per user example app&lt;/a&gt; makes even more sense.&lt;/p&gt;


	&lt;p&gt;In the middle of integrating it into my project,  gem-1.0.1 came out and broke ruby-openid-1.1.4.   Dr. Nick&#8217;s great example no longer worked!&lt;/p&gt;


	&lt;p&gt;A little digging and I found Dr. Nick&#8217;s example uses the standard  open_id_authentication.   That has &lt;a href=&quot;http://dev.rubyonrails.org/ticket/10604&quot;&gt;a patch to work on ruby-openid-2.0.2 and rails 2 which can be found here.&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;So in a nutshell, I grabbed openidauth_multiopenid-0.3.2 from Dr. Nick, removed a bunch of stuff from vendor plugins.   Updated Rakefile, config/boot.rb, and config/environment.rb for rails 2.0.2.  Patched vendor/plugins/open_id_authentication for ruby-openid-2.0.2.   Regenerated db/migration/002_add_open_id_authentication_tables.rb.   And installed ruby-openid-2.0.2 as a system gem.&lt;/p&gt;


	&lt;p&gt;As a little code is worth more than a thousand words, here is Dr. Nick&#8217;s example application fully ported to rails 2.0.2 in &lt;a href=&quot;/assets/2007/12/29/openidauth_multiopenid-0.3.2-rails-2.0.2.zip&quot;&gt;&lt;span class=&quot;caps&quot;&gt;ZIP&lt;/span&gt;&lt;/a&gt; and &lt;a href=&quot;/assets/2007/12/29/openidauth_multiopenid-0.3.2-rails-2.0.2.tar.gz&quot;&gt;&lt;span class=&quot;caps&quot;&gt;TAR&lt;/span&gt;.gz.&lt;/a&gt;&lt;/p&gt;&lt;/p&gt;


	&lt;p&gt;For my port of Dr. Nick&#8217;s example above to work, you will need rails-2.0.2 and ruby-openid-2.0.2 installed as a gems.&lt;/p&gt;


&amp;lt;font&gt;Security Update: January 4th, 2007&amp;lt;/font&gt; I noticed the example adds edit, update, and destroy to users_controller.rb using &lt;code&gt;params[:id]&lt;/code&gt; thus allowing any logged in user to edit, update, and destroy any user of the system.  To fix, simply change the first line of edit, update, and destroy to use the current logged in user (i.e. &lt;code&gt;@user = User.find(self.current_user.id)&lt;/code&gt;).
&lt;br&gt;&lt;br&gt;
&amp;lt;font&gt;Another Update:February 27th, 2007&amp;lt;/font&gt; One of my clients noticed the user_openids_controller&#8217;s index method finds all openids for all users if you surf to user_openids &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;.   To fix, change the find in user_openids_controller.index to be &lt;code&gt; @user_openids = UserOpenid.find_all_by_user_id(@user.id)&lt;/code&gt;.   I think it&#8217;s time I put this example under &lt;span class=&quot;caps&quot;&gt;SVN&lt;/span&gt; and apply these security upates&#8230;
&lt;br&gt;&lt;br&gt;
 It should look something like this under rails 2.0.2:&lt;br&gt;&lt;br&gt;
&amp;lt;center&gt;
&lt;img src=&quot;/assets/2007/12/29/drnicksexample.png&quot; alt=&quot;&quot; /&gt;
&amp;lt;/center&gt;

References:&lt;p&gt;
&lt;a href=&quot;http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/&quot;&gt;http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://dev.rubyonrails.org/ticket/10604&quot;&gt;http://dev.rubyonrails.org/ticket/10604&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://openidenabled.com/ruby-openid/&quot;&gt;http://openidenabled.com/ruby-openid/&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://svn.rubyonrails.org/rails/plugins/open_id_authentication/&quot;&gt;http://svn.rubyonrails.org/rails/plugins/open_id_authentication/&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://openid.net/&quot;&gt;http://openid.net/&lt;/a&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2007-12-23:46</id>
    <published>2007-12-23T21:36:00Z</published>
    <updated>2007-12-28T05:32:13Z</updated>
    <category term="Systems"/>
    <category term="OpenBSD"/>
    <category term="OpenBSD"/>
    <category term="Ruby"/>
    <category term="Ruby"/>
    <link href="http://myutil.com/2007/12/23/rubygems-1-0-1-on-openbsd" rel="alternate" type="text/html"/>
    <title>rubygems-1.0.1 on OpenBSD</title>
<content type="html">
            &lt;p&gt;I started a real update to the port but was unable to complete it quickly.   I have more pressing coding tasks and can&#8217;t spend the time now to complete the port.&lt;/p&gt;


	&lt;p&gt;My short term solution is to just use ruby gems to update itself (assuming you already have gem installed, if not see below).&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;sudo gem update --system&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Then,  if you want to, update some installed gems (like rails -&amp;gt; 2.0.2)&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;sudo gem update rails&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;I updated my systems which run my ruby-1.8.6p110 port.   However it should work with the  stock ruby and gem which you can install via OpenBSD ports:&lt;/p&gt;


&lt;pre&gt;
sudo su
# setenv PKG_PATH &quot;ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386&quot; 
export  PKG_PATH=&quot;ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386&quot; 
pkg_add ruby ruby-gems ruby-iconv

gem update --system
&lt;/pre&gt;

	&lt;p&gt;If anyone has a pointer to a completed native port, please let me know.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2007-11-05:29</id>
    <published>2007-11-05T07:25:00Z</published>
    <updated>2008-02-28T09:07:31Z</updated>
    <category term="Systems"/>
    <category term="OpenBSD"/>
    <category term="OpenBSD"/>
    <category term="openbsd"/>
    <category term="Ruby"/>
    <category term="Ruby"/>
    <category term="ruby"/>
    <link href="http://myutil.com/2007/11/5/building-ruby-on-openbsd-from-source" rel="alternate" type="text/html"/>
    <title>Ruby 1.8.6-111 on OpenBSD 4.2 (and Ruby-On-Rails)</title>
<content type="html">
            &amp;lt;font&gt;Update: December 31, 2007&amp;lt;/font&gt;:  Official OpenBSD 1.8.6 patch level 111 ports have been checked into &lt;span class=&quot;caps&quot;&gt;CVS&lt;/span&gt;.  This post and the associated binaries have been updated to use the official port.  My unofficial port has been discarded.&lt;br&gt;&lt;br&gt;

	&lt;p&gt;This article describes building a ruby port from source.   If you want the binaries produced by this article,  I have released them via &lt;a href=&quot;/2008/2/13/current-ruby-and-ruby-gem-binaries-for-current-openbsd&quot;&gt;this Rubyforge project.&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;If your ports tree is not already prepped, please begin by &lt;a href=&quot;http://myutil.com/2007/11/5/prepping-ports-for-openbsd&quot;&gt;prepping your ports tree&lt;/a&gt;.&lt;/p&gt;


There is a message that you may run out of memory without modifying login.conf.   My login.conf was already modified.   My login is a member of the staff group:
&lt;pre&gt;
staff:\
        :datasize-cur=1024M:\
        :datasize-max=infinity:\
        :maxproc-max=256:\
        :maxproc-cur=128:\
        :ignorenologin:\
        :requirehome@:\
        :tc=default:
&lt;/pre&gt;

	&lt;p&gt;We will be using the official OpenBSD port from &lt;span class=&quot;caps&quot;&gt;CVS&lt;/span&gt;.&lt;/p&gt;


We will start by installing the prerequisites as binaries because if you have a fast internet connection, it is faster than building the ports from src:
&lt;pre&gt;
sudo su
setenv PKG_PATH &quot;ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386&quot; 
# or export PKG_PATH=&quot;ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386&quot; 
pkg_add libiconv gdbm tk-8.4.7p1
exit
&lt;/pre&gt;

	&lt;p&gt;Now lets update the ruby port from &lt;span class=&quot;caps&quot;&gt;CVS HEAD&lt;/span&gt; and build it.   I did this on December 31, 2007 and the snapshot of the source code to the port can be found here: &lt;a href=&quot;/ports/4.2/ruby.tgz&quot;&gt;ruby.tgz&lt;/a&gt;&lt;/p&gt;


&lt;pre&gt;
export CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs   # pls choose a mirror near you
# setenv CVSROOT anoncvs@anoncvs3.usa.openbsd.org:/cvs
cd :/usr/ports/lang/ruby
cvs up -rHEAD .
make package
&lt;/pre&gt;

Now we can install it:  
&lt;pre&gt;
sudo su
setenv PKG_PATH './:ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386'
# or:  export PKG_PATH='./:ftp://ftp2.usa.openbsd.org/pub/OpenBSD/4.2/packages/i386'
cd /usr/packages/i386/all
pkg_add ruby-1.8.6.111 
# Or, of you already have ruby installed, try:  pkg_add -r ruby-1.8.6.111
&lt;/pre&gt;

And for a bonus, lets install Ruby-On-Rails:
&lt;pre&gt;
pkg_add ruby-gems ruby-iconv-1.8.6.111  mysql-server mysql-client

# Update gems to version 1.0.1, apparently needed for rails 2.0.2 but will break things like ruby-openid-1.1.4
gem update --system

gem install rails
# For Rails 1.2.6
# gem install -v 1.2.6 rails

# Now let's optimize ruby for mysql
gem install mysql

# finally, mongrel rocks
gem install mongrel --include-dependencies
gem install mongrel_cluster
&lt;/pre&gt;

	&lt;p&gt;If this is a new MySQL install, don&#8217;t forget to follow the instructions in  /usr/local/share/doc/mysql/README.OpenBSD.&lt;/p&gt;


	&lt;p&gt;Enjoy!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2007-11-05:30</id>
    <published>2007-11-05T06:47:00Z</published>
    <updated>2007-11-06T21:49:08Z</updated>
    <category term="Systems"/>
    <category term="OpenBSD"/>
    <link href="http://myutil.com/2007/11/5/prepping-ports-for-openbsd" rel="alternate" type="text/html"/>
    <title>Prepping Ports for OpenBSD</title>
<content type="html">
            &lt;p&gt;This follows &lt;a href=&quot;http://www.openbsd.org/faq/faq15.html#Ports&quot;&gt;15.3 &#8211; Working with ports&lt;/a&gt;.   Here are the main steps:&lt;/p&gt;


	&lt;p&gt;Your &lt;code&gt;/etc/mk.conf&lt;/code&gt; should look similar to this:&lt;/p&gt;


&lt;pre&gt;
SUDO=/usr/bin/sudo
WRKOBJDIR=/usr/obj/ports
DISTDIR=/usr/distfiles
PACKAGE_REPOSITORY=/usr/packages
USE_SYSTRACE=Yes
&lt;/pre&gt;

The assumption is you have placed the 4.2 ports.tar.gz in /tmp:
&lt;pre&gt;
sudo su
cd /usr
tar xpfz /tmp/ports.tar.gz
chgrp -R wsrc /usr/ports
find /usr/ports -type d -exec chmod g+w {} \;
mkdir -p /usr/distfiles /usr/obj/ports /usr/packages
chgrp -R wsrc /usr/distfiles /usr/obj/ports /usr/packages
chmod g+w /usr/distfiles /usr/obj/ports /usr/packages
exit
&lt;/pre&gt;

	&lt;p&gt;No ensure you are part of the wsrc group.   You should be able to do the following as a normal user:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;setenv CVSROOT &quot;anoncvs@anoncvs3.usa.openbsd.org:/cvs&quot; 
#or, export CVSROOT=anoncvs@anoncvs3.usa.openbsd.org:/cvs
cd /usr
cvs -q up -P -rOPENBSD_4_2 ports&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Reference: &lt;a href=&quot;http://www.openbsd.org/faq/faq15.html#Ports&quot;&gt;15.3 &#8211; Working with ports&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://myutil.com/">
    <author>
      <name>face</name>
    </author>
    <id>tag:myutil.com,2007-11-05:28</id>
    <published>2007-11-05T05:42:00Z</published>
    <updated>2008-01-01T05:27:12Z</updated>
    <category term="Systems"/>
    <category term="OpenBSD"/>
    <category term="OpenBSD"/>
    <link href="http://myutil.com/2007/11/5/openbsd-4-2-cd" rel="alternate" type="text/html"/>
    <title>Building A OpenBSD-4.2-current (patched) CD</title>
<content type="html">
            &lt;p&gt;I have to update several OpenBSD systems so I find it easiest to make a 4.2-current (patched) distribution.   This can also be burned to a cd so new installs or upgrades via cd are also patched.&lt;/p&gt;


	&lt;p&gt;So, I have just upgraded to 4.2 OpenBSD.     I am now going to build a patched distribution, patching the system in the process.&lt;/p&gt;


	&lt;p&gt;Let&#8217;s do it:&lt;/p&gt;


&lt;pre&gt;
sudo su
# setenv CVSROOT &quot;anoncvs@anoncvs3.usa.openbsd.org:/cvs&quot; 
export CVSROOT=&quot;anoncvs@anoncvs3.usa.openbsd.org:/cvs&quot; 
cd /usr
mv src src-4.1
# rm -rf src-4.1 &#38;
mkdir src
cd /usr/src
tar xpfz /tmp/src.tar.gz
tar xpfz /tmp/sys.tar.gz 

cd /usr
cvs -q up -P -rOPENBSD_4_2 src 
cd src/sys/arch/i386/conf

#use GENERIC for non MP or HT servers
/usr/sbin/config GENERIC.MP
cd ../compile/GENERIC.MP
make clean &#38;&#38; make depend &#38;&#38; make

# if you did not do the 'set image bsd.mp' step above, then just 'make install'
rm -f /obsd.mp
ln /bsd.mp /obsd.mp
cp bsd /nbsd
mv /nbsd /bsd.mp

sync
reboot
&lt;/pre&gt;

	&lt;p&gt;Log back in as root after reboot, you should see the kernel now has a name like &#8220;&amp;lt;font&gt;&lt;code&gt;OpenBSD 4.2-stable (GENERIC.MP) #0&lt;/code&gt;&amp;lt;/font&gt;&#8221;.  The -stable means the eratta patches where applied.&lt;/p&gt;


&lt;pre&gt;
cd /usr/src
rm -rf /usr/obj/*
cd /usr/src
make obj
cd /usr/src/etc &#38;&#38; env DESTDIR=/ make distrib-dirs
cd /usr/src
make build
# This will take a while

reboot
&lt;/pre&gt;

	&lt;p&gt;When the build completes, your system is up to date.  If you have only 1 machine, you are done.  However, I need patched distribution sets for my other boxes:&lt;/p&gt;


&lt;pre&gt;
export DESTDIR=/usr/dest
export RELEASEDIR=/usr/rel
# setenv DESTDIR /usr/dest
# setenv RELEASEDIR /usr/rel
cd /usr/src/distrib/crunch &#38;&#38; make obj depend all install
test -d ${DESTDIR} &#38;&#38; mv ${DESTDIR} ${DESTDIR}.old &#38;&#38; rm -rf ${DESTDIR}.old &#38;
mkdir -p ${DESTDIR} ${RELEASEDIR}
cd /usr/src/etc
make release
cd /usr/src/distrib/sets/
sh checkflist
&lt;/pre&gt;

	&lt;p&gt;We now have a release in /usr/rel.     I combine this with an official distribution to get the x-windows sets as I am not building them here.   Basically, I copy everything except &lt;span class=&quot;caps&quot;&gt;MD5&lt;/span&gt; from /usr/rel into the 4.2/i386 dist dir that has everything from the ftp server except install42.iso.   Then I edit the &lt;span class=&quot;caps&quot;&gt;MD5&lt;/span&gt;  to include the new checksums.
Now put everthing under a directory structure OpenBSD/4.2/i386.   For this example, say it is all in &lt;code&gt;/tmp/OpenBSD/4.2/i386&lt;/code&gt; we can now make the iso cd image:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;cd /tmp
mkhybrid -A &quot;OpenBSD-4.2-stable-i386&quot; -P &quot;Me&quot; -V  &quot;OpenBSD-4.2-stable-i386&quot; -r -b 4.2/i386/cdbr -c 4.2/i386/boot.catalog -o OpenBSD-4.2-Stable-i386.iso OpenBSD&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Thanks!&lt;/p&gt;


References:
&lt;div&gt;
  &lt;a href=&quot;http://www.openbsd.org/stable.html&quot;&gt;http://www.openbsd.org/stable.html&lt;/a&gt;&lt;br&gt;
  &lt;a href=&quot;http://www.openbsd.org/faq/faq5.html#Release&quot;&gt;http://www.openbsd.org/faq/faq5.html#Release&lt;/a&gt;
&lt;/div&gt;
          </content>  </entry>
</feed>
