Friday, September 23, 2011

Bus Pirate DIY "case"

A little DIY case I threw together using a ruler, an Exacto knife, plastic from a blister pack, and some 4-40 hardware I had lying around:

It's not especially protective, but it will keep random stuff from falling on it and shorting something out.

The trick to making this is to start with the rectangular hole for the guarded probe connector because it's the hardest part to get right. Once you have cut a hole you like, use the edges of the Bus Pirate itself as a guide and lightly score the other edges one at a time to mark them. Use a straight edge to cut the marks deeper. It's faster to finish the cuts with scissors.

If you're not familiar with 4-40 hardware: 4-40 is a standard thread size. You can find 4-40 hardware in serial, parallel, and video D-sub connectors. They're often used in RC models too, judging from a quick ebay search. Sometimes the hardware store will carry 4-40 nuts and bolts.

Tuesday, September 13, 2011

NFS4 id fixes

I was having a problem with ids on an NFSv4 client:

$ ls -l /r1/bob/
drwxr-xr-x  2 4294967294 4294967294 4096 2011-05-14 19:29 junk
drwxr-xr-x  2 4294967294 4294967294 4096 2011-01-30 02:14 junk2
drwxr-xr-x 14 4294967294 4294967294 4096 2011-05-14 16:31 unsorted_junk

After fumbling around for a bit, here is the solution I'm running with now.

On both the server and the client, add this to /etc/idmapd.conf:

[Translation]
Method = nsswitch

On the client, add this /etc/rc.local:

service idmapd start
umount /r1
mount /r1

Now we're all good:

$ ls -l /r1/bob/
drwxr-xr-x  2 bob bob 4096 2011-05-14 19:29 junk
drwxr-xr-x  2 bob bob 4096 2011-01-30 02:14 junk2
drwxr-xr-x 14 bob bob 4096 2011-05-14 16:31 unsorted_junk

Monday, September 5, 2011

Boston Baked Beans

One of Mrs Squirrel's favourites, this is based on the recipe from the 1997 edition of The Joy of Cooking.

  • Total cooking time: 6-8 hours.
  • Ingredients:
    • 2 lbs white navy beans
    • 1 cup light or dark molasses
    • 8 oz salt port
    • 2 cups chopped onions
    • 2 tsp ground black pepper
    • 1/2 tsp ground cloves
    • water
  • Makes about 10 cups of baked beans, which will keep in the refrigerator up to 1 week, or frozen and enjoyed up to 6 months later.

Step 1: Cook the beans

The goal of this step is to get 2 lbs of white navy beans to the point where they are soft and creamy in the centre. Ideally, the skins should not not be frayed, nor should the beans be mushy and falling apart.

Pick over and wash 2 lbs white navy beans. Place in a pot and add 12 cups water. Boil for 2 minutes, then cover and let stand for 1 hour.

Bring the beans back to a boil and simmer for 45-60 minutes, until the beans are done, as described above.

If you're using a different species of bean, the required cooking times may differ from the above. For example, one species of small red beans required an additional 30-60 minutes simmering.

If you use red kidney beans, read the following, which I've copied from Wikipedia for convenience:

The toxic compound phytohaemagglutinin, a lectin, is present in many varieties of common bean but is especially concentrated in red kidney beans. Phytohaemagglutinin can be deactivated by cooking beans at 100 °C (212 °F) for ten minutes. However, for dry beans the U.S. Food and Drug Administration (FDA) also recommends an initial soak of at least 5 hours in water; the soaking water should be discarded.

Who said beans were boring?

While the beans are cooking, soak the salt pork to wash away some of its salt.

When the beans are done, gently strain them. Avoid shaking the colander, to prevent fraying or mushing the beans. Discard the cooking water.

Step 2: Bake the beans

In an oven proof pot, bring to a boil

  • 3 cups of water
  • 1 cup light or dark molasses
  • 2 tsp ground black pepper
  • 1/2 tsp ground cloves
  • optional: 1 tbsp salt

Gently stir in the beans along with

  • 8 oz salt port, cut into 1/2-inch cubes
  • 2 cups cupped onions

If necessary, stir in additional hot water to just cover the beans. Cover the pot and bake 4-5 hours until the liquid has thickened.

Saturday, September 3, 2011

16-segment LED from Active Surplus

Here's the pin-out of a mysterious 16-segment LED display we picked up last weekend from Active Surplus. Stamped on the top is "TR371 A 5G".

It has a common anode, at pin 18.

This is mostly for my own notes, in case I decide to do something with it later. Feel free to use at your own risk, not responsible for injuries sustained while ROFL, etc.