<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  >
<channel>
<title>Tim Hatch</title>
<link>http://timhatch.com/</link>
<description>Web journal of Tim Hatch, programmer, web designer, and panorama photographer</description>
<!--<updated>2008-08-21T10:44:29Z</updated>-->
<item>
  <title>Github Gist</title>
  <guid isPermaLink="true">http://timhatch.com/ark/2008/08/14/github-gist</guid>
  <link>http://timhatch.com/ark/2008/08/14/github-gist</link>
  <content:encoded><![CDATA[<p><a href="http://gist.github.com/5548"><img src="/db/posts/2008-08-14.02/github_gist.jpg" width="323" height="257" style="float: left; margin-right: 10px; margin-bottom: 10px;" alt="Yet Another Pastebin" /></a>I found out at the <a href="http://groups.google.com/group/sbonrails">SBonRails</a> meeting last night that Github is now offering a pastebin.  I know what you&#8217;re thinking, do we really need <em>another pastebin</em> but this one is fast, not annoying, and provides the history of the evolution of a paste as a git repo.  Pretty neat, and they use <a href="http://pygments.org/">Pygments</a> (a Python-based syntax highlighter I contribute to) for colorization, from what I assume is a Rails app.  I&#8217;d love to see more about how they integrated it (and some sort of api that lets me grab the metadata for which filetype a given paste is, for running daily tests, but that&#8217;s another post).</p>]]></content:encoded>
  <pubDate>Fri, 15 Aug 2008 02:06:45 -0700</pubDate>
</item>
<item>
  <title>Home Desk Setup</title>
  <guid isPermaLink="true">http://timhatch.com/ark/2008/08/14/home-desk-setup</guid>
  <link>http://timhatch.com/ark/2008/08/14/home-desk-setup</link>
  <content:encoded><![CDATA[<p>Berto asked about the state of my home work area, so here&#8217;s a quickly-annotated photo.  The two desktops stay on all the time but with some powersaving (Moya could sleep if I play with WOL and get it working).  Aeryn Sun is my G4 PowerBook (I joke it&#8217;s a SlowBook Pro), which is still fast enough for a whole lot of tasks. (Actually I&#8217;m writing this post on it!)  I&#8217;m slowly becoming a Mac shop as machines are becoming fast enough to run all my testing VMs on a single Linux box.</p>

<p><a href="/db/posts/2008-08-14.01/desk.jpg"><img src="/db/posts/2008-08-14.01/desk_sm.jpg" width="700" height="467" alt="Desk Photo, August 2008" /></a></p>

<p>The printer is a HL-2170w which has a quaint Web interface for configuring it, but works great with the Mac.  You can&#8217;t really see the SUA1000XL which is the most awesome UPS I&#8217;ve ever been able to hold off the ground without help.  It&#8217;s around 55 pounds and able to run the whole setup for 39 minutes (something on the order of 38% load, when I leave and the monitors powersave it goes down to 10% load and around 90 minutes runtime).  Behind the printer is the D-Link gigabit switch which works great and supports jumbo frames, and next to it (also not visible) is the first photo backup drive (HFS+, covered in a couple of paragraphs) and two external ReiserFS data drives.  Of course the printer is not on a UPS, since it draws too much on startup (the main UPSes actually kick on because the line voltage drops too much at that point, since I only have one circuit to my bedroom).</p>

<p><img src="/db/posts/2008-08-14.01/backup.jpg" width="295" height="346" alt="Backup Flowchart" style="float: right; margin-left: 10px; margin-bottom: 10px;" />The backup scheme I use for photos is pretty solid, I think. Coming out of the camera, I keep the photos on the flash card until they&#8217;re backed up fully in Texas, at which point I mark the card as erasable.  The last couple of months stay on my laptop, and everything before that is then on the external hard drive and in Texas, on a machine named Toothpaste (simply for the sheer joy of asking people &#8220;Where&#8217;s Toothpaste?&#8221; in everyday conversation).  Yearly it also gets burned to DVD and the DVDs are kept in a box with the expectation that I&#8217;ll never have to use them.  Toothpaste is a lowly Celeron 566 which is optimized to the hilt for low power consumption (around 25w idle, 45w with all disks spun up and transferring large amounts of data).</p>

<p>Astute readers who spend as much time at Ikea as I do might recognize the Galant desk surface and Vika Fagerlid legs.  I actually got the desk surface first from the as-is area and decided on the legs later (as I was running short of shelf space).  What you can&#8217;t see is that there is another, different leg at the back corner which is from another series which is 3/4&#8221; shorter than the others.  The solution was pretty simple, cut a piece of 1&#8201;&#215;&#8201;4 and screwed it on (this probably qualifies me for a post on <a href="http://ikeahacker.blogspot.com/">Ikea Hacker</a>, since <a href="http://ikeahacker.blogspot.com/2008/07/hack-hex.html">&#8220;cut the allen wrench and use in a drill&#8221;</a> made it into a post last month).</p>

]]></content:encoded>
  <pubDate>Fri, 15 Aug 2008 00:03:48 -0700</pubDate>
</item>
<item>
  <title>TeamsServer</title>
  <guid isPermaLink="true">http://timhatch.com/ark/2008/08/12/teamsserver</guid>
  <link>http://timhatch.com/ark/2008/08/12/teamsserver</link>
  <content:encoded><![CDATA[<p>Strange, I was looking for libjpeg headers on my Leopard machine today and noticed <code>/usr/share/wikid</code> which has some files unreadable by regular users which appear to be help files for some sort of collaboration server.  Part of it is a Subversion checkout of the local path <code>file:///Library/Collaboration/Groups/help/revisions</code>, which of course doesn&#8217;t exist, and the owner (<code>_teamsserver</code>) has a home directory of <code>/var/teamsserver</code>, which also doesn&#8217;t exist.</p>

<p>This doesn&#8217;t seem to be officially exposed anywhere on the Leopard client, but I can find references to a collaboration server by searching online.  Strange.</p>]]></content:encoded>
  <pubDate>Tue, 12 Aug 2008 20:34:48 -0700</pubDate>
</item>
<item>
  <title>Quick Howto for PIL on Leopard</title>
  <guid isPermaLink="true">http://timhatch.com/ark/2008/08/12/quick-howto-for-pil-on-leopard</guid>
  <link>http://timhatch.com/ark/2008/08/12/quick-howto-for-pil-on-leopard</link>
  <content:encoded><![CDATA[<p>If you are trying to get PIL working and get messages about missing jpeg or freetype support, here's the quickest way to get going:</p>

<ul><li><a href="http://www.pythonware.com/products/pil/">Download PIL 1.1.6 source package</a> and have the Developer Tools already installed</li>
<li>Patch setup.py with <a href="/db/posts/2008-08-12.01/leopard_freetype2.diff">this patch</a> so it can find the Freetype you already have. (<code>patch -p0 &lt; leopard_freetype2.diff</code>)</li>
<li><code>sudo apt-get install libjpeg</code> if you have fink (otherwise, build by hand and adjust paths)</li>
</ul>

<p>You can use it without jpeg support but <code>im.show()</code> has jpeg hardcoded as the filetype so you would need to work around that.</p>]]></content:encoded>
  <pubDate>Tue, 12 Aug 2008 20:26:32 -0700</pubDate>
</item>
<item>
  <title>Spaceship Operator</title>
  <guid isPermaLink="true">http://timhatch.com/ark/2008/08/08/spaceship-operator</guid>
  <link>http://timhatch.com/ark/2008/08/08/spaceship-operator</link>
  <content:encoded><![CDATA[<p><img src="/db/posts/2008-08-08.01/screencap.png" width="581" height="222" alt="Comic Sans Spaceship Operator" /></p>

<p><a href="http://chamaco.org/">Berto</a> thought it necessary to combine two of my peeves (perl and Comic Sans MS) into one image and send it to me in an innocuous name like &#8220;Picture 1.png&#8221; in Skype.  I closed it as soon as possible, but it just haunted me from the Leopard Dock when I returned from lunch.</p>]]></content:encoded>
  <pubDate>Fri, 08 Aug 2008 15:42:51 -0700</pubDate>
</item>
<item>
  <title>undefined symbol: Py_InitModule4_64</title>
  <guid isPermaLink="true">http://timhatch.com/ark/2008/08/07/py_initmodule4_64</guid>
  <link>http://timhatch.com/ark/2008/08/07/py_initmodule4_64</link>
  <content:encoded><![CDATA[<p>We ran into this error on Debian this morning, with a system that had more than one Python.</p>

<p>Typically this means that an extension was compiled against the wrong <code>Python.h</code>.</p>

<p>This just means that the calling Python interpreter and the extension don't
use the same version (one is Python 2.4, the other 2.5).  They were both
64-bit but the name changed in http://www.python.org/dev/peps/pep-0353/</p>

<p>Some commands to help debug this are <code>ldd</code> (to show dymanic 
library linking) and <code>nm</code> (to list exports).</p>
]]></content:encoded>
  <pubDate>Thu, 07 Aug 2008 16:05:05 -0700</pubDate>
</item>
<item>
  <title>Earthquake Yesterday</title>
  <guid isPermaLink="true">http://timhatch.com/ark/2008/07/30/earthquake-yesterday</guid>
  <link>http://timhatch.com/ark/2008/07/30/earthquake-yesterday</link>
  <content:encoded><![CDATA[<p>Looks like we had a 5.6 earthquake in the greater L.A. area yesterday.  We felt it at the office, but it wasn&#8217;t much since we are around 100 miles away (a bit like I was tapping my leg, only I was&#8217;t).  So I have seen a wildfire, evacuation, a heat wave, and an earthquake.  Now the only thing I need to be fully acclimated, the locals tell me, is a flood.  Good thing I live on a hill!</p>]]></content:encoded>
  <pubDate>Thu, 31 Jul 2008 00:10:26 -0700</pubDate>
</item>
<item>
  <title>Simulating a Rebase in Mercurial</title>
  <guid isPermaLink="true">http://timhatch.com/ark/2008/07/26/simulating-a-rebase-in-mercurial</guid>
  <link>http://timhatch.com/ark/2008/07/26/simulating-a-rebase-in-mercurial</link>
  <content:encoded><![CDATA[<p>I ran into this while doing some work with Pygments this morning &#8212; I 
continued working in a local repo without consciously realizing that a merge 
node had been created from my work yesterday.  If I had just pulled that merge
node before committing this morning, everything would be pretty.  But it 
wasn&#8217;t, and I wanted to avoid merging the merge which would then cause another
merge upstream.  Forgive the ascii art.</p>

<pre>       *   $PUSH1
       |\
       | * 
       |  \
       |   * $PUSH1
MERGE1 *--/ \
       |     \
       |\     * $CUR2, I don't want this.
       | \
       |  * $PUSH2, I want this, so I can...
MERGE2 *-/
</pre>

<p>Here&#8217;s how:</p>

<h4>Background</h4>

<p>I pushed <code>$PUSH1</code>, which got merged with <code>$TRUNK</code>, creating <code>$MERGE1</code>.</p>

<p>Some local changes (on top of <code>$PUSH1</code>) later, I am ready to push again (I have
<code>$CUR2</code> and want to end up with <code>$PUSH2</code> on top of <code>$MERGE1</code>).</p>

<p>First, enable the transplant extension.</p>

<pre>[extensions]
transplant=
</pre>

<p>Go ahead and pull so you have multiple heads in your local repo (don&#8217;t push to
your personal remote, any of <code>($MERGE1:$CUR2]</code> or you&#8217;ll have to go
through an extra set of steps first, below).</p>

<h4>Rebasing in HG</h4>

<pre># we start with two heads, $MERGE and $CUR2, and no uncommitted changes
hg update -C $MERGE
hg transplant --branch $CUR2
# at this point, your $MERGE head is updated to what we'll call $MERGE2
cd ..

# this is the easiest way to remove $CUR2's head
hg clone -r $MERGE2 repo new_repo
mv repo old_repo
mv new_repo repo
cd repo
hg push
</pre>

<h4>Extra steps if you pushed</h4>

<p>If you did push something on <code>$CUR2</code>&#8217;s line, you&#8217;ll need to fix that first.</p>

<pre>ssh remote

hg clone -r$MERGE1 remote new_remote
cp remote/.hg/hgrc new_remote/.hg/
# set permissions like they were before
mv remote old_remote
mv new_remote remote
</pre>
]]></content:encoded>
  <pubDate>Sat, 26 Jul 2008 12:58:46 -0700</pubDate>
</item>
</channel>
</rss>
