<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>nick.recoil.org - Home</title>
  <id>tag:nick.recoil.org,2008:mephisto/</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://nick.recoil.org/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://nick.recoil.org/" rel="alternate" type="text/html"/>
  <updated>2008-05-05T23:20:48Z</updated>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2008-05-05:67</id>
    <published>2008-05-05T23:04:00Z</published>
    <updated>2008-05-05T23:20:48Z</updated>
    <category term="Mac OS X"/>
    <category term="Sysadmin"/>
    <category term="TV"/>
    <category term="appletv"/>
    <category term="g-202"/>
    <category term="hack"/>
    <category term="perian"/>
    <category term="ssh"/>
    <category term="ubuntu"/>
    <link href="http://nick.recoil.org/2008/5/5/appletv-ubuntu-hacking" rel="alternate" type="text/html"/>
    <title>AppleTV &amp; Ubuntu hacking</title>
<content type="html">
            &lt;p&gt;I&#8217;ve finally enabled &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; on my long dormant AppleTV, and am integrating it into my &lt;span class=&quot;caps&quot;&gt;DVB&lt;/span&gt; / Rails / Beanstalk / MySQL system for processing data. I&#8217;ve used the Patchstick image available from &lt;a href=&quot;http://www.wiki.atv4windows.com/&quot;&gt;atv4windows&lt;/a&gt;. I ended up unpacking and dd&#8217;ing the image from the Mac, but the process remains exactly the same. I now have Perian, ssh and a slew of other things enabled, and all I need now is to attempt the hack to get composite output working. I&#8217;ve yet to take the plunge and replace my old &lt;span class=&quot;caps&quot;&gt;CRT&lt;/span&gt; with an &lt;span class=&quot;caps&quot;&gt;LCD TV&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;Incidentally, for anyone looking to figure out the ssh username and password for your freshly enabled ssh daemon, they are both &lt;strong&gt;frontrow&lt;/strong&gt;, and that user has &lt;strong&gt;passwordless sudo privileges&lt;/strong&gt;.&lt;/p&gt;


	&lt;p&gt;I also had a minor breakthrough with my x86_64 Ubuntu 8.04 machine. I have a Zyxel G-202 Wireless &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt; stick, to keep the number of trailing wires to a minimum, but I kept getting an error saying:&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;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;zd1211rw error ioread32(CF_REG1): -110&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;


	&lt;p&gt;Which was exceedingly unhelpful. I eventually tried disabling hi-speed &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt; from the &lt;span class=&quot;caps&quot;&gt;BIOS&lt;/span&gt;, and rebooted to find it sprang into life immediately. Great! What was even more strange that when I rebooted and reset the &lt;span class=&quot;caps&quot;&gt;BIOS&lt;/span&gt; back to enable &lt;span class=&quot;caps&quot;&gt;USB 2&lt;/span&gt;.0, the G-202 kept working.  I&#8217;m unsure whether this is due to the device not being cold booted, and I&#8217;ve yet to see if it stops working after I power the system off, but so far so good, and I don&#8217;t need to resort to &lt;span class=&quot;caps&quot;&gt;NDIS&lt;/span&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2008-04-07:66</id>
    <published>2008-04-07T12:50:00Z</published>
    <updated>2008-04-07T12:50:48Z</updated>
    <category term="Ruby &amp; Rails"/>
    <category term="crash"/>
    <category term="init.d"/>
    <category term="mongrel"/>
    <link href="http://nick.recoil.org/2008/4/7/mongrel-init-d-script" rel="alternate" type="text/html"/>
    <title>Mongrel init.d script</title>
<content type="html">
            &lt;p&gt;I&#8217;ve slightly modified &lt;a href=&quot;http://source.mihelac.org/2007/3/27/customized-mongrel-startup-script&quot;&gt;Bojan Mihelac&#8217;s Mongrel init.d script&lt;/a&gt; to cope with the situation where there are stale &lt;span class=&quot;caps&quot;&gt;PID&lt;/span&gt; files left from a server failure.&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;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;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;25&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;26&lt;tt&gt;
&lt;/tt&gt;27&lt;tt&gt;
&lt;/tt&gt;28&lt;tt&gt;
&lt;/tt&gt;29&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;30&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;31&lt;tt&gt;
&lt;/tt&gt;32&lt;tt&gt;
&lt;/tt&gt;33&lt;tt&gt;
&lt;/tt&gt;34&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;35&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;36&lt;tt&gt;
&lt;/tt&gt;37&lt;tt&gt;
&lt;/tt&gt;38&lt;tt&gt;
&lt;/tt&gt;39&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;40&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;41&lt;tt&gt;
&lt;/tt&gt;42&lt;tt&gt;
&lt;/tt&gt;43&lt;tt&gt;
&lt;/tt&gt;44&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;45&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;46&lt;tt&gt;
&lt;/tt&gt;47&lt;tt&gt;
&lt;/tt&gt;48&lt;tt&gt;
&lt;/tt&gt;49&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;50&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;51&lt;tt&gt;
&lt;/tt&gt;52&lt;tt&gt;
&lt;/tt&gt;53&lt;tt&gt;
&lt;/tt&gt;54&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;55&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;56&lt;tt&gt;
&lt;/tt&gt;57&lt;tt&gt;
&lt;/tt&gt;58&lt;tt&gt;
&lt;/tt&gt;59&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;60&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;c&quot;&gt;#!/bin/env ruby&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# mongrel Startup script for Mongrel by Tim Morgan, modified by bmihelac and Nick Ludlam&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# Originally from http://source.mihelac.org/2007/3/27/customized-mongrel-startup-script&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# chkconfig: 2345 85 15&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;# description: mongrel manages Mongrel&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;apps = [&lt;tt&gt;
&lt;/tt&gt;  {&lt;span class=&quot;sy&quot;&gt;:app&lt;/span&gt; =&amp;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;app1&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;sy&quot;&gt;:app&lt;/span&gt; =&amp;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;app2&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;sy&quot;&gt;:app&lt;/span&gt; =&amp;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;app3&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;}&lt;tt&gt;
&lt;/tt&gt;]&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;default_port = &lt;span class=&quot;i&quot;&gt;8000&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;default_options = {&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;sy&quot;&gt;:app_dir&lt;/span&gt; =&amp;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;/var/www&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;,  &lt;span class=&quot;sy&quot;&gt;:environment&lt;/span&gt; =&amp;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;production&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;}&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;pid_location = &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;log/mongrel.pid&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;r&quot;&gt;if&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;stop&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;restart&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;].include? &lt;span class=&quot;pc&quot;&gt;ARGV&lt;/span&gt;.first&lt;tt&gt;
&lt;/tt&gt;  apps.each &lt;span class=&quot;r&quot;&gt;do&lt;/span&gt; |app|&lt;tt&gt;
&lt;/tt&gt;    options = default_options.merge(app)&lt;tt&gt;
&lt;/tt&gt;    path = &lt;span class=&quot;co&quot;&gt;File&lt;/span&gt;.join options[&lt;span class=&quot;sy&quot;&gt;:app_dir&lt;/span&gt;], options[&lt;span class=&quot;sy&quot;&gt;:app&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;current&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    puts &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;Stopping &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;path&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;dl&quot;&gt;&amp;quot;&lt;/span&gt;&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;/usr/local/bin/mongrel_rails stop -c &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;path&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; -P &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;pid_location&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&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;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;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;if&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;start&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;restart&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;].include? &lt;span class=&quot;pc&quot;&gt;ARGV&lt;/span&gt;.first&lt;tt&gt;
&lt;/tt&gt;  apps.each &lt;span class=&quot;r&quot;&gt;do&lt;/span&gt; |app|&lt;tt&gt;
&lt;/tt&gt;    options = default_options.merge(app)&lt;tt&gt;
&lt;/tt&gt;    path = &lt;span class=&quot;co&quot;&gt;File&lt;/span&gt;.join options[&lt;span class=&quot;sy&quot;&gt;:app_dir&lt;/span&gt;], options[&lt;span class=&quot;sy&quot;&gt;:app&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;current&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    port = options[&lt;span class=&quot;sy&quot;&gt;:port&lt;/span&gt;] || default_port&lt;tt&gt;
&lt;/tt&gt;    pid_file = &lt;span class=&quot;co&quot;&gt;File&lt;/span&gt;.join path, pid_location&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;c&quot;&gt;# Check and remove stale PID file. Platform needs &amp;quot;ps -p&amp;quot; support&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class=&quot;r&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;co&quot;&gt;File&lt;/span&gt;.exists?(pid_file)&lt;tt&gt;
&lt;/tt&gt;      old_pid = &lt;span class=&quot;co&quot;&gt;File&lt;/span&gt;.read(pid_file)&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;ps -p &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;old_pid&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&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;if&lt;/span&gt; old_pid.to_i &amp;gt; &lt;span class=&quot;i&quot;&gt;0&lt;/span&gt; &amp;amp;&amp;amp; &lt;span class=&quot;gv&quot;&gt;$?&lt;/span&gt;.exitstatus == &lt;span class=&quot;i&quot;&gt;1&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        puts &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;Removing stale PID file&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;co&quot;&gt;File&lt;/span&gt;.unlink(pid_file)&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;tt&gt;
&lt;/tt&gt;    puts &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;Starting &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;options[&lt;span class=&quot;sy&quot;&gt;:app&lt;/span&gt;]&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; on &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;port&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;dl&quot;&gt;&amp;quot;&lt;/span&gt;&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;/usr/local/bin/mongrel_rails start -d -p &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;port&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; -e &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;options[&lt;span class=&quot;sy&quot;&gt;:environment&lt;/span&gt;]&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; -c &lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;path&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt; -P log/mongrel.pid&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    default_port = port + &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;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;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;unless&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;start&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;stop&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;restart&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;].include? &lt;span class=&quot;pc&quot;&gt;ARGV&lt;/span&gt;.first&lt;tt&gt;
&lt;/tt&gt;    puts &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;Usage: mongrel {start|stop|restart}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    exit&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;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2008-04-01:65</id>
    <published>2008-04-01T10:27:00Z</published>
    <updated>2008-04-01T10:50:21Z</updated>
    <category term="Mac OS X"/>
    <link href="http://nick.recoil.org/2008/4/1/macports-contributions" rel="alternate" type="text/html"/>
    <title>MacPorts contributions</title>
<content type="html">
            &lt;p&gt;I&#8217;ve been accepted as a committer to &lt;a href=&quot;http://macports.org/&quot;&gt;MacPorts&lt;/a&gt;, initially to look after &lt;a href=&quot;http://xph.us/software/beanstalkd/&quot;&gt;beanstalkd&lt;/a&gt;, but I&#8217;ll hopefully extend what I contribute to. I&#8217;ve been a consumer of Macports (née Darwinports) for a long while, and use it regularly to create my local development environment on the Mac. As of today, I have 98 ports installed, from ImageMagick to zlib, and I&#8217;m happy to be giving back some effort to something I get so much value from.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2008-03-21:63</id>
    <published>2008-03-21T13:59:00Z</published>
    <updated>2008-03-21T18:09:06Z</updated>
    <category term="Sysadmin"/>
    <category term="blow"/>
    <category term="controller board"/>
    <category term="disk"/>
    <category term="drive"/>
    <category term="hard"/>
    <category term="power"/>
    <link href="http://nick.recoil.org/2008/3/21/saving-my-blown-seagate-barracuda-7200-10-hard-drive" rel="alternate" type="text/html"/>
    <title>Saving my blown Seagate Barracuda 7200.10 hard drive</title>
<content type="html">
            &lt;p&gt;Whilst messing around with my Mini &lt;span class=&quot;caps&quot;&gt;ITX&lt;/span&gt; box, I managed to touch the power connector onto the drive backwards, blowing one of the components near the connector. I noticed that the controller board is screwed on with standard torx screws, so I took them out, curious about the connector to the main chassis.&lt;/p&gt;


	&lt;p&gt;After removing them, the board came away easily, and uses pressure pads as a connection mechanism, rather than ribbon cable or other methods. This set me wondering about whether this would be a replaceable part. I contacted Seagate, who told me that they don&#8217;t supply them separately. I then wondered about getting an identical drive, and replacing the old board with one from the new drive, so I went ahead and ordered a replacement; I&#8217;d need it anyway, even if this attempt at data recovery failed.&lt;/p&gt;


	&lt;p&gt;After it arrived, and I&#8217;d done the swap, I turned on the machine, and back came my drive with all my data on it, safe and sound. I did worry about whether the &lt;span class=&quot;caps&quot;&gt;IDE&lt;/span&gt; controller boards carry some kind of mapping table that&#8217;s specific to a particular set of platters, but this isn&#8217;t the case, it seems. Unfortunately I&#8217;ve no way of repairing the original blown board. Replacing surface mount components is tricky.&lt;/p&gt;


	&lt;p&gt;For anybody wondering, you can replace the controller board for a Seagate Barracuda 7200.10 500GB drive with no ill effects.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2008-03-03:60</id>
    <published>2008-03-03T12:22:00Z</published>
    <updated>2008-03-03T12:28:07Z</updated>
    <category term="Mac OS X"/>
    <category term="MTU"/>
    <category term="Mac OS X"/>
    <category term="delayed_ack"/>
    <category term="scp"/>
    <category term="stall"/>
    <category term="wifi"/>
    <link href="http://nick.recoil.org/2008/3/3/stalling-wi-fi-uploads-on-mac-os-x-10-5-2" rel="alternate" type="text/html"/>
    <title>Stalling Wi-fi uploads on Mac OS X 10.5.2</title>
<content type="html">
            &lt;p&gt;I was sitting in my &lt;a href=&quot;http://www.bertieandboo.com/cafe.html&quot;&gt;local wifi-enabled cafe&lt;/a&gt; in London for the first time yesterday, and was struck with a peculiar problem. I could attach to their Wi-fi network properly, and browsing webpages worked fine, but trying to scp a small file to one of the recoil.org servers was stalling at exactly 2064kB.&lt;/p&gt;


	&lt;p&gt;I had a quick glance around for the problem on Google, and &lt;a href=&quot;http://discussions.apple.com/thread.jspa?threadID=1389943&amp;amp;#38;tstart=0&quot;&gt;a thread&lt;/a&gt; turned up on the Apple message board. These people were discussing the same symptoms as I was having; An scp would start out fine, but stall after a particular amount of data had transfered. Following lots of discussion about tuning &lt;strong&gt;net.inet.tcp.delayed_ack&lt;/strong&gt;, I tried fiddling with all sort of sysctl and ifconfig settings for the best part of an hour, and eventually had success.&lt;/p&gt;


	&lt;p&gt;I had to drop the &lt;span class=&quot;caps&quot;&gt;MTU&lt;/span&gt; of en1 down from 1500 all the way down to 1400 for the problems to go away. The more common settings you might find via Google such as 1492 didn&#8217;t resolve the issue. For those of you who might have arrived here looking at similar issues, type the following into a Terminal window:&lt;/p&gt;


&lt;div class=&quot;code&quot;&gt;
&lt;pre&gt;&lt;code&gt;
 sudo ifconfig en1 mtu 1400
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

	&lt;p&gt;I&#8217;m not entirely sure what was going on, but Path &lt;span class=&quot;caps&quot;&gt;MTU&lt;/span&gt; discovery is turned on by default on the Mac. By blocking &lt;span class=&quot;caps&quot;&gt;ICMP&lt;/span&gt; packets on the Wifi network, it may cause issues with the discovery system. If people are more familiar with the networking circumstances here, drop me a comment/email.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2008-02-12:59</id>
    <published>2008-02-12T21:02:00Z</published>
    <updated>2008-02-12T21:02:58Z</updated>
    <category term="NDS"/>
    <category term="codec"/>
    <category term="homebrew"/>
    <category term="nds"/>
    <category term="nintendo ds"/>
    <category term="open source"/>
    <category term="video"/>
    <category term="wavelet"/>
    <link href="http://nick.recoil.org/2008/2/12/dsvideo-released-to-the-public" rel="alternate" type="text/html"/>
    <title>DSVideo released to the public</title>
<content type="html">
            &lt;p&gt;After a lot of behind-the-scenes development and testing, Dominic and I have released &lt;a href=&quot;http://dsvideo.recoil.org/&quot;&gt;DSVideo&lt;/a&gt; to the world. It&#8217;s an multi-platform open-source wavelet video encoder and a player for the Nintendo DS. &lt;a href=&quot;http://dsvideo.recoil.org/&quot;&gt;Head on over&lt;/a&gt; to see what all the fuss is about.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2007-09-10:58</id>
    <published>2007-09-10T00:52:00Z</published>
    <updated>2007-09-10T01:00:17Z</updated>
    <category term="Ruby &amp; Rails"/>
    <category term="code"/>
    <category term="mephisto"/>
    <category term="plugin"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://nick.recoil.org/2007/9/10/mephisto-plugin-to-allow-self-updating-links" rel="alternate" type="text/html"/>
    <title>Mephisto plugin to allow self-updating links</title>
<content type="html">
            &lt;p&gt;I&#8217;ve placed a page under &lt;a href=&quot;http://nick.recoil.org/code&quot;&gt;code&lt;/a&gt; which details a little plugin I&#8217;ve been working on for &lt;a href=&quot;http://mephistoblog.com/&quot;&gt;Mephisto&lt;/a&gt;. It&#8217;s designed to make links in your templates which need to point to the latest software release always valid. It scans a directory according to a shell glob expression, and gives back a block with the file path, name and version as local variables.&lt;/p&gt;


	&lt;p&gt;The shell glob expression can be passed in via the liquid template, as per normal with mephisto plugins, or it can be passed in as a special tag attached to the page which is being rendered. This allows per-page links, rather than per-template, and gives greater flexibility.&lt;/p&gt;


	&lt;p&gt;More information is on the &lt;a href=&quot;http://nick.recoil.org/code/mephisto-dynamic-file-link-plugin&quot;&gt;dynamic file link&lt;/a&gt; page.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2007-09-06:57</id>
    <published>2007-09-06T20:10:16Z</published>
    <updated>2007-09-06T20:10:16Z</updated>
    <category term="General"/>
    <link href="http://nick.recoil.org/2007/9/6/computer-lib" rel="alternate" type="text/html"/>
    <title>Computer Lib</title>
<content type="html">
            &lt;p&gt;I&#8217;ve just got hold of my first edition print of &lt;a href=&quot;http://www.amazon.co.uk/Computer-Dream-Machines-Theodor-Nelson/dp/0893470023/&quot;&gt;Computer Lib/Dream Machines&lt;/a&gt; by Ted Nelson. It&#8217;s an amazingly inspirational read, and covers a bewildering number of topics. It&#8217;s a shame that it&#8217;s a little too large to take on holiday with me to Italy.&lt;/p&gt;


	&lt;p&gt;&lt;img title=&quot;Computer Lib/Dream Machines book cover&quot; src=&quot;http://nick.recoil.org/assets/2007/9/6/computer_lib.jpg&quot; alt=&quot;Computer Lib/Dream Machines book cover&quot; /&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2007-09-04:53</id>
    <published>2007-09-04T19:54:00Z</published>
    <updated>2007-09-04T20:54:01Z</updated>
    <category term="TV"/>
    <category term="itv"/>
    <category term="itv2"/>
    <category term="legal reasons"/>
    <category term="timeshift"/>
    <category term="tv"/>
    <link href="http://nick.recoil.org/2007/9/4/freeview-s-timeshifted-channels" rel="alternate" type="text/html"/>
    <title>Freeview's timeshifted channels</title>
<content type="html">
            &lt;p&gt;Certain channels exist on &lt;a href=&quot;http://www.freeview.co.uk/&quot;&gt;Freeview&lt;/a&gt; which are nothing but &lt;a href=&quot;http://en.wikipedia.org/wiki/Timeshift_channel&quot;&gt;timeshifted&lt;/a&gt; content from another channel. By convention, these have been called &lt;strong&gt;plus 1&lt;/strong&gt; channels, so &lt;span class=&quot;caps&quot;&gt;ITV2&lt;/span&gt;+1 is a channel devoted to showing exactly what is on &lt;a href=&quot;http://en.wikipedia.org/wiki/ITV2&quot;&gt;&lt;span class=&quot;caps&quot;&gt;ITV2&lt;/span&gt;&lt;/a&gt;, delayed by one hour&#8230;.except it doesn&#8217;t.&lt;/p&gt;


	&lt;p&gt;&lt;img title=&quot;Sorry, for legal reasons we cannot broadcast the programme that was shown earlier on ITV2&quot; src=&quot;http://nick.recoil.org/assets/2007/9/4/itv_1_legal.jpg&quot; alt=&quot;Sorry, for legal reasons we cannot broadcast the programme that was shown earlier on ITV2&quot; /&gt;&lt;/p&gt;


	&lt;p&gt;The image above was shown last night between roughly 10 and 12pm, during the time when &lt;span class=&quot;caps&quot;&gt;ITV2&lt;/span&gt; was showing &lt;strong&gt;Beverly Hills Cop II&lt;/strong&gt;. Now I would think this is because &lt;span class=&quot;caps&quot;&gt;ITV2&lt;/span&gt; has paid for a particular number of showings during a given time period, and technically speaking, &lt;span class=&quot;caps&quot;&gt;ITV2&lt;/span&gt;+1 broadcasting it would constitute as another showing, and that would push it over that figure. This might also be related to whether or not the content had been shown on &lt;span class=&quot;caps&quot;&gt;ITV1&lt;/span&gt; before &lt;span class=&quot;caps&quot;&gt;ITV2&lt;/span&gt;, as is often the case.&lt;/p&gt;


	&lt;p&gt;This is, of course, a ridiculous waste of precious terrestrial bandwidth, and I wonder just how profitable it is for these &lt;strong&gt;+1&lt;/strong&gt; channels to be maintained. The usual way people would arrive at watching content on a +1 channel is if they&#8217;ve seen something on the non-timeshifted channel, and would like to see it from the beginning. This means the programme would have to be at least 1 hour long to begin with, and be sufficiently compelling to make people bother to find the +1 version of the channel.&lt;/p&gt;


	&lt;p&gt;These channels are also rendered useless when the viewer has a set-top box with a hard disk, and the box records the content they are interested in.&lt;/p&gt;


	&lt;p&gt;Last but not least, why not timeshift &lt;span class=&quot;caps&quot;&gt;ITV1&lt;/span&gt;, which appeals to a larger audience? Perhaps there would be even less actual content for an &lt;span class=&quot;caps&quot;&gt;ITV1&lt;/span&gt;+1 due to these rights restrictions. It would all depend on how much content is bought, and on what terms. Having said that, &lt;span class=&quot;caps&quot;&gt;ITV1&lt;/span&gt; is billed as &#8220;Top viewing&#8221;, whereas &lt;span class=&quot;caps&quot;&gt;ITV2&lt;/span&gt; is billed as &#8220;Top US shows&#8221;, according to the &lt;a href=&quot;http://www.itv.com/&quot;&gt;&lt;span class=&quot;caps&quot;&gt;ITV&lt;/span&gt; website&lt;/a&gt;, which would suggest &lt;span class=&quot;caps&quot;&gt;ITV2&lt;/span&gt; has more bought content.&lt;/p&gt;


	&lt;p&gt;I also think messages like the one above reduce the amount of trust the viewer has in a +1 channel. If they find something they would like to view from the beginning, but they&#8217;ve previously been denied the chance because of those legal reasons, they might not return in the future. This is exacerbated by the fact that no information is given to the viewer to suggest why the content can&#8217;t be shown, and it is left to them to puzzle it out.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2007-07-11:48</id>
    <published>2007-07-11T18:05:00Z</published>
    <updated>2007-08-17T19:09:45Z</updated>
    <category term="General"/>
    <category term="cappuccino"/>
    <category term="coffee"/>
    <category term="starbucks"/>
    <link href="http://nick.recoil.org/2007/7/11/starbucks-short-cappuccino" rel="alternate" type="text/html"/>
    <title>Starbucks short cappuccino</title>
<content type="html">
            &lt;p&gt;For some reason, I was reading the &lt;a href=&quot;http://www.slate.com/id/2133754/&quot;&gt;Slate article&lt;/a&gt; on the mysterious &lt;strong&gt;Short Capuccino&lt;/strong&gt; from Starbucks, and I thought I&#8217;d try it out in my local. The guy serving me, as described in the Slate article, didn&#8217;t bat an eyelid when I asked. 1.95 &lt;span class=&quot;caps&quot;&gt;UKP&lt;/span&gt; for a regular &lt;strong&gt;Tall&lt;/strong&gt; cappuccino, and 1.75 &lt;span class=&quot;caps&quot;&gt;UKP&lt;/span&gt; for a &lt;strong&gt;Short&lt;/strong&gt; cappuccino, and it&#8217;s definitely a better amount of milk in my opinion.&lt;/p&gt;


	&lt;p&gt;&lt;img title=&quot;Starbucks Short and Tall cappuccino&quot; src=&quot;http://nick.recoil.org/assets/2007/7/11/sbux_tall_short_cap.jpeg&quot; alt=&quot;Starbucks Short and Tall cappuccino&quot; /&gt;&lt;/p&gt;


	&lt;p&gt;This has been brought to you by the trashy coffee department&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2007-05-10:47</id>
    <published>2007-05-10T11:34:00Z</published>
    <updated>2007-09-05T23:09:37Z</updated>
    <category term="Games"/>
    <category term="game"/>
    <category term="homebrew"/>
    <category term="nds"/>
    <category term="wordwrap"/>
    <link href="http://nick.recoil.org/2007/5/10/wordwrap-a-fantastic-nds-homebrew-game" rel="alternate" type="text/html"/>
    <title>Wordwrap - A fantastic NDS homebrew game</title>
<content type="html">
            &lt;p&gt;I&#8217;ve spent much of my recent commuting time hunched over my &lt;span class=&quot;caps&quot;&gt;NDS&lt;/span&gt;, playing &lt;a href=&quot;http://forum.gbadev.org/viewtopic.php?t=13038&quot;&gt;Wordwrap&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;img src=&quot;http://nick.recoil.org/assets/2007/5/10/wordwrap_startup_screen.gif&quot; alt=&quot;Wordwrap startup screen&quot; /&gt;&lt;/p&gt;


	&lt;p&gt;It&#8217;s a very simple game which presents you with a number of letters, and you have to construct as many words out of them as possible, with or without a time limit, depending on your chosen game type. Simple, but very very engrossing.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2007-05-06:46</id>
    <published>2007-05-06T13:36:00Z</published>
    <updated>2007-09-05T23:11:52Z</updated>
    <category term="TV"/>
    <category term="bbc4"/>
    <category term="birthofnow"/>
    <category term="saki"/>
    <link href="http://nick.recoil.org/2007/5/6/who-killed-mrs-de-ropp" rel="alternate" type="text/html"/>
    <title>Who killed Mrs De Ropp?</title>
<content type="html">
            &lt;p&gt;For &lt;span class=&quot;caps&quot;&gt;BBC4&lt;/span&gt;&#8217;s Edwardian &lt;strong&gt;&lt;a href=&quot;http://www.bbc.co.uk/bbcfour/edwardians/highlights.shtml&quot;&gt;Birth of Now&lt;/a&gt;&lt;/strong&gt; season, they&#8217;ve commissioned a number of interesting programmes, but none quite as interesting as &lt;strong&gt;Who Killed Mrs De Ropp?&lt;/strong&gt;, which is based on three short stories by Saki. People have been likening Saki to a proto-Roald Dahl, but these stories definitely have a stronger appeal to adults, as mentioned in an &lt;a href=&quot;http://www.tvandsatelliteweek.com/features/Who_Killed_Mrs_De_Ropp_article_117304.html&quot;&gt;interview with Ben Daniels&lt;/a&gt; in TV and Satellite Week magazine. Daniels stars as the narrator, playing both Saki, and one of characters in the first story. The music, colour and directing are all fantastic, and one of the nicest touches is the seamless integration of the cut-out/silhouette style animation, representing the children&#8217;s imaginations, with the live action of the actors.&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://nick.recoil.org/assets/2007/5/6/who_killed_mrs_de_ropp_1.png&quot;&gt;&lt;img title=&quot;Ben Daniels as Saki&quot; src=&quot;http://nick.recoil.org/assets/2007/5/6/who_killed_mrs_de_ropp_1.png&quot; alt=&quot;Ben Daniels as Saki&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://nick.recoil.org/assets/2007/5/6/who_killed_mrs_de_ropp_2.png&quot;&gt;&lt;img title=&quot;The horribly good girl in the first story&quot; src=&quot;http://nick.recoil.org/assets/2007/5/6/who_killed_mrs_de_ropp_2.png&quot; alt=&quot;The horribly good girl in the first story&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://nick.recoil.org/assets/2007/5/6/who_killed_mrs_de_ropp_3.png&quot;&gt;&lt;img title=&quot;Nicholas' imagination in full flght&quot; src=&quot;http://nick.recoil.org/assets/2007/5/6/who_killed_mrs_de_ropp_3.png&quot; alt=&quot;Nicholas' imagination in full flght&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Well worth watching, if you get an opportunity&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2007-05-06:45</id>
    <published>2007-05-06T11:13:00Z</published>
    <updated>2007-05-06T11:15:22Z</updated>
    <category term="Ruby &amp; Rails"/>
    <category term="rails railscasts hpricot"/>
    <link href="http://nick.recoil.org/2007/5/6/fetching-railscasts-with-hpricot" rel="alternate" type="text/html"/>
    <title>Fetching Railscasts with Hpricot</title>
<content type="html">
            &lt;p&gt;In the spirit of &lt;a href=&quot;http://redhanded.hobix.com/inspect/nostrils.html&quot;&gt;why&#8217;s original nostrils&lt;/a&gt; , I&#8217;ve made a small &lt;a href=&quot;http://code.whytheluckystiff.net/hpricot/&quot;&gt;Hpricot&lt;/a&gt; script to fetch me a set of screencasts from &lt;a href=&quot;http://railscasts.com/&quot;&gt;Railscasts&lt;/a&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;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;rubygems&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&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;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;hpricot&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&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;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;open-uri&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;uri=&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;http://railscasts.com/episodes/&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;from,to=*&lt;span class=&quot;pc&quot;&gt;ARGV&lt;/span&gt;.map { |arg| arg.to_i }&lt;tt&gt;
&lt;/tt&gt;(from..to).to_a.each &lt;span class=&quot;r&quot;&gt;do&lt;/span&gt; |ep|&lt;tt&gt;
&lt;/tt&gt;  doc = Hpricot(open(&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;uri&lt;span class=&quot;dl&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;il&quot;&gt;&lt;span class=&quot;dl&quot;&gt;#{&lt;/span&gt;ep&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;  puts (doc/&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;div.download&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;/span&gt;).first.at(&lt;span class=&quot;s&quot;&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;a&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;href&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;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;Then invoke by&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
ruby railscasts_downloader.rb 15 20 | xargs -n1 wget
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2007-04-16:44</id>
    <published>2007-04-16T23:11:00Z</published>
    <updated>2007-04-16T23:13:08Z</updated>
    <category term="blog"/>
    <category term="mephisto"/>
    <category term="typo"/>
    <category term="update"/>
    <link href="http://nick.recoil.org/2007/4/16/a-quick-note" rel="alternate" type="text/html"/>
    <title>A quick note</title>
<content type="html">
            &lt;p&gt;Just a very quick note to say that I&#8217;ve rolled out Mephisto as the tool which hosts this blog, after a somewhat par-for-the-course migration from Typo. I&#8217;ve done a little template styling, but most of the wrangling was re-hosting assets, and fiddling with database contents. I&#8217;m posting up more content about my recent work soon&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://nick.recoil.org/">
    <author>
      <name>nick</name>
    </author>
    <id>tag:nick.recoil.org,2006-09-08:34</id>
    <published>2006-09-08T20:14:00Z</published>
    <updated>2007-04-15T22:15:16Z</updated>
    <category term="Mac OS X"/>
    <category term="alert"/>
    <category term="box"/>
    <category term="growl"/>
    <category term="macosx"/>
    <category term="modal"/>
    <category term="ssh"/>
    <category term="sshkeychain"/>
    <link href="http://nick.recoil.org/2006/9/8/hacking-growl-support-into-sshkeychain-on-mac-os-x" rel="alternate" type="text/html"/>
    <title>Hacking Growl support into SSHKeychain on Mac OS X</title>
<content type="html">
            &lt;p&gt;After being inspired by &lt;a href=&quot;http://anil.recoil.org/&quot;&gt;Anil&lt;/a&gt;, I have also managed to eliminate the incredibly annoying way &lt;a href=&quot;http://www.sshkeychain.org/&quot;&gt;SSHKeychain&lt;/a&gt; creates modal alert boxes which get buried under every other window on your desktop, and prevent you from interacting with it before you dismiss them.&lt;/p&gt;


	&lt;p&gt;There are two aspects to my hackery. One is to introduce a very simple &lt;code&gt;sleep()&lt;/code&gt; call before the application responds to the &lt;code&gt;kIOMessageSystemHasPoweredOn&lt;/code&gt; message, which gets posted after a system has awoken from sleep. This stops any &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; tunnels you have defined from being initialised before the system has re-associated with its network properly. This is an issue more frequently encountered with wireless networks, which are slightly slower to respond, and the main reason I started this work. I was sick of hunting for, and clicking away endless boxes informing me that &#8220;The tunnel has unexpectedly terminated and could not be restarted.&#8221;&lt;/p&gt;


	&lt;p&gt;I have also managed to hack &lt;a href=&quot;http://growl.info/&quot;&gt;Growl&lt;/a&gt; support in to the application. The new alert panels look like this:&lt;/p&gt;


&lt;div&gt;&lt;img src=&quot;/assets/2007/4/10/SSHKeychain_with_growl_support.png&quot;&gt;&lt;/div&gt;

	&lt;p&gt;The messages are much less intrusive, and won&#8217;t prevent you from restarting any &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; tunnels if you just ignore them, unlike the current &lt;code&gt;NSRunAlertPanel()&lt;/code&gt; method.&lt;/p&gt;


	&lt;p&gt;Incidentally, it&#8217;s worth mentioning here that I find &lt;span class=&quot;caps&quot;&gt;SSH&lt;/span&gt; tunnels very very useful for being able to send email via &lt;span class=&quot;caps&quot;&gt;SMTP&lt;/span&gt; no matter which network you are connected to. I have a permanent tunnel set up from localhost:2525 to the &lt;a href=&quot;http://recoil.org/&quot;&gt;recoil.org&lt;/a&gt; servers, and it means I only need one outbound server definition within Mail.app.&lt;/p&gt;
          </content>  </entry>
</feed>
