Testing BH

| | Comments (4408)
This is a test of the new hosting platform
After reading Moving Planters Indoors for the Winter by Joseph Hall I decided to translate his script to Python.  Here's the result:

import xml.etree.ElementTree as ET
import httplib
import smtplib
from email.mime.text import MIMEText

conn = httplib.HTTPConnection('www.wrh.noaa.gov')
response = conn.getresponse()

forecast_xml = ET.parse(response)
low_temp = 100
for child in forecast_xml.getiterator():
    if child.tag == 'temperature':
        temp = int(child.text)
        low_temp = temp if temp < low_temp else low_temp

if low_temp < 40:
    msg = MIMEText('Temps as low as %s coming up' % low_temp)
    msg['Subject'] = 'Cold Weather'
    msg['From'] = from_addr = 'username@gmail.com'
    msg['To'] = to_addr = '000000000@messaging.sprintpcs.com'

    s = smtplib.SMTP('smtp.gmail.com', 587)
    s.sendmail(from_addr, to_addr, msg.as_string())
I purchased the Berkey Light water filter a few months ago.  When I made the purchase I also had the option of getting a free accessory.  I decided that the portable sport bottle would go well in my 72-hour kit (Bug out Bag).

Here are some of the stats on the Berkey Light filter:

  • Can process 6000 gallons of water
  • 2 1/2 gallon storage chamber
  • Filters 3.75 gallons of water per hour
  • Includes elevated base
Set up for the water filter is quite easy.  There are three main pieces: the upper chamber, lower chamber, and base.  All three simply snap together.  The spigot and filters are fitted with some washers and thumb nuts.  Setup is 5 minutes if you are taking it slow.

The first thing that you must do before filtering water is to prime the filters.  Berkey provides a rubber gasket that you can to prime the filter from any water tap.  My concern is that what if you are using an untrusted water source to prime your water?  In that instance you are going to have to toss out the first couple of gallons of water, then thoroughly clean the bottom chamber.  If you don't have access to any pressurized water source then you can get your filter to 70% efficiency by soaking the filter nozzle side up in water for several hours.  If you use this method then make sure that the nozzle is above water.  The Berkey FAQ provides additional insight into how the filters work.

After setting up, priming and filtering a few gallons of water I decided a taste test was in order.  I got three glasses of water: 1 from the tap, 1 from the Berkey, and one from by refridgerator which has a Brita water filter installed.  After letting all three glasses come to room tempurature (so the cold water didn't have an advantage) I did a rather informal blind taste test.

The Brita and Berkey filter water both tasted excellent.  The tap water was obvious.  I actually ended up picking the Brita water as my favorite in the test, but it was very close.  I'm sure that since I've been drinking the Brita water for so long that my taste buds were more attuned to that.  My conclusion though was that the Berkey water was just as good as any filtered water I've had.  

At this point I would definitely recommend the Berkey Water filters.  The Berkey Light fit my budget, and had a good capacity.  Looking back however I would probably get one of the stainless steel models.  The main reason for this is that they look much nicer.  I had the Berkey Light in the kitchen for about a week when I first got it.  By the end of that time my wife wanted it gone because it was too ugly.  
I've been meaning to put together my 72-hour kit (also known as a "Bug out Bag") for a while now.  Several times I've gone to the store to gather up portable foods and have made some efforts to get the necessary supplies, but the final act of putting it all together always seemed to escape me.

The past week or so I decided once and for all to finish the job and quit worrying about it.  I spent a fair amount of time looking at what other people have done and ended up using a list from safelygatheredin.blogspot.com as my base line.

The goal for putting my kit together was to be as frugal as possible, but I also wanted some reliable tools that I could depend on if I needed to use them.  I probably spend a little more than I needed to on hardware, but I ended up with some good solid tools like a knife, saw, axe, stove, compass, and signaling devices.  I figure this setup will be a good base for camping.  My sons are starting to get to the age where I can take them camping and actually enjoy it.

The things that I am most worried about are warmth, food, and water.  All these come at a fairly hefty weight/size penalty.  I decided for food I would pack one MRE type meal per day per adult, then we would have oatmeal packets for breakfast, and some canned beans / meat product and crackers for lunch.  I have one MRE per day to split between my 2 boys, and they have similar stuff for the other two days.  The MRE's will ensure at least one high calorie meal a day.  Unfortunately the MRE's are bulky and a little heavy, so I didn't want to be toting around 9 meals per person.

For water I'm packing around 4 liters of liquid (2 liters of water, and 2 liters of gatoraid), my wife has maybe 2 liters in a couple of different hand sized water bottles.  My boys are each carrying 2 .5 liter bottles.  I also have a 6 gallon hard water can that will be carried by hand, and enough water purification pills to purify an additional 50 gallons of water.  I'm planning on possibly ditching the 6 gallon can if things get out of hand.  But if I'm leaving by car, then I can toss in the extra water.

For warmth I've got several ways to start a fire.  I have some strike-any-where (or strike-no-where as the case may be) matches.  I've also ordered a BlastMatch from Ultimate Survival Inc.   I also made some home made firestarting material following this guide from utahpreppers.com.

I have sleeping bags for my wife and I.  The kids have blankets.  Depending on the weather conditions I figure we'll end up sleeping together to conserve body heat.  To keep the weather away I've got lots of rope and a tarp.  I'd like to replace that with a decent tent some time, but I couldn't find a tent with the space requirements that I had at a reasonable price.

Now on to the photos.  I ended up packing 4 bags.  My boys each have a small rolling backpack, my wife and I split up what didn't fit in their packs.  Also we have a newborn, so my wife ended up  carrying some diapers and other things that the baby might need.  We have a front carrier for the baby, but I'm actually not sure how that is going to work out.  We need to take our gear on a small hike some time and see if can actually carry our packs.

Pack to be carried/pulled by a 2 year old. 

Has: clothes, diapers, wipes, whistle, flashlight, emergency blanket, water, toothbrush/toothpaste, small toy and some food.

Pack to be carried by a 5 year old
Has: clothes, whistle, flashlight, emergency blanket, water, toothbrush/toothpaste, small toy, colored pencils and pater, and some food.

Pack to be carried by an Adult (my wife)
Has: clothes, flashlight, hand operated radio, fuel cell, 100-hour candle, sewing kit, eye glass repair kit, soap, shampoo, baby products, leatherman tool, whistle, mess kit, matches, gloves, rope, emergency blankets, can opener, medical kit, garbage bags(2), food, and water.  She's using a fairly standard Kelty backpacking pack.  Sleeping bag is going to be lashed on the outside.

Pack to be worn by an adult male (mine)
Has: clothes, flashlight, disinfectant wipes, 100-hour candle(2), fuel cell, gloves (2), dust masks (3), matches, water purifier, rope, strap, medicine, first-aid kit, toothbrush/toothpaste, floss, Peak1 stove, compass, signal mirror, whistle, emergency blanket, bungee cord, mess kit, hand axe, folding saw, fixed blade knife, dual folding knife/saw, folding shovel, wool cap, food, water.  I'm using an army style rucksack.  I may replace this in the future, but it's not pressing.  I'm going to lash my sleeping back to the bottom of the pack.

Here is the gear all packed up.

I still have a few loose ends to tie up.  I need some wool blankets for the boys.  I figure I'll lash them to the tops of their bags by the handle.  I also need to get some cash, and make copies of personal documents (birth cert, ss card, will, insurance cards etc).  I'm also going to get a couple of caribiners for use as either pulleys, rescue, what ever.

I recently put up a code snippet on djangosnippets.org detailing how to do chained select boxes with Django and Mootools.

The basic idea is you have one select box that alters the contents of another select box based on what is chosen.  The idea is pretty simple, and it is pretty easy to implement also.

I've been using Mootools to do most of my javascripting lately.  I've really been impressed with that library.

CVS leapfrog

| | Comments (2192)
I don't do this very often, but on occasion I find my self working on functions in a bit of code, but forget to branch the new changes.  Of course every time I do that I find I need to go back and do bug fixes on the "old" code.

Here is how to do a somewhat graceful code leap frog in CVS.

  1. cvs commit file (commit your current working changes prior to any bug fixes)
  2. cvs up -r $rev_of_working_code file
  3. mv file file.bak
  4. cvs up -A file
  5. cp file.bak file
  6. <make bug fixes here>
  7. cvs commit -m "leapfrog from $rev_of_working_code for bug fix" file

Your old code is now at head with the bug fix.  Now you most likely want to go back to what you were working on. Depending on how complex your changes are there are two ways to do this.

Simple method:

  1. cvs up -j $rev_of_head -j $rev_of_code_before_leapfrog file
  2. cvs up -j $rev_of_working_code -j $rev_of_head file  (you will most likely get a few conflicts.  if the conflicts are over whelming then try the next method)
  3. cvs commit file

Slightly more complex method:

  1. cvs up -r $rev_of_code_before_leapfrog file
  2. mv file file.bak
  3. cvs up -A file
  4. cp file.bak file
  5. cvs up -j $rev_of_working_code -j $rev_of_head file 
  6. cvs commit file


Current version: 1.16
Code that needs bug fix: 1.15

  1. cvs commit Admin.pm (results in 1.16)
  2. cvs up -r 1.15 Admin.pm
  3. mv Admin.pm Admin.pm.bak
  4. cvs up -A Admin.pm
  5. cp Admin.pm.bak Admin.pm
  6. <apply bug fixes>
  7. cvs commit -m "leapfrogging 1.16 for Bug# 1234" Admin.pm (results in 1.17)
  8. cvs up -j 1.17 -j 1.16 Admin.pm
  9. cvs up -j 1.15 -j 1.17 Admin.pm
  10. cvs commit -m "bringing back changes from 1.16 with bug fixes in 1.17" Admin.pm
  11. joy
I acquired a Logitech Revolution MX a few months back.  I immediately fell in love, but I was having problems getting all the buttons to work under linux.  I found a hack on the ubuntu forums describing how to enable some basic functionality.  After going through that hack I had a middle mouse button again... Yay.

After running into a problem where my numpad doesn't output anything in KDE I grabbed a new keyboard.  The new keyboard's numpad also didn't work.  I began to suspect a configuration problem.  After digging around I ran into a thread about BTNX and the MX revolution.  

I installed BTNX and it works like a champ.  I have not only my middle mouse button functionality (the search button), but I can use the thumb wheel, the left-right functions on the scroll wheel etc.  Check out the forum entry at:
After converting my home page to use Movable Type as a CMS I find that I happen to have Movable Type installed...  I guess that means I can join the blogging craze.  I intend to use this primarily as a spot to journal cool tips, hacks and other work arounds as I find them.  I suppose I will also write about paintball events and other personal happenings if they are significant enough to warrant a public shout-out.