<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Patshead.com Blog</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/" />
    <link rel="self" type="application/atom+xml" href="http://blog.patshead.com/atom.xml" />
    <id>tag:blog.patshead.com,2010-09-01://2</id>
    <updated>2010-09-04T09:41:11Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 5.02</generator>

<entry>
    <title>Cocktail Cabinet Build:  Part 1 - Planning and Testing</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2010/09/the-beginning-of-an-arcade-cocktail-cabinet-build.html" />
    <id>tag:blog.patshead.com,2010://2.22</id>

    <published>2010-09-06T20:00:00Z</published>
    <updated>2010-09-04T09:41:11Z</updated>

    <summary> Galleria.loadTheme(&apos;http://patshead.com/js/galleria/themes/dots/galleria.dots.js&apos;); I have wanted to build an arcade cabinet for a very long time. I finally decided to stop thinking about doing it and actually do it! Some of the Inspiration I decided that I we are going to...</summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="arcade" label="arcade" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cocktailcabinet" label="cocktail cabinet" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gauntlet" label="gauntlet" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mortalkombat" label="mortal kombat" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<script src="http://patshead.com/js/galleria/galleria.js"></script>

<script>Galleria.loadTheme('http://patshead.com/js/galleria/themes/dots/galleria.dots.js');</script>

<p>I have wanted to build an arcade cabinet for a very long time.  I finally decided to stop thinking about doing it and actually do it!</p>

<h2>Some of the Inspiration</h2>

<p>I decided that I we are going to build a four player cocktail cabinet.  We like the design of the <a href="http://wiki.arcadecontrols.com/wiki/Crazy_Canadians_Custom_Cocktail">Crazy Canadian's Custom Cocktail Cabinet</a>.  We might use nice looking stain grade wood but I really like the look of <a href="http://wiki.arcadecontrols.com/wiki/The_NEON_MAME">The NEON MAME</a> cabinet with light blue T molding on a black cabinet.</p>

<h2>Some of our Constraints</h2>

<p>I think a cocktail cabinet will be more useful than an upright cabinet since it can also double as a table.  I want this build to be lean towards being a table instead of just a cocktail cabinet.  I don't want to have a box underneath, I want you to be able to pull a chair up to it and put your legs underneath.  I also don't want the controls to stick out past the glass tabletop.  I am also trying to keep the tabletop at about the usual height of a desk or table.</p>

<p>It turns out that this isn't going to be as easy as I thought at first.  The joysticks are fairly deep and you need enough room between the control panel and the glass so that you can comfortably use the controls.  Our joysticks drop about 3 inches below the top of the control panel and we think we need about 6 inches of clearance between the panel and the glass.  Fudging in 1 inch for the glass tabletop and the covering under the panel that will put the bottom of the controls 10 inches below the table top.</p>

<p>My desk here is about 30 inches high.  10 inches would below that would have the controls just about sitting on my chair.  We've been figuring the tabletop height will end up having to be somewhere around 34 inches (maybe 33 if we're lucky!).  It is a little on the high side but shouldn't be ridiculously tall.</p>

<p>Our life size white board diagrams have the tabletop dimensions at about 37 by 29 inches using a 24 inch LCD panel.  We've seen some deals on 36 inch square tabletop glass (for some reason square is significantly less expensive than a rectangle).</p>

<h2>Control Panel Layout</h2>

<p>We will definitely be using a 4 player layout.  We thought about putting two players on one of the long sides of the cabinet.  That would let me put the table up against a wall and it would be great for fighting games.  We think it might be a little too crowded, though, so we will probably go with one player to a side.</p>

<h2>What Games Do I Want to Support</h2>

<p>The most important game this cabinet needs to support is <a href="http://en.wikipedia.org/wiki/Mortal_Kombat_II">Mortal Kombat II</a>.  I was in high school when <a href="http://en.wikipedia.org/wiki/Mortal_kombat">Mortal Kombat</a> and <a href="http://en.wikipedia.org/wiki/Mortal_Kombat_II">Mortal Kombat II</a> were released and we used to play quite a bit.</p>

<p>The four player game I have in mind is <a href="http://en.wikipedia.org/wiki/Gauntlet_(arcade_game">Gauntlet</a>), though I'm sure there will be others.  There is no reason to limit the cabinet to arcade games.  I was thinking <a href="http://www.ufoot.org/liquidwar">Liquid War</a>  would be a good fit.</p>

<h2>The Parts We Have So Far</h2>

<p>I ordered joysticks, buttons, and connectors from <a href="http://groovygamegear.com">Groovy Game Gear</a>.  I was hoping to use their <a href="http://groovygamegear.com/webstore/index.php?main_page=product_info&amp;cPath=76_81&amp;products_id=235">GP-Wiz40</a>.  It looks like a good product and a good value (and an even better value if you don't mind soldering).  Unfortunately, we need 44 inputs and that is four too many.</p>

<p>I ended up going with an <a href="http://www.ultimarc.com/ipac1.html">I-PAC 4</a> from <a href="http://www.ultimarc.com">Ultimarc</a>.  It has more than enough inputs and didn't cost much more than a pair of  <a href="http://groovygamegear.com/webstore/index.php?main_page=product_info&amp;cPath=76_81&amp;products_id=235">GP-Wiz40</a> controllers.</p>

<p>I went with the <a href="http://groovygamegear.com/webstore/index.php?main_page=product_info&amp;cPath=65&amp;products_id=285">HAPP™ Super Arcade Joystick</a>.  I am surprised how happy I am with them.  They work very well as an 8 way joystick and they seem to make it pretty easy to perform circular style moves in Mortal Kombat.</p>

<p>I also got buttons for <a href="http://groovygamegear.com/webstore/index.php?main_page=product_info&amp;cPath=73&amp;products_id=279">players one through four</a> and six <a href="http://groovygamegear.com/webstore/index.php?main_page=product_info&amp;cPath=73&amp;products_id=184">HAPP Black Horizontal Pushbuttons</a> for each player.</p>

<h2>The Mock Up Test Controller</h2>

<p>We put some holes in a piece of wood and put together a test controller.  It works great.  The buttons feel right and the joystick feels great.  We will definitely be doing with the two-rows-of-three-buttons layout but I am unsure what sort of spacing and staggering they will have.  Yes, we indeed forgot to leave room for the <code>Player 1</code> button...</p>

<p>The test controller has very arcade like wide button spacing.  2.0 inches between button centers on the vertical, 1.625 inches on the horizontal.  It seems a little too wide, I will probably tighten that up for the final product.</p>

<p>Plopping the control panel down on my desk isn't ideal.  Getting the half-circle moves to go off is a little hit or miss because the controller slides around.  I don't think it will be a problem on the real controls that are bolted to the table.</p>

<div class="images">
<img src="/Assets/Controller.jpg">
<img src="/Assets/ControllerBoard.jpg">
<img src="/Assets/ControllerTest.jpg">
</div>

<h2>How Long is this Build Going to Take?</h2>

<p>Hopefully not too long!  We've been talking about this and drawing on the white board for probably two months so far.  Now that I have actually had a controller in my hands I am getting very excited.  </p>

<script>$('.images').galleria();</script>
]]>
        

    </content>
</entry>

<entry>
    <title>Automatically Configuring Multiple Heads with x.org</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2010/03/automatically-configuring-multiple-heads-with-xorg.html" />
    <id>tag:blog.patshead.com,2010://2.21</id>

    <published>2010-03-29T10:08:27Z</published>
    <updated>2010-09-02T10:11:47Z</updated>

    <summary><![CDATA[I just upgraded to a (way too) shiny HP Pavilion dv8t laptop and a pair of inexpensive Sceptre 1080p LCD panels. The laptop seems work pretty well with Linux. I&apos;m running Ubuntu 9.10 with a 2.6.34-rc1 kernel, before the laptop...]]></summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="disper" label="disper" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dv8t" label="dv8t" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hp" label="hp" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="xinerama" label="xinerama" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="xrandr" label="xrandr" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I just upgraded to a (way too) shiny <a href="http://www.shopping.hp.com/webapp/shopping/computer_can_series.do?storeName=computer_store&amp;category=notebooks&amp;a1=Category&amp;v1=High+performance&amp;series_name=dv8tqe_series&amp;jumpid=in_R329_prodexp/hhoslp/psg/notebooks/High_performance/dv8tqe_series">HP Pavilion dv8t</a> laptop and a pair of inexpensive <a href="http://patshead.com/BlogImages/DeskAndMonitors1.jpg">Sceptre 1080p LCD panels</a>.  The laptop seems work pretty well with Linux.  I&apos;m running <a href="http://ubuntu.com">Ubuntu 9.10</a> with a 2.6.34-rc1 kernel, before the laptop got here I read that the latest kernels have better support for Turbo Boost.  I don&apos;t know for sure if the kernel is helping me but nearly every piece of hardware is working fine without any tweaking.  So far I am unable to control bass/treble (the sub woofer makes it pretty loud this way), it does not report how fast the battery is being drained, and I&apos;m unable to connect to my 802.11a access point.</p>

<p>These <a href="http://patshead.com/BlogImages/DeskAndMonitors1.jpg">Sceptre LCD panels</a> are WAY too red.  I read warnings in the <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16824112017">comments on Newegg</a> before I bought them but I figured they couldn&apos;t be that bad.  They are.  Reds and oranges are quite bright.  I&apos;ve tried to tone them down and I&apos;m not very happy with any of my results.  I got exactly what I paid for.</p>

<h1>What is All This Really About?</h1>

<p>Enough about the new hardware!  My goal was to be able to plug the laptop into the monitors and have everything just work without any manual intervention.  If the two Sceptres are plugged in I want the desktop to automatically expand across them and shut of the laptop display.  When they&apos;re unplugged I want it to revert to the laptop display.</p>

<h1>Using Two Monitors with an Nvidia Card</h1>

<p>I started with the open source driver and <code>xrandr</code>.  Using the VGA port was not a problem.  For some reason the open source driver was unable to detect when a device was plugged into the HDMI port.  The proprietary Nvidia drivers did not have this problem.  My hardware is able to drive any two out of the three displays.  Unfortunately, it is not even able to use the third as a mirror of one of the other two.</p>

<h1>Controlling the Outputs from the Command Line</h1>

<p>I found an application called <a href="http://willem.engen.nl/projects/disper/"><code>disper</code></a> that makes it very easy to control the active outputs from the command line.  First I used the <code>nvidia-settings</code> application to set up the two external displays the way I wanted them.  Then I exported the settings with <a href="http://willem.engen.nl/projects/disper/"><code>disper</code></a>:</p>

<pre><code>disper --export &amp;gt; ~/.disper-sceptre
</code></pre>

<p>Then I used <code>nvidia-settings</code> to set up the single laptop display and ran:</p>

<pre><code>disper --export &amp;gt; ~/.disper-single
</code></pre>

<p><a href="http://willem.engen.nl/projects/disper/"><code>disper</code></a> can list the displays that are connected:</p>

<pre><code>wonko@zaphod:~$ disper --list
display DFP-0: CMO
 resolutions: 320x175, 320x200, 360x200, 320x240, 400x300, 416x312, 512x384, 640x350, 576x432, 640x400, 680x384, 720x400, 640x480, 720x450, 640x512, 700x525, 800x512, 840x525, 800x600, 960x540, 832x624, 960x600, 896x672, 928x696, 960x720, 1024x768, 1152x864, 1360x768, 1280x960, 1440x900, 1280x1024, 1400x1050, 1600x1024, 1680x1050, 1920x1080
display CRT-0: Sceptre X226W-1920
 resolutions: 320x240, 400x300, 512x384, 680x384, 640x480, 720x450, 700x525, 840x525, 800x600, 960x540, 832x624, 960x600, 1024x768, 1152x864, 1360x768, 1280x960, 1440x900, 1280x1024, 1400x1050, 1680x1050, 1920x1080
display DFP-1: Sceptre X226W-1920
 resolutions: 320x175, 320x200, 360x200, 320x240, 400x300, 416x312, 512x384, 640x350, 576x432, 640x400, 680x384, 720x400, 640x480, 720x450, 640x512, 700x525, 800x512, 840x525, 800x600, 960x540, 832x624, 960x600, 896x672, 928x696, 960x720, 1024x768, 1152x864, 1360x768, 1280x960, 1440x900, 1280x1024, 1400x1050, 1600x1024, 1680x1050, 1920x1080
</code></pre>

<p>I wrote a short daemon style shell script that periodically checks the connected displays and passes the correct settings to  <a href="http://willem.engen.nl/projects/disper/"><code>disper</code></a>:</p>

<pre><code> #! /bin/bash

sleep 8  # The script crashes my X server if it ran too early

while [ 1 ];
do
  if [ `disper -l | grep -c X226W-1920` == 2 ]; then
    disper -i &amp;lt; ~/.disper-sceptre-dual
  else
    disper -i &amp;lt; ~/.disper-single
    sleep 2;
    xset dpms force on  # laptop display won&amp;apos;t wake up without this
  fi

  sleep 10
done
</code></pre>

<p>I needed to add the <code>xset dpms force on</code> line or else my display would never wake up on its own.  I don&apos;t know how specific that is to my hardware.</p>

<h1>Xinerama and Xrandr</h1>

<p>I don&apos;t see any reason why this couldn&apos;t be adapted to work with Xinerama and <code>xrandr</code>.  <code>xrandr</code> can easily be used to detect and configure the displays.  I know <code>xrandr</code> sometimes causes the screens to briefly go blank on my old laptop when it was detecting displays.  That would be a bit problematic...</p>
]]>
        

    </content>
</entry>

<entry>
    <title>A Quick Port of App::EditorTools to Emacs</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2010/03/a-quick-port-of-appeditortools-to-emacs.html" />
    <id>tag:blog.patshead.com,2010://2.20</id>

    <published>2010-03-08T11:01:45Z</published>
    <updated>2010-09-02T10:02:23Z</updated>

    <summary><![CDATA[I saw an article about Stealing from Padre for Vim and I got a bit jealous that this functionality wasn&apos;t already available for Emacs. I guess I lucked out because it was very easy to make use of App::EditorTools in...]]></summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="appeditortools" label="app::editortools" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="emacs" label="emacs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="padre" label="padre" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I saw an article about <a href="http://code-and-hacks.blogspot.com/2009/07/stealing-from-padre-for-vim-part-3.html">Stealing from Padre for Vim</a> and I got a bit jealous that this functionality wasn&apos;t already available for <a href="http://www.gnu.org/software/emacs/">Emacs</a>.  I guess I lucked out because it was very easy to make use of App::EditorTools in <a href="http://www.gnu.org/software/emacs/">Emacs</a>.</p>

<p>It probably took about a half hour to an hour to get this all up and running.  The hardest part was actually tracking down the elisp functions that would return the current row and column of the beginning and end of a region.  The terminology was just not easy to search for.</p>

<p>I did not include any default bindings in the package.  I am still not entirely sure where their permanent home will be within my own config.  For now I am using these:</p>

<pre><code>(define-key cperl-mode-map (kbd &amp;quot;C-c e r&amp;quot;) &amp;apos;editortools-vim-renamevariable)
(define-key cperl-mode-map (kbd &amp;quot;C-c e t&amp;quot;) &amp;apos;editortools-vim-introducetemporaryvariable)
</code></pre>

<p>I don&apos;t think I want a binding for the <code>renamepackage/renamepackagefrompath</code> functions.  I think I might set it up to call one of those automatically when I create a new file.</p>

<p>The elisp file can be found at:</p>

<p><a href="http://rcs.patshead.com/dists/editortools-vim-el/">http://rcs.patshead.com/dists/editortools-vim-el/</a></p>

<p>A Darcs repository is also available at <a href="http://rcs.patshead.com">http://rcs.patshead.com</a>.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Huge Low Cost Whiteboards and How To Keep Them Clean</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2010/03/huge-low-cost-whiteboards-and-how-to-keep-them-clean.html" />
    <id>tag:blog.patshead.com,2010://2.18</id>

    <published>2010-03-01T10:55:01Z</published>
    <updated>2010-09-02T09:55:41Z</updated>

    <summary><![CDATA[I am a huge fan of whiteboards. I can never have enough. Early last year I started hanginging some inexpensive 4 by 8 foot melamine panels in my new home office. One of the three walls wasn&apos;t big enough for...]]></summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="magiceraser" label="magic eraser" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="melamine" label="melamine" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="whiteboard" label="whiteboard" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I am a huge fan of whiteboards.  I can never have enough.  <a href="http://patshead.com/Pictures/2009-01-06/">Early last year</a> I started hanginging some inexpensive 4 by 8 foot melamine panels in my new home office.  One of the three walls wasn&apos;t big enough for a full sheet.  I had to cut that one to 4 by 5 feet.</p>

<p>After over a year of use I am still very happy with all 84 square feet of melamine whiteboard.  When I was first purchasing the melamine I read a lot of complaints about how hard it can be to cleanly erase them, especially after the ink has been on there for an extended period of time.</p>

<p>I am using <a href="http://www.amazon.com/gp/product/B0004F7GUI?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0004F7GUI">Expo Low Odor Dry Erase Markers</a>.  I&apos;ve read that they can be more problematic, but that is the only kind that were on the shelf the day I was shopping for them.  One of the colors didn&apos;t like to erase very well.  We hung some of the left over whiteboard inside the door of our pantry.  Any colors that ended up being difficult (or ugly, like brown) ended up in there.</p>

<p>Most of the colors that I use have erased pretty easily even after setting in for two months or more, but at that point that usually require a bit more effort.  Unfortunately, today I had my first complete failure at erasing.  The area I was trying to erase had been written on for almost a full year.</p>

<p>I don&apos;t have any special whiteboard cleaners here.  First I reached for my little bottle of screen cleaner, my own mix of a small amount of glass cleaner in water.  It worked just as well as the undiluted glass cleaner I tried next, which is not at all.</p>

<p>Fortunately, I remembered that I had a cheap generic Mr. Clean Magic Eraser in the closet.  I sprayed the whiteboard with my screen cleaner, since it was handier than water, scrubbed away.  Everything came clean with barely any elbow grease.  It was quite awesome!</p>

<p>I am apparently <a href="http://www.wikihow.com/Erase-Old-Marks-off-a-Dry-Erase-Board">not</a> <a href="http://lifehacker.com/132463/how-to-eliminate-whiteboard-ghosts">the</a> <a href="http://www.creativehomemaking.com/cleaning/magic-eraser.shtml">first</a> person to think of this.</p>

<p>I did see some people who were wary of using these on whiteboards because they are a mild abrasive that might eventually wear down the writing surface.  These melamine boards were very inexpensive.  I wouldn&apos;t mind replacing them every few years.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>My Dead Intel X25-M and My Experience with Intel&apos;s RMA Process</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2010/02/my-dead-intel-x25-m-and-my-experience-with-intels-rma-process.html" />
    <id>tag:blog.patshead.com,2010://2.19</id>

    <published>2010-02-22T10:55:54Z</published>
    <updated>2010-09-02T10:01:15Z</updated>

    <summary><![CDATA[My Intel 80 GB X25-M G2 in my laptop died recently. Everything was running smoothly when I shut down but when I powered back up the BIOS couldn&apos;t see the drive any longer. Fortunately, I keep pretty good backups and...]]></summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="intelx25" label="intel x25" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>My Intel 80 GB X25-M G2 in my laptop died recently.  Everything was running smoothly when I shut down but when I powered back up the BIOS couldn&apos;t see the drive any longer.  Fortunately, I keep pretty good backups and I was up and running on a spare platter drive relatively quickly.</p>

<p>The RMA process was pretty disappointing.  Phoning Intel was the only option.</p>

<p>I called in the afternoon on Monday, February 1, since they are only available during business hours.  My time on hold was pretty short, probably about five minutes and it took less than 10 minutes to get the RMA rolling.  I was told I&apos;d receive an email shortly with RMA instructions.</p>

<p>I didn&apos;t receive an email.  At that point it was after business hours so I used their web based form to submit a question.  I included my RMA and case numbers, and I never heard back from them.</p>

<p>At this point there is a delay that is completely my fault.  I didn&apos;t get a chance to call back until a week later on Monday, February 8.  It turned out they got my email address wrong.  I pronounced my email address and I spelled it to them letter for letter.  They didn&apos;t only have it wrong, they were short on characters...</p>

<p>I was happy with the turn around time on the package.  I had the drive at the post office on Tuesday, February 9 and the new drive arrived at my door on Tuesday, February 16.</p>

<p>The night of my second call to Intel I realized there was a pretty good chance they also didn&apos;t get my address correct.  They do not include your shipping address in the RMA email.  This time I sent an email to the address listed in the RMA email which is rma@mailbox.intel.com.  I never heard anything back.</p>

<h2>My Overall Opinion</h2>

<p>I was happy with the service once I was able to get to the point where I was able to ship the drive out.  I&apos;m generally unhappy with their telephone support, and I am extremely disappointed with their email communications.  </p>

<h2>I Sure Did Miss the SSD</h2>

<p>Certain tasks were noticeably slower.  Most of the time the performance difference isn&apos;t something you can feel but some disk intensive tasks are significantly faster with the SSD.  Things like booting, installing and updating a large number of packages with apt, and importing photos into F-Spot are at least twice as fast with the X25.</p>

<p>The thing I noticed most was the heat.  When I first moved from the old hot platter drive to the X25 I didn&apos;t think the difference was so dramatic.  Running on the SSD for months sure made the platter drive feel scary hot.  The SSD is warm underneath the laptop where there is only piece of plastic covering and physically touching the drive.  </p>

<p>The platter drive even made the top of the laptop very warm to the touch.  The difference in temperature is huge.</p>

<h2>Update:  The replacement drive died in the middle or April 2010 (about 3 months later).  It died in a different make/model laptop (HP dv8t), but under similar circumstances.  The drive was fine when the laptop was cleanly shut down, the BIOS could no longer see the drive on next boot.  The replacement-for-the-replacement has been running fine since then, it is now September 2010.</h2>
]]>
        

    </content>
</entry>

<entry>
    <title>Testing btrfs Root File System on Ubuntu</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2010/02/testing-btrfs-root-file-system-on-ubuntu.html" />
    <id>tag:blog.patshead.com,2010://2.17</id>

    <published>2010-02-05T10:53:50Z</published>
    <updated>2010-09-02T09:54:36Z</updated>

    <summary><![CDATA[I&apos;m starting to get impatient. I really want to start running a next generation file system. I&apos;d like to have easy to manage sub volumes, block level checksums, and RAID-like redundancy at a higher level. Writable snapshots are what I&apos;m...]]></summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="btrfs" label="btrfs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="linux" label="linux" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="qemu" label="qemu" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="zfs" label="zfs" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I&apos;m starting to get impatient.  I really want to start running a next generation file system.  I&apos;d like to have easy to manage sub volumes, block level checksums, and RAID-like redundancy at a higher level.</p>

<p>Writable snapshots are what I&apos;m most excited about, though.  Snapshots of my home directory will help protect me from accidental file deletions and modifications between backups.</p>

<p>I&apos;m currently saving disk space with my QEmu disk images by juggling cloned qcow images.  It should be much easier to manage some writable Btrfs snapshots instead.  Deduplication would likely save me quite a bit of space as the virtual machines age.  ZFS already has deduplilcation but it sounds like deduplication won&apos;t be all that far away for Btrfs.</p>

<h2>What are the Best Practices for a Btrfs Root File System?</h2>

<p>I have absolutely no idea, but I think I am on the right track.  I did not want to use the root of the Btrfs file system as my <code>/</code> file system.  I created a sub volume called <code>rootfs</code> instead.  I mounted that sub volume as <code>/</code> and I mounted the entire Btrfs volume under <code>/mnt/btrfs</code>.</p>

<p>Doing it this way felt pretty well organized.  From this point it would be pretty easy to create a <code>homefs</code> and a <code>tmpfs</code>.  I didn&apos;t want to break out <code>/var/</code> or <code>/usr</code>.  That would make it too difficult to snapshot the operating system between upgrades.</p>

<h2>Overview of How to Get it All Up and Running</h2>

<p>There is a tool to convert and ext3 or ext4 file system to Btrfs.  I didn&apos;t use them and I don&apos;t know if they would allow me to lay out the file system the way I was hoping.  I ended up doing it the long way.</p>

<p>This isn&apos;t going to be a step by step guide.  The quick overview of the steps was:</p>

<ul>
<li>Install Ubuntu 9.10, small ext2 or ext3 boot partition</li>
<li>Compile and install kernel 2.6.32 and the latest btrfs-utils (you can skip this if you don&apos;t need snapshot removal)</li>
<li>Add btrfs.ko, zlib_deflate.ko, and crc32c.ko to the initramfs</li>
<li>Backup everything on the <code>/</code> file system</li>
<li>Create a Btrfs on the old <code>/</code> block device, create a <code>rootfs</code> sub volume</li>
<li>Restore the old <code>/</code> file system contents to the <code>rootfs</code> subvolume</li>
</ul>

<h2>GRUB and fstab</h2>

<p>You&apos;ll have to change your <code>root</code> kernel parameter and add a <code>rootflags</code> parameter:</p>

<pre><code>root=/dev/sda2 rootflags=subvol=rootfs
</code></pre>

<p>I left <code>fstab</code> just pointing to /dev/sda2.  That seemed to be work fine and allowed me to boot from different snapshots.  I also added a line to mount <code>/dev/sda2</code> under <code>/mnt/btrfs</code>.</p>

<h2>Snapshotting and Booting from a Snapshot</h2>

<p>I created a snapshot of <code>rootfs</code> called <code>rootfs-1</code> and then I performed an <code>apt-get dist-upgrade</code> and installed a few extra packages.  It wasn&apos;t a huge change but it was enough to test booting from a snapshot.</p>

<p>Booting from a snapshot turned out to be easy.  At the start of boot I chose to edit the GRUB entry before booting.  I just changed <code>subvol=rootfs</code> to <code>subvol=rootfs-1</code>.  It would probably be pretty easy to automatically generate a GRUB menu with all the snapshots as options.</p>

<h2>One Little GRUB Hiccup</h2>

<p><code>update-grub</code> ran fine the first time, while my root filesystem was still ext4.  <code>update-grub</code> got angry and wouldn&apos;t update properly with a Btrfs root.  I don&apos;t have a good fix for this yet, I just kept fiddling with the GRUB entries during boot.</p>

<h2>GRUB, Btrfs, and Kernels</h2>

<p>Being able to snapshot root will be very handy.  I&apos;d be tempted to set up some automation to snapshot root every day and at every <code>apt-get upgrade</code>.  </p>

<p>Unfortunately, GRUB doesn&apos;t understand Btrfs or its snapshots.  Kernels and initrd images have to be stored on a boot partition that won&apos;t support snapshots.  That makes the kernel the weak link in the upgrade chain.</p>

<p>It would be nice if the boot loader could pull a kernel straight from the snapshot.   That would let you keep your snapshots more self contained.  I don&apos;t feel this is very important, though.  Snapshots of root alone will be a huge step forward.</p>

<h2>Sorry for the Lack of Screen Shots</h2>

<p>My X25 died this week and I didn&apos;t get around to backing up my Btrfs virtual machine.  I didn&apos;t think I would need to back up that image because I was planning on deleting it after I wrote this article.</p>

<p>I am seriously considering giving Btrfs a try on my laptop when the replacement X25 gets here.  I will post some screen shots if I do.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>What the Internet Didn&apos;t Tell Me About My Moka Express</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2010/01/what-the-internet-didnt-tell-me-about-my-moka-express.html" />
    <id>tag:blog.patshead.com,2010://2.16</id>

    <published>2010-01-19T10:50:25Z</published>
    <updated>2010-09-02T09:51:51Z</updated>

    <summary><![CDATA[I b ought my first Moka Express about a year ago. It is a wonderful little machine. It is very easy to use, simple to k eep clean, and durable. It doesn&apos;t take up any counter space and it is...]]></summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="burrgrinder" label="burr grinder" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="coffee" label="coffee" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mokaexpress" label="moka express" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I b
ought my first <a href="http://www.amazon.com/gp/product/B0001WYDP0?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0001WYDP0">Moka Express</a> about a year ago.  It is a wonderful little machine.  It is very easy to use, simple to k
eep clean, and durable.  It doesn&apos;t take up any counter space and it is easy to take with me when I travel.  It also makes a good strong espresso-like coffee.</p>

<p>I should probably mention here that I am not a coffee aficionado.  I can&apos;t tell the difference between coffee I ground today or last month.  A lot of people would probably say I don&apos;t even really like coffee.  </p>

<p>I do like French Vanilla creamer and caramel syrup, though.    I don&apos;t make proper coffee beverages.  I usually mix about 1/3 <a href="http://www.amazon.com/gp/product/B0001WYDP0?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0001WYDP0">Moka Express</a> coffee with 2/3 french vanilla creamer (50/50 if it&apos;s iced) with a bit of caramel syrup.</p>

<p>We have a <a href="http://www.amazon.com/gp/product/B000GTR2F6?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000GTR2F6">Keurig K-Cup machine</a>.  I can only get a strong enough brew out of it to make a coffee the way I like if I use the iced-coffee (3.25 oz) setting and use it to make a hot coffee.  Even on that setting it is much, much weaker than what comes out of the <a href="http://www.amazon.com/gp/product/B0001WYDP0?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0001WYDP0">Moka Express</a>.  It may not be as strong, but it sure is fast and convenient.</p>

<p>I&apos;ve learned a lot about brewing coffee with the <a href="http://www.amazon.com/gp/product/B0001WYDP0?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0001WYDP0">Moka Express</a> over the last 12 months.  Some of what I learned is exactly the opposite of what &quot;The Internet&quot; told me.</p>

<h1>Don&apos;t Grind the Coffee Too Fine, Watch Out For Dust</h1>

<p>The first batches of coffee I made with my <a href="http://www.amazon.com/gp/product/B0001WYDP0?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0001WYDP0">Moka Express</a> were awesome.  After a while, things got bitter.  Tiny grounds of coffee were making it through the filter into my beverage.</p>

<p>It turned out that the pre-ground coffee we had lying around was probably processed with a blade style grinder.  No matter how coarse the grind, a blade grinder will generate tiny grains of coffee dust.  These pass right through the metal filter and make the brew extremely bitter.</p>

<p>My first attempts at grinding my own beans failed in the same way, since I was using a cheap blade type grinder.  I picked up an inexpensive <a href="http://www.amazon.com/gp/product/B0024NKME0?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0024NKME0">Nesco burr grinder</a>.  Now my brews are consistent and taste better than ever.</p>

<p>My good friend, &quot;The Internet,&quot; told me to grind the beans finer than for a drip machine.  I&apos;m actually getting much better results on a slightly coarser setting (the 6.5-7.0 setting on my <a href="http://www.amazon.com/gp/product/B0024NKME0?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0024NKME0">Nesco</a>).</p>

<p>When I ground too fine the water couldn&apos;t get through the grounds.  The valve would whistle, it&apos;d take forever to brew, and it would taste terrible.</p>

<p>I&apos;ve made plenty of tasty non-bitter coffee with pre-ground mass produced coffee.  If you&apos;re buying pre-ground you will just have to find one that works.  You can also probably grind the coffee in the store.</p>

<h1>It is OK to Pack the Coffee</h1>

<p>You sure don&apos;t want to tamp it down like you would in an espresso machine, but I do lightly pack the coffee into the pot.  I probably fit an extra teaspoon or more in there this way.</p>

<p>You know you packed it too tight if the pressure release valve starts whistling.</p>

<h1>How Much Heat?</h1>

<p>I&apos;ve read all sorts of ideas related to applying heat...</p>

<p>I crank the stove up all the way.  Right before the coffee starts flowing, you&apos;ll recognize the sound, I turn it down to about half heat.  It brews quite a bit slower than at full heat and it seems to taste better.  I haven&apos;t really done any sort of blind taste test here, though.</p>

<h1>Light or Dark Roast?</h1>

<p>This is more about personal taste than anything else.  I prefer to use a lighter roast.  I&apos;ve been buying huge, cheap bags of Sam&apos;s Club brand breakfast blend coffee.  We&apos;re happy with the taste and the price.</p>

<p>We managed to buy a huge bag of Sam&apos;s Club French Roast coffee.  We really didn&apos;t know our coffee lingo at the time.  We did not know that French Roast was the darkest over-burnt coffee.  I feel it is way too dark.  It has been handy to have around, though.  I sometimes throw a few spoonfuls in with the breakfast blend if we want a darker tasting coffee.</p>

<h1>Is it Hard to Keep Clean?</h1>

<p>My old friend, &quot;The Internet,&quot; tells me that the coffee tastes better when the walls of the pot are coated with coffee oils.  I don&apos;t actually know if this is true or not.</p>

<p>I rarely use any soap to clean it, though.  As long as I use the pot every other day or so, I just take it apart and rinse it before each use.  Just make sure you empty and rinse the top of the pot out after you use it.  If you don&apos;t you will have scrub out the dried out, caked on day old coffee.</p>

<h1>How Does it Compare to Proper <a href="http://en.wikipedia.org/wiki/Espresso">Espresso</a>?</h1>

<p>I have absolutely no idea.  I do know that the <a href="http://www.amazon.com/gp/product/B0001WYDP0?ie=UTF8&amp;tag=patsheadcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0001WYDP0">Moka Express</a> produces a much stronger, more caffeinated brew than a drip machine.  They are also much cheaper than a proper <a href="http://en.wikipedia.org/wiki/Espresso">Espresso</a> machine and seem easier to maintain.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Dirt Cheap Extended Battery for the T-Mobile G1/HTC Dream</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2010/01/dirt-cheap-extended-battery-for-the-t-mobile-g1htc-dream.html" />
    <id>tag:blog.patshead.com,2010://2.14</id>

    <published>2010-01-06T10:47:26Z</published>
    <updated>2010-09-02T09:49:01Z</updated>

    <summary><![CDATA[I&apos;ve been fairly unhappy with the battery life of my G1. With the stock 1150mAh battery I am lucky to get 12 hours out of it most of the time. I was once able to use 49% of my battery...]]></summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="battery" label="battery" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="htcdream" label="htc dream" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tmobileg1" label="t-mobile g1" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I&apos;ve been fairly unhappy with the battery life of my G1.  With the stock 1150mAh battery I am lucky to get 12 hours out of it most of the time.  I was once able to use 49% of my battery in an hour and a half by driving to a doctor&apos;s office and surfing the web in the waiting room...  Bluetooth was at the top of the list of battery consumers, so be sure to turn that off if you don&apos;t need it.</p>

<p>I found a cheap <a href="http://www.dealextreme.com/details.dx/sku.27003">2300mAh battery</a> at <a href="http://www.dealextreme.com">dealextreme.com</a>.  I&apos;ve ordered lots of cheap gadgets and cables from them in the past, so I figured it&apos;d be worth spending $11.22 at this battery to try it out.  They ship their items, slowly, from Hong Kong.  I think it took between about 3 weeks to get the battery.</p>

<h1>How long does it last?</h1>

<p>I haven&apos;t actually run it down to empty yet.  The first day I had it I ran it down to 25% in a little over 19 hours.  I had everything enabled except Bluetooth.  I watched a little over an <a href="http://www.imdb.com/title/tt0390384/">hour of video</a>, listened to some <a href="http://en.wikipedia.org/wiki/SHOUTcast">SHOUTcast</a> radio with <a href="http://www.tunewiki.com">Tunewiki</a>, played a bunch of games, read email, and surfed the web.  I tried to use the phone as often as I could.  That last 25% should easily have put it over 24 hours, but I was tired and I needed a full battery for the next day.</p>

<h1>Just how big is that thing, anyway?</h1>

<p>I looked at a lot of batteries.  Nobody seems to give dimensions.  Unfortunately, I don&apos;t have anything terribly accurate like a <a href="http://en.wikipedia.org/wiki/Caliper">caliper</a> to measure this thing with.  I did come up with an easy way to convey the difference in thickness between the stock battery cover and this new battery cover.</p>

<p>The top part of the battery cover that sits over the camera is probably identical in thickness to the stock battery cover.  Just below the camera it gets thicker and it maintains that thickness all the way to the bottom of the phone. I was able to stack 3 <a href="http://en.wikipedia.org/wiki/Penny_%28United_States_coin%29">pennies</a> on the shallow side of the cover and it came out pretty flush with the deep side.  My good friend <a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a> tells me that a United States Penny is 1.55mm thick.  </p>

<p>My math tells me that the thickness of my phone has increased from 17.1mm to about 21.75mm.  That puts it just a smidge under the thickness of my old <a href="http://en.wikipedia.org/wiki/Treo_650">Treo 650</a>.  I think I can live with that.</p>

<h1>Is it heavy?  Does the cover fit well?</h1>

<p>I may not have a <a href="http://en.wikipedia.org/wiki/Caliper">caliper</a> handy but I do have access to a shipping scale!  The stock battery came out at 25g, the beefy new battery came out at 45g.</p>

<p>The first time I put the cover on the phone it didn&apos;t feel like it was going to fit.  I may have had to press it on a little harder but it fits very snugly with no gaps anywhere.</p>

<h2>Update 2010-01-06:</h2>

<p>My phone has mostly been sitting idle the last few days and I forgot to put it on the charger last night.  The battery use applet is showing that I&apos;ve been unplugged for a few minutes shy of 39 hours with 29% capacity remaining.  The three biggest battery wasters seem to be <code>Cell Standby</code>, <code>Bluetooth</code>, and <code>Phone Idle</code> all clocking in at 29%.  <code>Wi-Fi</code> clocked in at 9%, <code>Voice Calls</code> at 6%, and <code>Display</code> at 2%.  I was on the phone for about 45 minutes.  </p>

<p>All the power wasting goodies were turned on, GPS, Bluetooth, Wi-Fi, and Sync.  It probably helps that I live about a quarter of a mile from a cell tower.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Achieving Better Compression with lrzip and rzip</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2010/01/achieving-better-compression-with-lrzip-and-rzip.html" />
    <id>tag:blog.patshead.com,2010://2.15</id>

    <published>2010-01-05T10:49:13Z</published>
    <updated>2010-09-02T09:53:27Z</updated>

    <summary>I recently upgraded to Mozilla Thunderbird 3.0. That got me thinking that now might be a good time to clean up my local mail folders. All of my mail from the past few years is stored on my IMAP server....</summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="bzip2" label="bzip2" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="lrzip" label="lrzip" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rzip" label="rzip" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I recently upgraded to <a href="http://www.mozillamessaging.com/en-US/thunderbird/">Mozilla Thunderbird 3.0</a>.  That got me thinking that now might be a good time to clean up my local mail folders.  All of my mail from the past few years is stored on my IMAP server.  I still have a few gigabytes of old mail from my old POP3 days stored in <a href="http://www.mozillamessaging.com/en-US/thunderbird/">Thunderbird</a>&apos;s <code>Local Folders</code>.</p>

<p>I decided that now might be a good time to do some spring cleaning and not carry around my old POP3 mail anymore.  I figured it is also a good time to store this current copy of my old mail with my long term backups.</p>

<h1>My Old Friend <a href="http://rzip.samba.org"><code>rzip</code></a></h1>

<p>I have been using <a href="http://rzip.samba.org"><code>rzip</code></a> for quite a few years.  Its job is to find and encode large chunks of duplicated data over very large distances, up to 900 MB.  Once that is completes it runs the resulting data through <a href="http://en.wikipedia.org/wiki/Bzip2"><code>bzip2</code></a>.  For large datasets I&apos;ve found it to be much faster than <a href="http://en.wikipedia.org/wiki/Bzip2"><code>bzip2](http://en.wikipedia.org/wiki/Bzip2) and it usually results in an archive that is about 30% smaller than just using [</code>bzip2`</a>.</p>

<p>Unfortunately, <a href="http://rzip.samba.org"><code>rzip</code></a> can not operate on pipes.  All of my automated backup scripts run along pipelines, usually from <code>tar</code> to <a href="http://en.wikipedia.org/wiki/Bzip2"><code>bzip2</code></a> to <code>gpg</code>.  They never touch the disk unencrypted, which probably isn&apos;t always helpful.</p>

<h1>My New Friend <a href="http://ck.kolivas.org/apps/lrzip/"><code>lrzip</code></a></h1>

<p>I recently discovered Con Kolivas&apos; <a href="http://ck.kolivas.org/apps/lrzip/"><code>lrzip</code></a>.  <a href="http://ck.kolivas.org/apps/lrzip/"><code>lrzip</code></a> takes <a href="http://rzip.samba.org"><code>rzip</code></a> a couple steps further.  It lets you choose a compressor other than <a href="http://en.wikipedia.org/wiki/Bzip2">`bzip2</a> for the second stage of compression.  It can also be used in a pipe.</p>

<p>Unfortunately, when used in a pipe it generates a large temp file.  This can be a problem if you are trying to generate a large archive and don&apos;t have a lot of free disk space, or if you don&apos;t want unencrypted data being written to the disk.</p>

<h1>Some Benchmarks</h1>

<p>I compressed the tarball of my <code>.thunderbird</code> directory every way I could think of that made sense.  The default settings for <a href="http://ck.kolivas.org/apps/lrzip/"><code>lrzip</code></a> kept erroring out on me at about 30%.  I had to use the <code>-w</code> switch to reduce the window size from 20.  I chose 12, which should be about 30% higher than <a href="http://rzip.samba.org"><code>rzip</code></a>&apos;s window.  </p>

<pre><code>              Size    Minutes    Ratio
              (MB)
uncompressed  5761         na    1.0:1
lrzip zpaq    1207        265    4.7:1
lrzip lzma    1262         60    4.5:1
lrzip bzip2   1401         27    4.1:1
rzip          1362         20    4.2:1
lzma          1441         97    4.0:1
bzip2         1748         38    3.3:1
</code></pre>

<p>Both <a href="http://rzip.samba.org"><code>rzip</code></a> and <a href="http://ck.kolivas.org/apps/lrzip/"><code>lrzip</code></a> achieved a smaller file size in less time than <a href="http://en.wikipedia.org/wiki/Bzip2"><code>bzip2</code></a>.  <a href="http://ck.kolivas.org/apps/lrzip/"><code>lrzip</code></a> with <a href="http://en.wikipedia.org/wiki/PAQ"><code>zpaq</code></a> is over 13 times slower than <a href="http://rzip.samba.org"><code>rzip</code></a> for a savings of 155 MB, or about 12%.</p>

<h1>Why Would Anyone Wait for <a href="http://en.wikipedia.org/wiki/PAQ"><code>zpaq</code></a> to Finish?</h1>

<p>Most of the time it isn&apos;t worth the wait.  I&apos;m a huge fan of smaller backups.  Backups become significantly more expensive every time a single backup has to span a second (or third, or fourth...) piece of media.  It&apos;s another floppy, CD, DVD, Blu-ray, tape, hard drive, or flash drive to have to manually swap around and keep safe.</p>

<p>I like flash drives for my personal backups.  I have too many CDs and DVDs that are unreadable.  I&apos;ve accidentally run an old compact flash drive through the laundry and it still worked.  I&apos;m sure all flash drives won&apos;t survive that, but they do tend to be very durable.</p>

<p>Unfortunately, <a href="http://ck.kolivas.org/apps/lrzip/"><code>lrzip</code></a> with <a href="http://en.wikipedia.org/wiki/PAQ"><code>zpaq</code></a> did not get the file size down for enough for the archive to fit on the backup flash drive that I keep around the house.  Another 100 MB or so would have done the trick and would save me quite a bit of effort.</p>

<h1>Which One Should You Use?</h1>

<p>For most archives I would probably just choose <a href="http://en.wikipedia.org/wiki/Bzip2"><code>bzip2</code></a>.  It does a very good job and a decompressor is always very readily available.</p>

<p>For almost every very large archive I will definitely be sticking with <a href="http://rzip.samba.org"><code>rzip</code></a>.  It is faster and more space efficient than <a href="http://en.wikipedia.org/wiki/Bzip2"><code>bzip2</code></a>.  It is also easier to find than <a href="http://ck.kolivas.org/apps/lrzip/"><code>lrzip</code></a>, my Ubuntu machine has an <a href="http://rzip.samba.org"><code>rzip</code></a> package available in <code>apt</code>.</p>

<p>I will be sure to keep <a href="http://ck.kolivas.org/apps/lrzip/"><code>lrzip</code></a> with <a href="http://en.wikipedia.org/wiki/PAQ"><code>zpaq</code></a> in mind, though.  Sometimes an extra couple hundred MB will save the time, effort, and cost of a second piece of media.  The other downside to <a href="http://en.wikipedia.org/wiki/PAQ"><code>zpaq</code></a> is that decompression is also very slow as well.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>My New Favorite Kind of Tape: Cloth Tape</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2009/11/my-new-favorite-kind-of-tape-cloth-tape.html" />
    <id>tag:blog.patshead.com,2009://2.13</id>

    <published>2009-11-30T10:43:59Z</published>
    <updated>2010-09-02T09:46:52Z</updated>

    <summary><![CDATA[I&apos;ve been carrying a small roll of duct tape in both my wallet and laptop bag for years. I&apos;ve been taking advantage of the fact that duct tape is the same width as a business card. You just roll some...]]></summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="clothtape" label="cloth tape" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ducttape" label="duct tape" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="laptopbag" label="laptop bag" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tape" label="tape" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="wallet" label="wallet" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I&apos;ve been carrying a small roll of duct tape in both my wallet and laptop bag for years.  I&apos;ve been taking advantage of the fact that duct tape is the same width as a business card.  You just roll some fresh duct table around an old business card ten or twenty times and you&apos;ll get a small roll of duct tape that fits right in your wallet.</p>

<p>A year or two ago I found a roll of <a href="http://www.google.com/products?hl=en&amp;safe=off&amp;q=cloth%20tape%20johnson%20and%20johnson&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;tab=wf">cloth tape</a> in an ancient first aid kit that we had laying around the house.  The first thing I noticed was how similar it is to duct tape.  It is fabric reinforced like duct tape, but it is more flexible and less sticky.</p>

<p>It does a great job holding cables together, and it doesn&apos;t seem to leave behind the nasty mess duct tape leaves behind when you remove it a few months later.  Cloth tape also works great for labeling things, it takes Sharpie ink very well.</p>

<p>The width of cloth tape does not line up as well with a business card as duct tape does.  I&apos;ve come up with a better idea, though.  I now wrap three kinds of tape around the length of a business card, duct tape, cloth tape, and electrical tape.  The three added together are slightly too big for a business card so there is a tiny bit of overhang.</p>

<p><img src="http://blog.patshead.com/Assets/DuctClothElectrical.jpg"></p>
]]>
        

    </content>
</entry>

<entry>
    <title>Using QR Codes for Hardcopy Backups of Private Keys</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2009/11/using-qr-codes-for-hardcopy-backups-of-private-keys.html" />
    <id>tag:blog.patshead.com,2009://2.12</id>

    <published>2009-11-01T10:38:40Z</published>
    <updated>2010-09-02T09:43:04Z</updated>

    <summary>For years I have been keeping a small font printout of my important SSH and GPG private keys hidden and locked away for safe keeping. I have lost enough floppies, CDs, and DVDs to bit rot so I do not...</summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="gpg" label="gpg" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pgp" label="pgp" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="privatekeys" label="private keys" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="qrcodes" label="qr codes" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ssh" label="ssh" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>For years I have been keeping a small font printout of my important <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a> and <a href="http://www.gnupg.org/">GPG</a> private keys hidden and locked away for safe keeping.  I have lost enough floppies, CDs, and DVDs to bit rot so I do not have much trust in them for the long term storage of something this important.</p>

<p>The hard copies are nice, but I sure don&apos;t want to have to manually type in an error free copy of my private keys.  That is why I now print two copies of each of my keys.  One copy is text, the other copy is a <a href="http://en.wikipedia.org/wiki/QR_Code">QR Code</a>.</p>

<p><a href="http://en.wikipedia.org/wiki/QR_Code">QR Codes</a> are popping up all over the place lately.  Some of the websites hosting <a href="http://code.google.com/p/k9mail/">Android software that I use</a> have <a href="http://en.wikipedia.org/wiki/QR_Code">QR Code</a> images on them, so you can just snap a picture of the code with your smart phone and be taken straight to the web site.  This one will bring you to this blog:</p>

<p><img src="http://blog.patshead.com/Assets/blogqr.png"></p>

<p>An alphanumeric QR Code can contain up to 4,296 characters.  This was plenty for my <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a> and <a href="http://www.gnupg.org/">GPG</a> private keys.</p>

<h1>Where Should I Store My Backup Keys?</h1>

<p>That would depend on your level of paranoia.  You could store them in your <a href="http://en.wikipedia.org/wiki/Safe_deposit_box">safe deposit box</a> at your bank, in a safe at home, under your mattress, or you could bury it in your back yard.</p>

<h1>Why Bother Storing a Hard Copy of your Keys?</h1>

<p>I am mostly worried about losing my <a href="http://www.gnupg.org/">GPG</a> private key.  I have gigabytes upon gigabytes of backups and important data encrypted with my key.  Completely losing that key would turn all that data into useless bits.</p>

<p>Losing my <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a> key(s) wouldn&apos;t have nearly as much impact.  There would just be a few hosts that I would have trouble logging into.  The extra effort to print the <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a> key along with the <a href="http://www.gnupg.org/">GPG</a> is minimal, though.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Bonnie ++ Benchmarks on the Intel X25-M v1.4 Firmware Update</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2009/10/bonnie-benchmarks-on-the-intel-x25-m-v14-firmware-update.html" />
    <id>tag:blog.patshead.com,2009://2.11</id>

    <published>2009-10-27T09:36:31Z</published>
    <updated>2010-09-02T09:37:11Z</updated>

    <summary>I updated the firmware on my X25-M today. It was a completely pain free procedure. Just burn a CD, boot from the CD, say yes a few times, and reboot. I added a new set of Bonnie++ benchmarks to my...</summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="benchmarks" label="benchmarks" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="intelx25" label="intel x25" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I updated the firmware on my X25-M today.  It was a completely pain free procedure.  Just burn a CD, boot from the CD, say <code>yes</code> a few times, and reboot.</p>

<p>I added a new set of Bonnie++ benchmarks to my <a href="http://blog.patshead.com/blog/2009/09/intel-x25-m-g2-vs-old-laptop-drive-benchmarks.html">first set of Intel X25-M benchmarks</a>.</p>

<p>Unfortunately, the new benchmarks aren&apos;t a good comparison.  I have been using the drive for a month now and I probably have 100 GB worth of rewrites on the drive.</p>

<p>There were two obvious improvements.  Sequential input is up 30%, and CPU usage during random seeks is down 12%.</p>

<p>I can&apos;t wait to try running another benchmark after I get some <a href="http://en.wikipedia.org/wiki/TRIM_%28SSD_command%29">TRIM</a> support in my kernel.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Android, K-9 Mail, and IMAP IDLE (Push Email)</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2009/10/android-k-9-mail-and-imap-idle-push-email.html" />
    <id>tag:blog.patshead.com,2009://2.10</id>

    <published>2009-10-26T09:35:14Z</published>
    <updated>2010-09-02T09:38:12Z</updated>

    <summary>The single most disappointing application that came installed on my T-Mobile G1 was the default email application. The very first thing I noticed was the horrendous IMAP support. I have a very well organized mail account. I might have a...</summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="android" label="android" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="chatteremail" label="chatteremail" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cyanogenmod" label="cyanogenmod" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="g1" label="g1" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="k9mail" label="k-9 mail" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tmobile" label="t-mobile" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>The single most disappointing application that came installed on my T-Mobile G1 was the default email application.  The very first thing I noticed was the horrendous <a href="http://en.wikipedia.org/wiki/IMAP">IMAP</a> support.  I have a very well organized mail account.  I might have a have dozen or so folders at the top of my folder hierarchy.  The <a href="http://www.android.com/">Android</a> email application just flattens out all of my 100+ sub folders out into a huge, difficult to navigate list.</p>

<h1>K-9 Mail</h1>

<p>My search for a better mail app lead me to <a href="http://code.google.com/p/k9mail/">K-9 Mail</a>.  <a href="http://code.google.com/p/k9mail/">K-9</a> is a fork of the stock Android email application with quite a few improvements.  </p>

<p><a href="http://code.google.com/p/k9mail/">K-9</a> still flattens out my folder list but lets me choose which folders I would like to display and sync.  Fortunately, I really only want quick access to five or six folders while I&apos;m on the go.  </p>

<h1>Push Email</h1>

<p>The beta release of <a href="http://code.google.com/p/k9mail/">K-9</a> supports the <a href="http://en.wikipedia.org/wiki/IMAP_IDLE">IMAP IDLE</a> feature.  This allows it to stay connected to the IMAP server so that it can instantly be notified when a new message arrives.  This is much better for me than waiting up to 5 minutes to see a new message arrive.</p>

<h1>Improved Message List</h1>

<p><a href="http://code.google.com/p/k9mail/">K-9</a>&apos;s message list view is a huge improvement over the stock mail client.  The view is much more condensed and looks like it fits about twice as many messages on the screen at the same time.</p>

<p>So far there is only one <a href="http://www.palm.com/us/products/software/chatteremail/index.html">ChatterEmail</a> feature that I miss.  It had a summary view that displayed emails from multiple mailboxes on one screen in chronological order.  Each message was color coded so that you could very easily tell which account each message belonged to.  I saw a few mentions of <a href="http://www.palm.com/us/products/software/chatteremail/index.html">ChatterEmail</a> in the <a href="http://code.google.com/p/k9mail/issues/detail?id=95">K-9 issue tracker</a>, so I know I&apos;m not the only one who misses this feature.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>My New Android Phone and Cyanogenmod 4.1.999</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2009/10/my-new-android-phone-and-cyanogenmod-41999.html" />
    <id>tag:blog.patshead.com,2009://2.9</id>

    <published>2009-10-21T09:33:48Z</published>
    <updated>2010-09-02T09:35:01Z</updated>

    <summary>I finally broke down and replaced my long in the tooth Palm Treo 650 with a T-Mobile G1 (a.k.a. HTC Dream). The only major complaint I had with the Treo was stability. It used to like to reboot itself about...</summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="android" label="android" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="cyanogenmod" label="cyanogenmod" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="g1" label="g1" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tmobile" label="t-mobile" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="treo650" label="treo 650" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I finally broke down and replaced my long in the tooth <a href="http://en.wikipedia.org/wiki/Treo_650">Palm Treo 650</a> with a T-Mobile G1 (a.k.a. <a href="http://en.wikipedia.org/wiki/HTC_Dream">HTC Dream</a>).  The only major complaint I had with the Treo was stability.  It used to like to reboot itself about once each day...</p>

<p>So far I&apos;m mostly working on replicating all the functionality that my Treo had.  Almost everything on the G1 meets or exceeds the capabilities of the software I had on my Treo.  Some software has both improvements and regressions compared to the Treo, but overall I&apos;m pretty happy so far.</p>

<h1>Cyanogen 4.1.999</h1>

<p>I only ran the stock firmware long enough to install the <a href="http://www.cyanogenmod.com/">Cyanogen</a> firmware, so I can&apos;t talk about all specific details that are different from the stock firmware.</p>

<p>There are some interesting improvements behind the scenes, though.  The <a href="http://www.cyanogenmod.com/">Cyanogen</a> firmware uses <a href="http://code.google.com/p/compcache/">compcache</a> and <a href="http://ck.kolivas.org/patches/bfs/bfs-faq.txt">Con Kolivas&apos; BFS</a> process scheduler.  I&apos;m already a <a href="http://blog.patshead.com/blog/2009/09/experimenting-with-compressed-swap.html">heavy user</a> of <a href="http://code.google.com/p/compcache/">compcache</a> on my laptop, and I&apos;ve been testing the BFS scheduler as well.</p>

<p>I&apos;ve really only had one issue so far with the 4.1.999 firmware.  Every once in a while all the icons disappear from the launcher and the phone has to be rebooted to get them back.  It seems to be a <a href="http://code.google.com/p/cyanogenmod/issues/detail?id=512">known issue</a> with the experimental firmware.  I doubled the size of the <a href="http://code.google.com/p/compcache/">compcache</a> swap space and I didn&apos;t see the problem for a few days.  I can only assume that the race condition is less likely when the phone is more responsive.</p>

<h1>Neat Things I&apos;d Like To Do With Android</h1>

<p>I would like to get <a href="http://samba.anu.edu.au/rsync/">rsync</a> and <a href="http://en.wikipedia.org/wiki/Cron">cron</a> running on it.  I think it would be very nice to have automated wireless backups that are always likely to be in my pocket.  I&apos;m hoping to be able to do it without having to rely on having Debian on my SD card.</p>

<p>OpenVPN might be interesting, but I don&apos;t currently have a real need for it.  A few years ago this would have been a top priority for me, though.</p>

<p></text></entry>
<entry id='25' allow_comments='1' allow_pings='1' atom_id='tag:blog.patshead.com,2009:/blog//1.25' author_id='1' authored_on='20091026160000' basename='android_k-9_mail_and_imap_idle_push_email' blog_id='1' class='entry' comment_count='0' convert_breaks='markdown' created_by='1' created_on='20091022190725' modified_on='20091022190725' ping_count='0' status='2' title='Android, K-9 Mail, and IMAP IDLE (Push Email)' week_number='200944'><keywords>android, cyanogen, g1, t-mobile, k-9 mail, chatteremail</keywords><text>The single most disappointing application that came installed on my T-Mobile G1 was the default email application.  The very first thing I noticed was the horrendous <a href="http://en.wikipedia.org/wiki/IMAP">IMAP</a> support.  I have a very well organized mail account.  I might have a have dozen or so folders at the top of my folder hierarchy.  The <a href="http://www.android.com/">Android</a> email application just flattens out all of my 100+ sub folders out into a huge, difficult to navigate list.</p>

<h1>K-9 Mail</h1>

<p>My search for a better mail app lead me to <a href="http://code.google.com/p/k9mail/">K-9 Mail</a>.  <a href="http://code.google.com/p/k9mail/">K-9</a> is a fork of the stock Android email application with quite a few improvements.  </p>

<p><a href="http://code.google.com/p/k9mail/">K-9</a> still flattens out my folder list but lets me choose which folders I would like to display and sync.  Fortunately, I really only want quick access to five or six folders while I&apos;m on the go.  </p>

<h1>Push Email</h1>

<p>The beta release of <a href="http://code.google.com/p/k9mail/">K-9</a> supports the <a href="http://en.wikipedia.org/wiki/IMAP_IDLE">IMAP IDLE</a> feature.  This allows it to stay connected to the IMAP server so that it can instantly be notified when a new message arrives.  This is much better for me than waiting up to 5 minutes to see a new message arrive.</p>

<h1>Improved Message List</h1>

<p><a href="http://code.google.com/p/k9mail/">K-9</a>&apos;s message list view is a huge improvement over the stock mail client.  The view is much more condensed and looks like it fits about twice as many messages on the screen at the same time.</p>

<p>So far there is only one <a href="http://www.palm.com/us/products/software/chatteremail/index.html">ChatterEmail</a> feature that I miss.  It had a summary view that displayed emails from multiple mailboxes on one screen in chronological order.  Each message was color coded so that you could very easily tell which account each message belonged to.  I saw a few mentions of <a href="http://www.palm.com/us/products/software/chatteremail/index.html">ChatterEmail</a> in the <a href="http://code.google.com/p/k9mail/issues/detail?id=95">K-9 issue tracker</a>, so I know I&apos;m not the only one who misses this feature.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Saving Space With fusecompress</title>
    <link rel="alternate" type="text/html" href="http://blog.patshead.com/2009/10/saving-space-with-fusecompress.html" />
    <id>tag:blog.patshead.com,2009://2.3</id>

    <published>2009-10-19T23:23:08Z</published>
    <updated>2010-09-01T23:26:44Z</updated>

    <summary>I have been using a fuse compressed file system for a very long time now. Space used to be a bit tight on my old laptop&apos;s 60 GB hard drive, and the space savings haven&apos;t been hurting at all. I...</summary>
    <author>
        <name>Pat Regan</name>
        
    </author>
    
    <category term="fuse" label="fuse" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="fusezip" label="fuse-zip" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="fusecompress" label="fusecompress" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="linux" label="linux" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.patshead.com/">
        <![CDATA[<p>I have been using a <a href="http://fuse.sourceforge.net/">fuse</a> compressed file system for a very long time now.  Space used to be a bit tight on my old laptop's 60 GB hard drive, and the space savings haven't been hurting at all.  I have about 4 GB of documentation stored in text, html, and pdf files that I like to carry with me.  I also like having it indexed by <a href="http://www.gnome.org/projects/tracker/">tracker</a>, which means it can&apos;t just be sitting in an archive.</p>

<p>I was previously using <a href="http://fuse-zip.googlecode.com/">fuse-zip</a>.  It did its job very well and I really liked the fact that it was just mounting plain old standard zip files.  It supported writes but it only committed changes when the file system was unmounted.  That was very inconvenient and it took quite a while to recompress 1-2 GB of data when I was only adding a few MB worth of files.</p>

<p>Now I have recently switched to <a href="http://miio.net/wordpress/projects/fusecompress/">fusecompress</a>.  The only thing I dislike is that it does not use a standard archive behind the scenes.  I&apos;m using bzip2 as the compression method and I had to tell <a href="http://miio.net/wordpress/projects/fusecompress/">fusecompress</a> that it was, in fact, OK to attempt to compress pdf files.  </p>

<p>Since <a href="http://miio.net/wordpress/projects/fusecompress/">fusecompress</a> compresses individual files I am not achieving quite as much compression as I was with <a href="http://fuse-zip.googlecode.com/">fuse-zip</a>, but it is quite close.  I am don&apos;t mind trading a standard archive format for immediate commits of my writes.  </p>
]]>
        

    </content>
</entry>

</feed>
