ck's Weblog: Life, Libelled


Now Playing:

NBA Jam Glory Days

Thursday, August 11 2016

Back in 1995, I won a Nintendo Power contest for biggest blowout with the rookie team in NBA Jam: Tournament Edition on the Super Nintendo:

Nintendo Power volume 74 page 101

There was a fair bit of strategy and planning that went into my high score, since NBA Jam has a lot of (legal to use) options and codes that can be combined in interesting ways. I think it's finally safe to share my strategy:


  1. Time Speed: 1 (slowest/longest game)
  2. Drone Difficulty: 1 (easiest opponents)
  3. Hot Spots: On (making shots from randomly-placed circles gives 4-8 points)


  1. Dunk from Anywhere (specifically, dunk from hot spots)
  2. Super Shoves (opponents always drop the ball when pushed)
  3. Prince Charles (secret players can't be injured, which otherwise slows you down)

With those in place, the game was pretty tedious. I'd run to the hot spot, dunk for extra points, then shove the opponent as soon as they received the inbound pass, pick up the ball, and dunk from the next hot spot. Sometimes I'd miss the shove and let the computer score quickly. Repeat until time expires.

Bonus trivia: the game's stats counters max out at 255.


Multi-Cloud Database Backups

Tuesday, August 9 2016

It's been two years since the last script and I've read the docs on how to use highlight.js, so I may as well share the new version of my database backups. This one encrypts the backups and keeps a copy in Google Drive as well as Amazon S3.


DATE=`date --iso-8601`
DAYOFWEEK=`date +%u`
TMPDIR=`mktemp -d`


# Parent directory IDs for Google Drive.

for DB in `mysql -ss -e 'SHOW DATABASES' | grep -v _schema`; do
        mysqldump --events ${DB} | xz - | gpg -r <redacted> --encrypt - > ${FILE}

        # Copy this backup the clouds for durable external storage.
        aws s3 cp ${FILE} ${S3_PATH}/nightly/ > /dev/null
        gdrive upload --parent ${DRIVE_NIGHTLY} ${FILE} > /dev/null

        # If it's Sunday, do a weekly backup as well.
        if [ $DAYOFWEEK = 7 ]; then
                aws s3 cp ${FILE} ${S3_PATH}/weekly/ > /dev/null
                gdrive upload --parent ${DRIVE_WEEKLY} ${FILE} > /dev/null

        rm ${FILE}

rmdir ${TMPDIR}

# The S3 backups get cleaned out automatically by lifecycle scripts. Google
# Drive needs that to be done manually. Nightly backups have a two-week
# retention period.
DELETE_DATE=`date --rfc-3339='seconds' --date='2 weeks ago' | sed -e 's/ /T/'`
for ID in `gdrive list -q "'${DRIVE_NIGHTLY}' in parents and modifiedTime < '${DELETE_DATE}'" | tail -n +2 | awk '{print $1}'`; do
	gdrive delete ${ID} > /dev/null
# Weekly backups can stay around for a year.
DELETE_DATE=`date --rfc-3339='seconds' --date='1 year ago' | sed -e 's/ /T/'`
for ID in `gdrive list -q "'${DRIVE_WEEKLY}' in parents and modifiedTime < '${DELETE_DATE}'" | tail -n +2 | awk '{print $1}'`; do
	gdrive delete ${ID} > /dev/null



Wednesday, August 3 2016

It's been 12 years, 4 months, and 18 days since we bought a house. As of today, we own it.


Free SSL

Friday, June 24 2016

Thanks to Let's Encrypt and Amazon CloudFront, all my content is now served over respectable HTTPS.

Let's Encrypt gives out certificates for free to anyone with a domain with the goal of making the internet a safer place.

Amazon Web Services issues free SSL certificates for use with Elastic Load Balancers and CloudFront. I pay about a nickel a month to use CloudFront as a CDN. Free custom SSL is a nice add-on to that.



Thursday, May 19 2016

I bought Guacamelee! because it was on sale and I liked the name. After a year or so sitting in my Steam inventory, I installed it on a whim and tried it out.

Holy crap, guys.

This is a seriously fun game, best I've played in some time. It's a platformer with some great fight mechanics. Its difficulty curve keeps gently rising, and so far, it's done a great job of keeping thing progressively more challenging so I feel accomplished at the end of every area. I'm somewhere in the middle of the game, but I'm already having to solve puzzles by turning into a chicken, busting up the scenery with sweet luchador moves, and flipping between two parallel universes (often mid-jump).


Copyright © 2001-2016 Chris Kuehn