<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Memory Leak &#187; Geek-Stuff</title>
	<atom:link href="http://www.foobert.com/blog/category/geek-stuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.foobert.com/blog</link>
	<description>That which fades into the ether.</description>
	<lastBuildDate>Sat, 26 Nov 2011 20:49:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Carbon dioxide usage for brewing</title>
		<link>http://www.foobert.com/blog/2010/12/21/carbon-dioxide-usage-for-brewing/</link>
		<comments>http://www.foobert.com/blog/2010/12/21/carbon-dioxide-usage-for-brewing/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 21:46:08 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[Homebrew]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=652</guid>
		<description><![CDATA[<p>I was wondering how long the CO2 tank should last when used for both carbonating and serving the beer.  The carbonation consumption is not insignificant.</p>
<p>Assume:</p>

1 keg is 5 gallons
Carbonating to 2.2 volumes
Dispensing at 40°F
Dispensing at 12 PSI

<p>There&#8217;s 0.134 cu ft/gallon. Thus, 5 gallon is 0.67 cu ft.</p>
<p>2.2 &#8220;volumes&#8221; means there is 2.2*0.67 = 1.47 cu ft [...]]]></description>
			<content:encoded><![CDATA[<p>I was wondering how long the CO2 tank should last when used for both carbonating and serving the beer.  The carbonation consumption is not insignificant.</p>
<p>Assume:</p>
<ul>
<li>1 keg is 5 gallons</li>
<li>Carbonating to 2.2 volumes</li>
<li>Dispensing at 40°F</li>
<li>Dispensing at 12 PSI</li>
</ul>
<p>There&#8217;s 0.134 cu ft/gallon. Thus, 5 gallon is 0.67 cu ft.</p>
<p>2.2 &#8220;volumes&#8221; means there is 2.2*0.67 = 1.47 cu ft of CO2 that is dissolved in the beer.</p>
<p>12 PSI is the same as 1.82 atmospheres.  Thus after dispensing all the beer, the empty keg has 1.22 cu ft of CO2 in it.</p>
<p>CO2 has a specific volume of ~8.2 cu ft/lb at 1.0 atmosphere and 40°F.  Thus, 2.69 cu ft is 0.33 lbs of C02 used per 5-gallon keg.</p>
<p>So, assuming no leaks (yeah right!), the 15 lb bottle should be good for about 45 kegs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2010/12/21/carbon-dioxide-usage-for-brewing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arduino battery capacity tester</title>
		<link>http://www.foobert.com/blog/2009/11/08/arduino-battery-capacity/</link>
		<comments>http://www.foobert.com/blog/2009/11/08/arduino-battery-capacity/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 07:03:09 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[arduino]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=471</guid>
		<description><![CDATA[<p style="text-align: left;">My first Arduino project was to build a battery capacity tester.  I&#8217;ve got a box of rechargeable AA batteries, and it seams they&#8217;ve been less and less effective. Since most applications require 4 batteries, invariably one problem battery makes the rest of them look bad.</p>
<p>The Atmel ATMega328 microcontroller has 6 analog inputs with [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">My first <a href="http://arduino.cc/en">Arduino</a> project was to build a battery capacity tester.  I&#8217;ve got a box of rechargeable AA batteries, and it seams they&#8217;ve been less and less effective. Since most applications require 4 batteries, invariably one problem battery makes the rest of them look bad.</p>
<p>The Atmel ATMega328 microcontroller has 6 analog inputs with 10-bit A-to-D converters and a external AREF that allows you to define what voltage 0x3FF represents. In other words, it&#8217;ll give you ~1.4mV precision measuring 0-1.5V when given a 1.5V analog reference. Plenty accurate for a battery capacity measurement.</p>
<p>The principle is fairly simple. Apply a known load to a battery, record the voltage periodically while the battery discharges, stop recording at some point, and integrate to arrive at the area under the curve in order to derive the amp-hours delivered from the battery.</p>
<p>Enough theory, let&#8217;s see how it works.  The UI starts with a helpful message:</p>
<p style="text-align: center;"><strong>Insert Battery</strong><br />
<img src="http://foobert.com/linked/2009/20091107215531_DSC_4782.jpg" alt="" width="696" height="700" /><br />
<span style="color: #999999;">NIKON D70, ISO 500, ƒ/2.0, 1/20sec, 50mm focal L.</span></p>
<p style="text-align: left;">While the battery discharges, the UI prints the voltage, real-time capacity measured thus far, and the duration that the measurement has been taking place.</p>
<p style="text-align: center;"><strong>Battery In</strong><br />
<img src="http://foobert.com/linked/2009/20091107221459_DSC_4783.jpg" alt="" width="671" height="700" /><br />
<span style="color: #999999;">NIKON D70, ISO 500, ƒ/2.0, 1/25sec, 50mm focal L.</span></p>
<p style="text-align: left;">When the cut-off voltage of 0.9V has been reached, the &#8220;usable&#8221; capacity is saved at the top.  The real-time data continues so the capacity below 0.9V is measured.  For the NiMH batteries I&#8217;ve tested, the capacity below 0.9V is minimal (~100mAH).</p>
<p>After the cut-off is reached, an LED starts blinking to attract attention that the test is effectively over.</p>
<p style="text-align: center;"><strong>Done</strong><br />
<img src="http://foobert.com/linked/2009/20091107215454_DSC_4780.jpg" alt="" width="494" height="700" /><br />
<span style="color: #999999;">NIKON D70, ISO 500, ƒ/2.0, 1/20sec, 50mm focal L.</span></p>
<p><a href="http://foobert.com/linked/2009/battery_test.pde">Here&#8217;s the code (click to download as text rather than the questionable HTML translated version pasted below):</a></p>
<blockquote><pre>
/*  Battery Characterization Tool

     11/7/2009 John Terry

     Compiled on Aurdino 0017 in 4930 bytes.

 This uses the analog in to measure the voltage of a battery under a known load and
 integrates the area under the curve to arrive at the useful capacity of the
 batterin in mAH.
*/

#include &lt;LiquidCrystal.h&gt;

// Set some constants -- these will need to be adjusted for your setup
//
// Connect a ~10K Ω (Rr) resistor from 3.3V supply pin to the AREF pin,
//   creating a voltage divder with the internal 32KΩ resistor on AREF.
//      aRefVoltage = supply_voltage * 32K / Rr
//   Alternatively, measure the actual AREF voltage applied with a good DMM:
//  my measured aRefVoltage = 2.62;
const float     aRefVoltage = 2.62;

// Connect a load resistor (Rl) to the battery. ~2.2 Ω restistor gives ~500mA drain which
//   is about right for a battery rated at 2500mAH.  Note, this should be a &gt;=1W resistor!
//   Dont trust your DMM to meausre such a low resistance accurately. I measured the current
//   and back-calculated the resistance. Best just to trust rated resistance.
//   my  resistance = 2.18;
//
// The integrator works by accumulating the sampled voltage values from the start until
//   hitting a pre-determined low-voltage threshold. Since they are sampled at a
//   known period, the number of samples taken cancels out and the accumulation of all samples
//   simply needs to be scalled by a factor
//
//   Let's make some definitions to show the derivation of how this is so:
//   I = current
//   V = load voltage
//   Rl = load resistance
//   samples = number of voltage samples made
//   sensor = value read out of analog A-&gt;D
//   rate = number of samples taken per second
//
//                                     ave(V)
//   capacity = ∫I ~= ave(I) * time = -------- * time
//                                       Rl
//
//   Where:
//                ∑(V)     ∑(sensor) * aRefVoltage/1024
//     ave(V) = ------- = ---------------------------------
//              samples              samples
//
//      time  =  samples/rate
//
//   Thus:
//               ∑(sensor) * aRefVoltage     samples
//   capacity = ------------------------- * ---------
//                samples * 1024 * Rl         rate
//
//               ∑(sensor) * aRefVoltage
//   capacity = ------------------------- = ∑(sensor) * quanta
//                  1024 * Rl * rate
//
//           quanta = aRefVoltage/(1024 * Rl * rate ) * 1000/3600   // scaled for mA Hours
const double quanta = 0.00030179; // 2.62/1024/2.355/3.6

// Define low voltage threshold where any remaining capacity is "unusable"
//        lowThreshold = 0.9V * 1024/aRefVoltage
const int lowThreshold = 354;

int sensorPin          = 0;    // select the analog input pin for the voltage measurement
int ledPin             = 13;   // select the pin for the LED
int fetGatePin         = 8;    // select the pin for the LED
int sensorValue        = 0;    // unscaled sensor output
float voltage          = 0;    // measured voltage
double mAH             = 0;    // Calculated current
long accumulator       = 0;    // sum of all unscalled sensor values sampled
int epoch              = 0;    // seconds since battery was inserted
int lowVolts           = 0;    // debounce the low voltage threshold
boolean done           = false;// Voltage has dropped below threshold
boolean batteryIn      = false;// Battery present

// initialize the the LCD library with the numbers of the interface pins
//  LCD Pins  --  RS, EN, D4, D5, D6, D7
LiquidCrystal lcd(12, 11,  5,  4,  3,  2);

void setup() {
  // declare the ledPin and fetGatePin as an OUTPUT:
  pinMode(ledPin,     OUTPUT);
  pinMode(fetGatePin, OUTPUT);  

  // set analog reference to external
  analogReference(EXTERNAL);

  // set up the LCD's number of rows and columns:
  lcd.begin(16, 2);

  // Print a helpful start-up message to the LCD.
  lcd.print("Insert battery");

  // DEBUG initialize serial communications at 9600 bps:
  // Serial.begin(9600);
}

void loop() {

  sensorValue = analogRead(sensorPin);    

  if (!batteryIn &#038;&#038; (sensorValue &gt; 100)) {
    // Initialize upon the insertion of a "fresh" battery
    batteryIn   = true;
    done        = false;
    epoch       = 0;
    accumulator = 0;
    lowVolts    = 0;
    digitalWrite(ledPin, LOW);
    digitalWrite(fetGatePin, HIGH);
    // clear out when LCD when starting over
    lcd.setCursor(0, 0);
    lcd.print("vlts  mAH  Time ");
    lcd.setCursor(0, 1);
    lcd.print("                ");
  }
  else if (batteryIn &#038;&#038; done &#038;&#038; (sensorValue &lt;= 20)) {
    // consider the battery removed only after finishing the last measurement to
    // debounce a glitchy concact
    batteryIn=false;
  }
  else if (batteryIn) {
    // Running state during discharge state

    voltage = sensorValue*aRefVoltage/1024.0;

    // print voltage
    lcd.setCursor(0, 1);
    lcd.print(voltage);

    if (!done) {
      accumulator += sensorValue;
      // print mAH
      mAH = accumulator*quanta;
      if      (mAH &lt;   10) { lcd.setCursor(8, 1); }  // adjust to make it perdy
      else if (mAH &lt;  100) { lcd.setCursor(7, 1); }
      else if (mAH &lt; 1000) { lcd.setCursor(6, 1); }
      else                 { lcd.setCursor(5, 1); }
      lcd.print(int(mAH));

    }

    // print current time
    lcd.setCursor(11, 1);
    lcd.print(epoch/60.0);
    lcd.setCursor(15, 1);
    lcd.print("m");

    if (!done) {

      // lowVolts requires 10 seconds in the last 20 before being done
      if (sensorValue &lt; lowThreshold) { lowVolts++;}
      else if (lowVolts &gt; 0)          { lowVolts--;}  

      // If it's below threshold for 10 of 20 samples, bail out
      if (lowVolts &gt; 10) {
        done=true;
        digitalWrite(fetGatePin, LOW);
        lcd.setCursor(0, 0);
        lcd.print("    mAH in     ");
        lcd.setCursor(1, 0);
        lcd.print(int(mAH));

        // put the time, in minutes in the upper right
        lcd.setCursor(11, 0);
        lcd.print(epoch/60.0);
        lcd.setCursor(15, 0);
        lcd.print("m");

        // Clear out the bottom line
        lcd.setCursor(4, 1);
        lcd.print("v      ");
      }
    }

    epoch++;
  } // batteryIn -- main routine

  if (done) {
    // When done, flash the LED to get attention
    digitalWrite(ledPin, HIGH);
    delay(500);
    digitalWrite(ledPin, LOW);
    delay(499);
  } else {
    // Since the processing takes some time prior to the delay, we'll assume 1mS
    // This could stand to be improved with an interrupt routine that is kicked off
    // before all the processing starts for each loop
    delay(999);
  }

/* DEBUG

  Serial.print("\nsensor = " );
  Serial.print(sensorValue);
  Serial.print("\t lowvolrs = " );
  Serial.print(lowVolts);
*/

}
</pre>
</blockquote>
<p>Compiles into 4930 bytes.</p>
<p>Schematics, excluding the LCD display (pin-out is listed in the code).</p>
<p style="text-align: center;">
<img src="http://foobert.com/linked/2009/capacity_meter_bb.png" alt="" />
</p>
<p style="text-align: center;">
<img src="http://foobert.com/linked/2009/capacity_meter_schem.png" alt=""  /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/11/08/arduino-battery-capacity/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Hello Arduino</title>
		<link>http://www.foobert.com/blog/2009/11/06/hello-arduino/</link>
		<comments>http://www.foobert.com/blog/2009/11/06/hello-arduino/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 07:50:20 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[arduino]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=466</guid>
		<description><![CDATA[<p style="text-align: left;">
Success has been had &#8230; finally!</p>
<p>A couple of days ago, a tiny little package arrived from Sparkfun Electronics with my first Arduino kit.  Valerie&#8217;s response upon finding said package in the mail box, &#8220;well, so much for seeing my husband for the rest of the week&#8221;.   In all fairness, I waited [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">
Success has been had &#8230; finally!</p>
<p>A couple of days ago, a tiny little package arrived from <a href="http://www.sparkfun.com/commerce/categories.php">Sparkfun Electronics</a> with my first Arduino kit.  Valerie&#8217;s response upon finding said package in the mail box, &#8220;well, so much for seeing my husband for the rest of the week&#8221;.   In all fairness, I waited till the second day (night, really) to get sucked in.  I&#8217;ll be back tomorrow&#8230;</p>
<p>Last night, I just plugged it into the USB port and loaded a pre-canned example that made the LED blink. Did some experimenting with modulating in and out with a few for loops just to refresh my C code.</p>
<p>Tonight was all about getting the LCD wired in. Soldered a header onto it to mash into the bread board to keep the wiring flexible. </p>
<p>Opened up the <a href="http://www.arduino.cc/en/Tutorial/LiquidCrystal">LiquidCrystal</a> tutorial and wired it all up and measured the resistance between power and ground to make sure I didn&#8217;t have any shorts. Finally plugged it in to the USB spigot and dumped the &#8220;hello, world&#8221; example program, and &#8230; nothing.</p>
<p>Hmmph.  Take some measurements &#8212; voltages are good. Contrast voltage bias is about half-way, that ought to be <em>close</em>. Let&#8217;s try a little higher: nope. Lower?  Nope.  </p>
<p>OK, rip it all out and move to a different section of the breadboard.  Still nothing.  The LCD doesn&#8217;t so much as blink.  Must be dead.</p>
<p>In fit of desperation, I grab pair of random resistors and jumper them across my voltage divider that&#8217;s biasing the contrast, first moving contrast closer to VDD, then moving it much closer to VSS and &#8212; presto &#8212; it was running all along.
</p>
<p style="text-align: center;"><strong>It&#8217;s alive!</strong><br />
<img src="http://foobert.com/linked/2009/20091106001935_DSC_4775.jpg" width=800 height=618/><br />
<span style="color: #999999;">NIKON D70, ISO 500, ƒ/1.8, 1/30sec, 50mm focal L.</span></p>
<p style="text-align: left;">For the record, this particular 5-volt LCD contrast likes to biased at about 1.3 volts.  2.5 volts get&#8217;s you nothing.</p>
<p>My first real &#8220;project&#8221; is to build a rechargeable battery characterization tool.  More on that later&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/11/06/hello-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone software 3.0&#8211;email full resolution pictures</title>
		<link>http://www.foobert.com/blog/2009/07/02/iphone-software-3-0-email-full-resolution-pictures/</link>
		<comments>http://www.foobert.com/blog/2009/07/02/iphone-software-3-0-email-full-resolution-pictures/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 07:13:49 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[picture]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=279</guid>
		<description><![CDATA[<p>I just stumbled on a new feature of the iPhone 3.0 software &#8212; using the copy/paste feature, you can send a full resolution picture in an email:</p>

In the picture browser, tap the picture to highlight it and make the &#8220;copy&#8221; button appear. Tap the copy button.
Close the picture browser app.
Open email app
Compose a new email, and [...]]]></description>
			<content:encoded><![CDATA[<p>I just stumbled on a new feature of the iPhone 3.0 software &#8212; using the copy/paste feature, you can send a full resolution picture in an email:</p>
<ol>
<li>In the picture browser, tap the picture to highlight it and make the &#8220;copy&#8221; button appear. Tap the copy button.</li>
<li>Close the picture browser app.</li>
<li>Open email app</li>
<li>Compose a new email, and &#8220;paste&#8221; the image into the body of the email.</li>
</ol>
<p>If you simply use the &#8220;mail-to&#8221; button in the photo app, it&#8217;ll shrink the image to 800&#215;600 resolution.  Using the copy/paste method, it sends the full 1600&#215;1200 resolution (of the now <em>vintage </em>Gen 1 phone, anyway. New phones prolly have better cameras).</p>
<p>Unfortunately, it still omits all the EXIF data just the same as using the &#8220;mail-to&#8221; button. I wish it would keep at least some of the basics, like, date+time the picture was taken.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/07/02/iphone-software-3-0-email-full-resolution-pictures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Motorcycle riding leads to coding</title>
		<link>http://www.foobert.com/blog/2009/02/22/motorcycle-riding-leads-to-coding/</link>
		<comments>http://www.foobert.com/blog/2009/02/22/motorcycle-riding-leads-to-coding/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 08:15:02 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Flying]]></category>
		<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[motorcycle]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=213</guid>
		<description><![CDATA[<p>Got a quick ride in today &#8212; 112 miles.  Quickly coming up on the 1K mile mark on the odometer.</p>
<p>First time taking the new bike up highway 9. Must have had half a dozen riders signal to warn that the police were up ahead; this part of the ride was none too spirited.</p>
<p>152 from Watsonville [...]]]></description>
			<content:encoded><![CDATA[<p>Got a quick ride in today &#8212; 112 miles.  Quickly coming up on the 1K mile mark on the odometer.</p>
<p>First time taking the new bike up highway 9. Must have had half a dozen riders signal to warn that the police were up ahead; this part of the ride was none too spirited.</p>
<p>152 from Watsonville over Hecker pass was loads of fun, even if the road was a bit rough in spots. After the left turn northward toward, Uvas road was also very interesting. I truly enjoy the ride up these &#8220;hidden&#8221; valley roads that most folks don&#8217;t realize exist so close to their suburbs.</p>
<p> <iframe src="http://foobert.com/linked/2009/bouldercreek_watsonville.html"  width="800" height="600" marginwidth="0" marginheight="0" scrolling="no" frameborder="0"><br />
<a href="/linked/2009/bouldercreek_watsonville.html" mce_href="/linked/2009/bouldercreek_watsonville.html">Click here for the map</a></iframe><br />
</p>
<p>Got tired of hand-editing the GPX files to merge the routes. Started to write a sed script to do it for me, but, just had all kinds of trouble trying to get the version of sed that ships with Mac OS X to insert a newline &#8212; which a quick search of &#8216;sed newline&#8217; reveals that perhaps sed doesn&#8217;t much like to do this any case. So, scratched some rust off my once budding Python and decided to learn how to do a regular expression with it.</p>
<p>And for the first time with Python, it underwhelmed me. The simplicity of a regex is burdened by the fact that (I only now realized) Python doesn&#8217;t have any in-built regex abilities;  I just assumed it did, and it would work like Perl. It most certainly does not:</p>
<blockquote>
<pre>#! /usr/bin/python</pre>
<pre>import sys
import re</pre>
<pre>if len(sys.argv) &lt; 3:
  print "usage:"
  print "  gpx.py &lt;gpx input file&gt; &lt;output file name&gt;"
  sys.exit(1)</pre>
<pre>f_read  = open(sys.argv[1], 'r')
f_write = open(sys.argv[2], 'w')

for line in f_read:
  p = re.compile('&lt;wpt.*/wpt&gt;')
  line = p.sub('',line)</pre>
<pre>  p = re.compile('&lt;trk')
  line = p.sub('\n&lt;trk',line)</pre>
<pre>  p = re.compile('&lt;/trkseg')
  line = p.sub('\n&lt;/trkseg',line)</pre>
<pre>  p = re.compile('&lt;time&gt;.*&lt;/time&gt;')
  line = p.sub('',line)</pre>
<pre>  p = re.compile('&lt;trk.*37\.3[0,1,2].*-121.8[8,9].*/trkpt&gt;\n')
  [line,count] = p.subn('',line)
  print "Removed", count," points from the track"</pre>
<pre>  f_write.write(line)</pre>
<pre>f_read.close()
f_write.close()
sys.exit(0)</pre>
</blockquote>
<p>Which does the following:</p>
<ol>
<li>Removes all waypoints from the file.</li>
<li>Adds newlines in front of some key xml tags which makes it trivial to merge multiple tracks together using a text editor</li>
<li>Removes the timestamp from each track data point</li>
<li>Removes any data point that are near my house</li>
</ol>
<p>All simple stuff, but tedious to do on the XML source file that has no line feeds as generated from the Garmin Nuvi GPS.</p>
<p>With the munged GPX file, this is uploaded to the very handy <a href="http://gpsvisualizer.com/" target="_blank">GPSVisualizer.com</a> site that dumps the track into the map you see above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/02/22/motorcycle-riding-leads-to-coding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cheeky GPS Routing</title>
		<link>http://www.foobert.com/blog/2009/01/26/cheeky-gps-routing/</link>
		<comments>http://www.foobert.com/blog/2009/01/26/cheeky-gps-routing/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 10:21:48 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[Random Silliness]]></category>
		<category><![CDATA[driving]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[jerks]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=182</guid>
		<description><![CDATA[<p>Recently purchased a Garmin Nuvi 760 GPS for the car/motorcycle. All in all, it&#8217;s lived up to expectations and does the advertised job. But, it&#8217;s not without quirks and annoyances.</p>
<p>It came with a 3-month teaser introduction to the Clear Channel FM traffic service which allows the GPS to &#8220;intelligently&#8221; determine how bad traffic is and reroute [...]]]></description>
			<content:encoded><![CDATA[<p>Recently purchased a Garmin Nuvi 760 GPS for the car/motorcycle. All in all, it&#8217;s lived up to expectations and does the advertised job. But, it&#8217;s not without quirks and annoyances.</p>
<p>It came with a 3-month teaser introduction to the Clear Channel FM traffic service which allows the GPS to &#8220;intelligently&#8221; determine how bad traffic is and reroute to find the fastest path to your destination. Sounds all well and good, until I actual found some traffic this weekend.</p>
<p>There was a section of &#8220;slow-n-go&#8221; for a few miles along I880 north while making my way from San Jose to Albany.  Normally, 880 would be the preferred route all the way. But, at Hayward, it commanded the following departure:</p>
<p><img class="size-full wp-image-183 alignnone" src="http://www.foobert.com/blog/wp-content/uploads/2009/01/cheeky_gps_routing.jpg" alt="Cheeky GPS Routing" width="536" height="753" /></p>
<p>The blue path is our track. Note the departure from the freeway, only to return right back onto 880!  Yes, the GPS&#8217;s grand idea to route around the traffic was poach the off-ramp and then merge right back into traffic!</p>
<p>And suddenly, I was <em>THAT</em> person that so infuriates me. The one that zooms up the right lane on I5 and cuts you off just before rear-ending the semi-truck that everyone else in the left lane is patiently waiting in line to pass.  The one that tail gates you for a mile, changes lanes 3 different times attempting to weave around you only to end-up back on your ass again, because, yes, in fact, you are <em>actually</em> going faster than everyone else. The one that uses the on/off ramps to pass people &#8212; it&#8217;s just not polite, and Garmin&#8217;s programmers think it&#8217;s a good idea!</p>
<p>As if that wasn&#8217;t bad enough, later in the trip, it sent me off the road again to a stop-light intersection in order to route around traffic that didn&#8217;t exist.  Yes, it was there an hour prior when we started the trip, but had since flushed out while en route.  We were very near our destination so I assumed it was time to exit the freeway &#8212; but then it wanted us right back on it again, only to exit for real a mile down the road.  It clearly showed there was no traffic in our vicinity, yet, it wasn&#8217;t smart enough to note the change in conditions and update the route.</p>
<p>So, lesson learned &#8212; if you don&#8217;t look ahead at the next 3 turns when it wants you to depart the freeway, good chance it&#8217;s doing you no favors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/01/26/cheeky-gps-routing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On backups and the importance of testing them</title>
		<link>http://www.foobert.com/blog/2009/01/12/on-backups-and-the-importance-of-testing-them/</link>
		<comments>http://www.foobert.com/blog/2009/01/12/on-backups-and-the-importance-of-testing-them/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 12:04:11 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[RTFM]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/?p=145</guid>
		<description><![CDATA[<p>I&#8217;d really like the last 18 hours of my life back.</p>
<p>Lesson 1) backups are only as good as your backup strategy.</p>
<p>Lesson 2) your backup strategy is useless if its never been tested to recover from bare metal.</p>
<p>Lesson 3) your ill conceived, unproven backup strategy will bite you. And it will not be for a reason that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d really like the last 18 hours of my life back.</p>
<p>Lesson 1) backups are only as good as your backup strategy.</p>
<p>Lesson 2) your backup strategy is useless if its never been tested to recover from bare metal.</p>
<p>Lesson 3) your ill conceived, unproven backup strategy will bite you. And it will not be for a reason that was beyond your control, like say, drive heads screeching on platters. No, it will bite you because of your own stupidity and failure to fully RTFM.  Beware: your ill conceived backup strategy is <em>cunning</em>!  It is most likely to bite you while doing something that might actually result in a more robust backup strategy.</p>
<p>While I&#8217;m not entire sure if this was my undoing, I&#8217;m unable to grok how doing &#8216;<em>grub-install</em>&#8216; on a disk that is not the first BIOS disk does bad things to the disk that *is* the first BIOS disk.  Doesn&#8217;t seam to matter that you told it to go work on /dev/sdX, where X != &#8220;first BIOS disk&#8221;. I&#8217;d like to compare notes if your mileage differs on this point.</p>
<p>No matter &#8212; something happened that really upset the boot-ability of the system. Of course, anaconda was useless in trying to &#8220;rescue&#8221; me. No, no! That would have been too simple.</p>
<p>OK, bed time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2009/01/12/on-backups-and-the-importance-of-testing-them/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Notes on my postfix + sasldb + tls settings</title>
		<link>http://www.foobert.com/blog/2008/03/09/notes-on-my-postfix-sasldb-tls-settings/</link>
		<comments>http://www.foobert.com/blog/2008/03/09/notes-on-my-postfix-sasldb-tls-settings/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 11:08:48 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/2008/03/09/notes-on-my-postfix-sasldb-tls-settings/</guid>
		<description><![CDATA[<p>There&#8217;s a great &#8220;how to&#8221; here.</p>
<p>Some of the key things that I always forget about my setup that haunt me later:</p>

I&#8217;m using sasldb2 (in /etc/sasldb2 )
When using sasldb &#8212; saslauthd daemon DOES NOT RUN. The simple DB file replaces the need for it.
The realm I&#8217;m using in sasldb2 passwords is &#8216;mail.foobert.com&#8217;
Thus, add a password is to [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a great &#8220;how to&#8221; <a href="http://postfix.state-of-mind.de/patrick.koetter/smtpauth/index.html" target="_blank">here.</a></p>
<p>Some of the key things that I always forget about my setup that haunt me later:</p>
<ul>
<li>I&#8217;m using sasldb2 (in /etc/sasldb2 )</li>
<li>When using sasldb &#8212; saslauthd daemon DOES NOT RUN. The simple DB file replaces the need for it.</li>
<li>The realm I&#8217;m using in sasldb2 passwords is &#8216;mail.foobert.com&#8217;</li>
<li>Thus, add a password is to the db:</li>
</ul>
<blockquote><p>saslpasswd2 -c -u `mail.foobert.com` username</p></blockquote>
<p>Create /etc/sasl2/smtpd.conf</p>
<blockquote><p>pwcheck_method: auxprop<br />
auxprop_plugin: sasldb<br />
mech_list: PLAIN LOGIN</p></blockquote>
<p>Also, when setting up a new Centos or Redhat box, <em>smtpd.conf</em> is looked for in /usr/lib/sasl2/ and not in /etc/sasl2/smptd.conf where some of the &#8220;how-to&#8217;s&#8221; like to mention.  Thus, on my machines, I made a soft-linked to the etc version. Before realizing this, I was seriously befuddled by the following error.</p>
<blockquote><p>Nov 27 16:02:42 pluto postfix/smtpd[20307]: TLS connection established from unknown[166.205.134.32]: TLSv1 with cipher AES128-SHA (128/128 bits)<br />
Nov 27 16:02:43 pluto postfix/smtpd[20307]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory<br />
Nov 27 16:02:43 pluto postfix/smtpd[20307]: warning: SASL authentication failure: Password verification failed<br />
Nov 27 16:02:43 pluto postfix/smtpd[20307]: warning: unknown[166.205.134.32]: SASL PLAIN authentication failed: generic failure<br />
Nov 27 16:02:43 pluto postfix/smtpd[20307]: lost connection after AUTH from unknown[166.205.134.32]<br />
Nov 27 16:02:43 pluto postfix/smtpd[20307]: disconnect from unknown[166.205.134.32]</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2008/03/09/notes-on-my-postfix-sasldb-tls-settings/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Network tar using SSH</title>
		<link>http://www.foobert.com/blog/2008/02/18/network-tar-using-ssh/</link>
		<comments>http://www.foobert.com/blog/2008/02/18/network-tar-using-ssh/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 10:45:45 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/2008/02/18/network-tar-using-ssh/</guid>
		<description><![CDATA[<p>Never realized how easy it is to duplicate a directory tree from one machine to another through the network without building an intermediate tarball and finding room for it and the original files all at the same time. Simply pipe the tar command through ssh and untar it on the fly.</p>
<p>For example, suppose we have direcotry [...]]]></description>
			<content:encoded><![CDATA[<p>Never realized how easy it is to duplicate a directory tree from one machine to another through the network without building an intermediate tarball and finding room for it and the original files all at the same time. Simply pipe the tar command through ssh and untar it on the fly.</p>
<p>For example, suppose we have direcotry &#8220;pictures&#8221; on SRC_HOST machine and I want to replicate it over to DST_HOST, do this from the SRC_HOST machine:</p>
<blockquote><p>tar cvf &#8211; pictures | ssh user@DST_HOST &#8220;cat | tar xf -&#8221;</p></blockquote>
<p>Or, if you just wanted to create a compressed archive of &#8220;pictures&#8221; on DST_HOST:</p>
<blockquote><p> tar czvf &#8211; pictures | ssh user@DST_HOST &#8220;cat &gt; pictures.tar.gz&#8221;</p></blockquote>
<p>I&#8217;m ashamed to admit how many times I&#8217;ve jumped through hoops to find the free space on both machines due to making a compressed tarball, copying it over, unpacking it, then deleting the tarball.</p>
<p><strong>Update: </strong>While the above is functional, it&#8217;s all rather academic.  Not but a few days after writing this, I stumbled across &#8216;<a href="http://rsync.samba.org/ftp/rsync/rsync.html" target="_blank">rsync</a>&#8216;. Yeaeh, this is a little easier:</p>
<blockquote><p>rsync -avz  user@DST_HOST:pictures pictures</p></blockquote>
<p>And how to do it on a Mac and get all the resource forks to transfer to a non-HFS file system requires extra care and a <a href="http://www.quesera.com/reynhout/misc/rsync+hfsmode/" target="_blank">better version of rsync than Apple delivers</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2008/02/18/network-tar-using-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More resources on low-power computing</title>
		<link>http://www.foobert.com/blog/2008/02/17/more-resources-on-low-power-computing/</link>
		<comments>http://www.foobert.com/blog/2008/02/17/more-resources-on-low-power-computing/#comments</comments>
		<pubDate>Sun, 17 Feb 2008 08:17:12 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[Geek-Stuff]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[low power]]></category>
		<category><![CDATA[tuner card]]></category>

		<guid isPermaLink="false">http://www.foobert.com/blog/2008/02/17/more-resources-on-low-power-computing/</guid>
		<description><![CDATA[<p>The Via Epia mini-ITX boards are some of the lowest power around. Epiacenter.com has a power simulator  that&#8217;s good for comparing the differences in boards.</p>
<p>Although, I&#8217;ve noticed that the VB7001G board I&#8217;m using has inconsistent results on the calculator &#8212; 16.23 watts idle versus 13.92 in &#8220;network mode&#8221;.  Take it for what it&#8217;s worth.</p>
<p>While [...]]]></description>
			<content:encoded><![CDATA[<p>The Via Epia mini-ITX boards are some of the lowest power around. <a href="http://www.epiacenter.com/powersim/powersim_v2/epiasimulator_v2.htm" target="_blank">Epiacenter.com has a power simulator</a>  that&#8217;s good for comparing the differences in boards.</p>
<p>Although, I&#8217;ve noticed that the VB7001G board I&#8217;m using has inconsistent results on the calculator &#8212; 16.23 watts <em>idle</em> versus 13.92 in &#8220;network mode&#8221;.  Take it for what it&#8217;s worth.</p>
<p>While I&#8217;m at it &#8212; first booted the Via VB7001G this evening. The sole purpose of this is for use as my main mail/web server as well as the mythtv backend. With a good power supply and a laptop HD for the primary (non-video) storage, I hope to have a box that idles at &lt;30 watts. Then the power hog P4 system connected to the TV would only be booted as needed.</p>
<p>Using an el&#8217;cheepo power supply and an old Maxtor HDD pulled from the shelf, it&#8217;s currently idling along at 46 W.  Not a bad start. I think there&#8217;s easily enough room for improvement to achieve the goal. Silent PC Review got their <a href="http://www.silentpcreview.com/article609-page4.html" target="_blank">EN12000 board down to 17W</a> at idle &#8212; mind you, they had a 5 W head start on me using a low-power variant of the C7 CPU  (not to mention 20% slower, and ~300% more expensive).</p>
<p>Here&#8217;s a good <a href="HTS721010G9AT00" target="_blank">review of popular 2.5&#8243; notebook hard drives</a>.</p>
<p><strong>Update:</strong> With a <a href="http://www.mini-box.com/picoPSU-90" target="_blank">90W Pico Power supply</a>  + the tuner card and 1.25 TB of disk on-line (2 disks, one 250MB laptop, and one 3.5&#8243; 1.0 TB Western Digital Caviar Green Power drives), the box is <em><u>idling at a grand total of 25 watts (AC wall power)</u>!</em>  Mission Accomplished.</p>
<p>There&#8217;s still some room to tweak that down a bit. The 1TB drive does not need to be spun-up full time. That should drop the idle power down a few extra watts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foobert.com/blog/2008/02/17/more-resources-on-low-power-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

