ck's weblog: the universe, exploited

Wet Rot (1 comment)

Over the years, we've found plenty of evidence that our house's former owners liked to do handyman work but weren't very good at it. We're presently in the process of renovating our living room, so we're getting more and more looks at things that had been hidden. Yesterday brought us the biggest surprise yet:

Rotted framing

This is part of an extension to the house's original construction, and we'd found (and fixed) water damage to the ceiling on the other side of the room. This damage was hidden inside the wall framing, so we didn't see any evidence that it had been a problem. We did take note of the awkwardly-placed 2x4 suggesting the problem had already been identified and addressed... and left in a "fixed" state.

It wasn't tough to come up with a functional jack using what we had on hand:

Improvised jack post

And now, everything is better:

New stronger lumber, holding roof above our heads, last owners were jerks.

10,000,000,000,000,000 Miles (in Binary) (1 comment)

I rolled over 65536 miles in my WRX tonight:

Odometer reading 65536

65536 is an interesting number to computer and video game people because it's 2^16, or one of the numerical limitations of a 16-bit platform, such as Windows 3.1, the Super NES, or any number of historical Unix releases. That goes some ways to explain why I keep running into it. Sometimes it's the limit on open file descriptors, sometimes it comes up as the number of ports available for TCP use, or sometimes it's limiting the amount of money or experience I can collect in a classic video game. It's one of the more tenacious numbers out there.

And when written out in binary, it looks like ten quadrillion.

Heart Attack Grill (3 comments)

I'm a fan of Heart Attack Grill in Chandler, AZ. It's a restaurant founded on a simple premise: they serve good food with no regard to health or personal responsibility (any patron weighing in at over 350 lb gets a free burger). They make that much clear right on the front door:

THIS ESTABLISHMENT IS BAD FOR YOUR HEALTH

Their fries are cut fresh and deep fried in 100% lard. They look a lot like the fries that Murphy's Pub serves here in Champaign, but they taste so much better:

French Fries

Burgers are available with one, two, three, or four half-pound patties. This last time, I went with the "Triple Bypass Burger," with 24 ounces of beef:

Triple Bypass Burger

Anyone who finishes a triple or quad burger gets a free ride back to their car in the victory wheelchair, pushed along by one of the waitresses nurses:

The Wait Staff

All in all, I feel like they're doing a pretty good job catering to my demographic. Next time, I think I'll be ready for the quad.

RES PRGMR No More (4 comments)

As of today, I'm no longer a research programmer. My new title is "Manager of Enterprise Unix Operations."

I've been acting manager of the group for some time, in addition to doing all of my technical work. That's been a drain on my time and I've found it frustrating that I've had to cut corners on both sides to keep from falling behind. The current plan is to give up my day-to-day system administration duties and go back to focusing my efforts on doing one job really well.

Database Backups (3 comments)

I didn't like the way I was maintaining database backups, so I wrote a new script. This one dumps each database in my MySQL instance every night and keeps a rolling collection of that last three nightly backups along with the last six weeklies.

#!/bin/sh

DATE=`date +%Y%m%d`;
DAYOFWEEK=`date +%u`;

# /var/lib/mysql contains one directory per database, plus lost+found
# because it's on its own ext3 filesystem.
for DB in `/usr/bin/find /var/lib/mysql/* -maxdepth 0 -type d -not -name 'lost+found' | /usr/bin/cut -d '/' -f 5`; do

# Dump a nightly file with today's date.
FILE=${DB}-${DATE};
/usr/bin/mysqldump --user=root --password=<redacted> ${DB} > /backups/db/nightly/${FILE};
/bin/bzip2 -9 /backups/db/nightly/${FILE};

# Now that the file's written, remove all but the three
# most recent versions.
/bin/ls -1 /backups/db/nightly/${DB}-* | /usr/bin/head -n '-3' | /usr/bin/xargs rm -f;

# If it's Sunday, do a weekly backup as well.
if [ ${DAYOFWEEK} = 7 ]; then

# Make a hard link to the nightly backup that was just created.
FILE=${FILE}.bz2
/bin/ln /backups/db/nightly/${FILE} /backups/db/weekly/${FILE};

# Keep most recent 6 weeks.
/bin/ls -1 /backups/db/weekly/${DB}-* | /usr/bin/head -n '-6' | /usr/bin/xargs rm -f;

fi

done

My question to you, dear Internet: how could I make this better/faster/cleaner/prettier?

Copyright © 2001-2009 Chris Kuehn