Wednesday, November 4, 2009

Bash variable assigment modifiers

I always seem to forget this about bash variable assignment shortcuts and always have a hard time finding it.

Rather than:

if [ "" = "$var" ]; then
$var=hello
fi

Use
var=${var:-hello}

Conversely, rather than:
if [ "" != "$var" ]; then
$var=hello
fi

Use
var=${var:+hello}

There's also:
if [ "" = "$var" ]; then
echo "Error, variable var must be set"
else
b=$var
fi

And:
b=${var:?Error, variable var must be set}


There are others too, but I find these ones most useful. Check bash man page for full set.

Wednesday, October 14, 2009

More Progress On Bathroom

In this week's edition, we see more destruction and some progress on new drains and supplies to the third floor bathroom.

Saturday, September 19, 2009

Rick is doing the bathroom.

Here are before and during photos from the first day.

Monday, September 14, 2009

Annual cayenne pepper harvest



I try to grow enough cayenne peppers each year so that when I dry and crush them, I have a few jars to give away and a few jars to keep. I've done this for the last 4 years or so, but this is the first time I've blogged it.

After the peppers turn a nice bright red, I pick them and using a big needle and some polyester thread, I make a pepper strand. Each successive harvest of the really red ones results in a new pepper strand.

Hang these strands in a dry place with lots of air exposure. These were hanging under my deck umbrella for several dry days. In a month or so, they'll be dry enough to process in a food processor, or better yet, in a blender.

I HIGHLY recommend processing them outdoors, in a place far away from other people. The fine particles will make you sneeze a lot.

When ground to the size you like, just pack them in old spice containers, or go to a kitchen supply store and buy some new spice containers.

Next, enjoy. I especially like to shake them on turkey sandwiches, popcorn, and any Italian dish. Beware, these ones are much more potent than what you get on your table at an Italian restaurant!

Thursday, August 27, 2009

How to grow tomatoes

Plant seeds.
Water seeds.
When the plants get big, transplant into some nice composted material and vermiculite.
Continue to water.

Harvest.

Sunday, August 23, 2009

Canning tomatoes

To can tomatoes, you'll need ripe tomatoes, basil, new canning lids and jars+bands

Wash the jars and bands in hot, soapy water and let dry upside down.
Get one large put (depth to accommodate the canning jars and one medium pot. Fill both with water.

Turn the medium pot on high heat to boil. Get one bowl of icy cold water. These will be used for blanching the skins off the tomatoes. Carefully drop 2-3 tomatoes at a time into boiling water and transfer to cold water bowl when the skin splits or after 1 minute, whichever comes first.

Peel away skin and remove stem. Place into large bowl.

Heat water in large pot. Squeezing out excess liquid from tomatoes , stuff into jars, adding basil between tomatoes (3-4 leaves per jar). Use the handle of a wooden spoon to remove excess air. Fill jar to about 1 inch from top. Thoroughly clean top of jar to assure a good seal. Place lid and band on jar loosely and continue until enough jars to fit in large pot are ready.

Place jars in hot water and wait for water to boil. Jars must be submerged. You will see air bubbles escaping from the jars. Boil for 5 minutes, assuring that no more air bubbles are escaping.

Remove jars and tighten bands. The lids should either be concave, or should go to concave as the jar cools. If it doesn't, you'll need to re-process the jars.

Tuesday, August 18, 2009

Linux auto updater reports packages kept back?

On several of my Linux computers recently, after performing an upgrade to the installed packages, I see a category called "Packages Kept Back" that has a few packages in it. Install upgrades nor refresh is able to install them. Perplexing.

The reason: I found a discussion that explained that the updater is intended to only update installed packages. When an update is released that requires installation of dependencies, it is "kept back" to keep the meaning of update pure.

The solution: Running sudo apt-get install on each of the packages kept back will both upgrade that package and install the dependencies, resolving the problem.

The extra-large hammer solution: Running sudo-apt-get dist-upgrade will also resolve these kept-back packages, but will upgrade your distribution as well (for example from Ubuntu 8-10 to Ubuntu 9-04).