Things Dilburn learned at Burning Man

| No Comments | No TrackBacks

The Dilburn campers jotted some useful notes on a little whiteboard at our camp. Eventually I wanted to erase the whiteboard, so here's what it said!

  • Burning Man is what you make it.
  • RVs are really nice.
  • Art cars are fun!
  • Hexayurts are the way of the future.
  • Tents are dusty.
  • White carports don't reflect enough sun.
  • Bring extra rebar and sledgehammers. Not just extra. Bring too much.
  • Coffee.
  • Couches.
  • NO PACKAGING!
  • Repack everything into bins, sorted by type-of-thing.
  • Bring power tools. Charged.
  • Try camping on the 7:30 side. It's crowded, and different than the 4:30 side.
  • Create wind and sun breaks.
  • Designate a shit table.
  • Give foot baths.
  • Drinks are communal. Expect your beer cooler to be raided, so just have everyone pay in upfront.
  • There's no such thing as a quick trip at Burning Man - never say, "I'll be right back!"

Upgrading an HP dv2000

| No Comments | No TrackBacks

My gal has a laptop that she really likes, an HP dv2000 - dv2225nr to be exact - even though it's slooow. I'd gotten pretty near to talking her into replacing it when the new job provided a spiffy ThinkPad that she can bring home now and then. Needing only a personal machine to sync her iPhone and surf the web, I said, "What if we just put in a hundred bucks to make it less slow and do a Windows Vista detox?"

Ok, $185 bucks later, and I have some recommendations to make to the lazywebs about this laptop model.

Things I learned:

The AMD Turion 64 x2 with GeForce Go 6150 chipset in this system will happily accept sticks of 4GB DDR2 RAM, probably for a maximum capacity of 8GB. But I stopped at mixing a 4GB stick with an existing 1GB stick, for a total of 5GB.

Check in the BIOS how much RAM is set aside for that GeForce Go 6150. The default is probably 64MB from the factory (with the default 1GB memory configuration, this makes sense I suppose), but you can go to 128MB. Now that 128MB is basically a rounding error on the total memory size, use it.

I tried to clone the original hard drive, but taking it out of the machine caused it to lose its magic smoke. That meant my Windows 7 Upgrade edition was no longer valid for a clean install on a new 7200RPM drive. Follow these directions to get around that:

  1. Finish the installation with the activate-later option.
  2. Once you're up and running, run regedit as Administrator
  3. Change this key from 1 to 0:
    HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Setup/OOBE/MediaBootInstall
  4. Close regedit
  5. Run cmd as Administrator
  6. Run slmgr /rearm at the command line
  7. Close cmd
  8. Activate by going to System -> Change product key

Windows 7 64-bit runs great, uses all of the RAM and all that jazz. [Insert pointless argument about pointer sizes and 64-bit bloat and how I'd be better off with 3.5GB usable RAM at 32-bits. I don't care; everything else I touch these days is 64-bit. Consistency FTW.]

Finally, the 1.6GHz Turion TL-50 CPU sits in an S1G1 socket, so $20 got me a 2GHz TL-60 with double the L1 cache and a 31W TDP, down from 35W. Runs faster, cooler, and I pretend that the battery lasts a little more. That's what I told my girlfriend, anyhow! Winning!

Whole Wheat Oatmeal Teff Chocolate Chip Cookies

| No Comments | No TrackBacks

The title is quite a mouthful, and so are these cookies! Crunchy, soft, crumbly, textured, tasty, and as it happens, vegan and parve! I made this recipe up last weekend while it was raining in San Francisco, and had a hankering for cookies. Ate a bunch, and brought the rest in to work to share and meet my coworkers. We all knew it was a rainy weekend, because the company message board was full of "extra cookies in the break room!" messages :)

2/3 cup whole wheat flour
2/3 c. oatmeal
1/3 c. teff flour
1/2 c. sugar (white, demerara, brown, etc.)
1/3 c. olive oil
1/3 c. dark chocolate chips
2 tbsp. vanilla
1 tsp. baking soda
1 tsp. baking powder

Now you're probably looking through that list and thinking, "Ok, all that looks familiar, except for that teff stuff. What's that!?" Teff is a grain grown in Ethiopia. It's one of the most protein-dense grains, and also the smallest whole grain. Ethiopians use it to make their native style of bread, called injera, which I can best describe as a sourdough crêpe. Bob's Red Mill sells teff flour, available at most natural foods stores and Whole Foods.

Next time I make this recipe, I might also throw in some frozen concentrated orange juice to add a little bit more binding to the finished batter. Eggs would do the trick, too, but I didn't have any in the fridge when I whipped this up.

Ikea Hacking: Gorm Wine Rack

| No Comments | No TrackBacks
Gorm assembly hint: get a 10mm socket for your drill-driver.10mm nut driver bit

Ikea has at least half a dozen options for wine storage, but its Gorm shelf system takes the cake for versatility. The Gorm is made of solid, unfinished pine, allowing you to hack it more easily than Ikea products made of cardboard, spit shine veneer, and plastic cams. Gorms can stand alone, be chained together, mixed-and-matched with any part in the series, and, because of its simple, solid wood construction, sawed, drilled, screwed, painted, or stained to your heart's content.

Gorm Wine and Glass Rack For this hack, I started with a Gorm 30"w x 13"d x 68"h kit, using three of the four shelves, and mixed in three more Gorm wine rack shelves. Before I left Ikea, I went over to the parts department and got eight more screws to match the ones that hold the backstays onto the Gorm.

Adding stemware hangers to a Gorm shelf I picked up two chrome wine glass racks and a dozen wine glasses from Bed, Bath & Beyond, screwed the racks to the underside of the top Gorm shelf (with those extra screws from Ikea), and voilà, my very own wine bar!

Python Meta Decorators

| No Comments | No TrackBacks
Recently, I was working on a project in Python framework that was built around decorators. Each of my functions needed something like six decorators, each with its own arguments, but mostly all the same. I thought, "This is a classic case of cut-and-paste coding; there has to be a better way!" I toiled over decorators for a while, and finally came up with this pattern:
def monkey(arg):
  def outer(f):
    def inner(*args, **kwargs):
      print "Monkey: %s" % arg
      f(*args, **kwargs)
    return inner
  return outer

def zombie(arg):
  def outer(f):
    def inner(*args, **kwargs):
      print "Zombie: %s" % arg
      f(*args, **kwargs)
    return inner
  return outer

def wrapper(m, z):
  def outer(f):
    @monkey(m)
    @zombie(z)
    def inner(*args, **kwargs):
      f(*args, **kwargs)
    return inner
  return outer

@wrapper("coconut", "brains")
def mytesta(foo):
  print foo

@wrapper("bacon", "chainsaw")
def mytestb(foo):
  print foo

mytesta("Hello World")
mytestb("Hello World")
What I'm doing here is first setting up two standard argument-taking decorators, @monkey and @zombie. Then I'm setting up a decorator that returns a decorated function, whose arguments are built at decoration time. This lets me template out a complex decoration pattern where only a few arguments need to change for each function, and pass just those arguments into my meta-decorator. This is the output:
Monkey: coconut
Zombie: brains
Hello World

Monkey: bacon
Zombie: chainsaw
Hello World

The Globe

| No Comments | No TrackBacks

Since it's my birthday, I'll share my new favorite drink:

The Globe
from the SFist

3 oz. 209 Gin
1 oz. St. Germain
1 oz. lime juice
1/2 oz. agave nectar

Shake and serve up with a mint garnish.

Convert a Postfix queue to mbox format

| No Comments | No TrackBacks

Today I wanted to convert the contents of my postfix 'deferred' queue, which was all spam stuck in my MTA, to mbox format so that I could feed it into various spam-learning systems.

First I converted my Postfix queue to human-readable format with postcat:

cd /var/spool/postfix/deferred
mkdir spam
for i in {0..9} {A..F}; do mkdir spam/$i; done
for i in `ls */*`; do postcat $i > spam/$i; done

This made a copy of each file in postcat format, but that's only halfway there -- postcat has its own output format that isn't anything like an mbox or a maildir. Inspecting the output, and brushing up on my sed, I came up with this:

sed -n '
  /^\*\*\* ENVELOPE/,/^\*\*\* MESSAGE CONTENTS/ {
    /^message_arrival_time:/ {
      s/^message_arrival_time: \(.*\)$/\1/
      h
    }
    /^sender:/ {
      s/^sender: \(.*\)$/\1/
      H
      g
      s/\(.*\)\n\(.*\)/From \2 \1/
      p
    }
  }
  /^\*\*\* MESSAGE CONTENTS/,/^\*\*\* HEADER EXTRACTED/ {
    /^\*\*\* MESSAGE CONTENTS/ d
    s/^\*\*\* HEADER EXTRACTED.*$//
    s/^\(>*From \)/>\1/
    p
}' -

A final pass over all of the messages, and I had my mbox file to train SpamAssassin with:

for i in `ls */*`; do sh mkmbox.sh < $i >> spam.mbox; done
sa-learn --spam --mbox spam.mbox

Recipe for Seitan Stew

| No Comments | No TrackBacks

Found in a backcopy of Vegetarian Journal, March 1996:

1 cup of water plus 1/2 cup water
1 ounce dried wild mushrooms
1 Tablespoon oil
1 large onion, chopped
2 carrots, diced
3 small turnips, peeled and cut in quarters
4-5 small potatoes, cut in half
1/2 pound mushrooms, halved
3 dried tomatoes, made into powder
8 ounces seitan, cut in small chunks
1 teaspoon dried rosemary
1 teaspoon dried thyme
1 teaspoon dried sage
1 Tablespoon miso
1 Tablespoon arrowroot
2 Tablespoons fresh chopped parsley
Black pepper to taste

Boil one cup of the water and soak the dried mushrooms (if they are morels or shiitake) for 30 minutes. Save soaking water. If using porcini add when recommended.

Heat oil in pan over medium heat. Add onion, carrot, turnips, and potatoes. Sauté for 3 to 5 minutes until onion begins to soften. Add fresh mushrooms, tomato powder, and 1/4 cup water. Cook for 5 more minutes. Then add seitan chunks, dried herbs, and rehydrated mushrooms that have been cut in pieces. Cook for 5 more minutes.

Add soaking water drained of any debris and porcini, if using them. Add the miso and stir. Cook for about 10 more minutes until vegetables are almost tender.

Combine the remaining 1/4 cup water with the arrowroot and add to the pan over medium heat, stirring until thickened. If too thick add water 1 tablespoon at a time. If too thin add arrowroot 1 teaspoon at a time. Season with black pepper. Add parsley just before serving.

A recent AP story about health care spotlights the sort of close-minded, numb stupidity that fuels anti-reformers:

Andrew Newcomb, 28, who works in sales and lives near Destin, Fla., said he doesn't think taxpayers should have to take on the costs of covering the uninsured.

"I don't want my tax money to pay for some pill-popper to fake some injury and go to the hospital when I don't ever go to the hospital," said Newcomb, adding he can afford to go to the doctor and pay $60 for a checkup.

Andrew, since you never go to the hospital, I'm sure it won't ever be a problem. But if you do get sick, be sure to die quickly. Otherwise you might cost us taxpayers a lot of money at a taxpayer-funded emergency room.

Updating Soekris firmware using Kermit

| No Comments | No TrackBacks
I've had trouble getting minicom's xmodem to fully upload a Soekris firmware image over USB serial adapters, and I've never been a big fan of minicom in the first place. I like good old Kermit. Recently I discovered how to get Kermit to speak xmodem, and used it to update the firmware on my Soekris Net4801.

First, install kermit and lrzsz. Next, connect your Soekris box. Now fire up kermit and go!

$ kermit

set protocol xmodem-crc download {} {lsx %s} {} {lrx %s} {}
set line /dev/ttyUSB0
set speed 19200
set carrier-watch off
set flow none
connect

> download -

send /binary firmware-file-name
connect

> flashupdate

I started life at an early age. I learned to run, but kept falling over. Then I learned to walk, but couldn't keep up. Finally I learned to dance, and my world spins with me.

Tweets

Loading . . .

Recent Comments

  • SodaBrew: You rewrote the device identification bits so that the system read more
  • Michael: Can you tell me how make the usb storage device read more
  • Дилян Палаузов: Why don't you use the Certificate Subject Alt Name extension read more
  • David: Hello, I'm the developper of Wiclear. I'd like to let read more

Categories