What's Happenin' Now

Tuesday, July 15, 2008 link

It's been ages since I've updated the blog, as I've been extremely busy. It will probably continue to be quiet here for another few weeks, possibly followed by a re-launch.

If you want to stay in the loop, I would subscribe to the feed or, better yet, sign up for the newsletter here:

http://www.fleacircusgames.com/news.php

TTFN

Full Circle

Tuesday, April 08, 2008 link

Sometimes I'm amazed at how everything is inter-connected, through TIME and SPACE.

For instance, I just realized that my first attempt at making computer games was with Garry Kitchen's GameMaker on the C=64. Which probably explains why I now make games on the computer in my KITCHEN.

Well, it's the area right next to my kitchen, but I think it counts because it's the same tiled area, and not carpeted like in the living room.

Anyway, this is just more evidence that there's a grand design to all of this, but who knows where it will lead us.

New Name

Saturday, April 05, 2008 link

Apparently, Washington Mutual is trying to go by "WaMu" in some sort of embarrassing attempt to be hip or something.

Well, no one (no one!) is better than me at embarrassing themselves while trying to hip. So from now on, my name is JoSko.

Lotus

Tuesday, March 25, 2008 link

Every once in a while, I spot something that reminds me I'm not in Kansas any more. Which happens 24/7 because I've never actually been to Kansas, but...

This particular time, it was a Lotus Elise in the parking lot of Long's Drugs.

It reminds me of when I used to drive along the mountain freeways, escaping cops in my Lotus Esprit in Test Drive for the Commodore 64.



Sorry about the small picture. This is literally the second picture I've ever taken with a camera phone.

Actually, the original image was only slightly larger than the resolution on a Commodore 64. It all comes full circle, like the snake that eats its own tail.

Extracting MySQL Table with Perl

Sunday, March 02, 2008 link

Every once in a while, I have to extract an individual table from my MySQL archive files. Here's a small Perl script to do that.

Example:
% perl extract_table.pl dump_20080301.sql dt_show_saved

Code:
#!/usr/bin/perl

use strict;
use warnings;

my $usage = "\nUsage: $0 <fileName> <tableName>\n\n";

my $fileName = shift || die $usage;
my $table = shift || die $usage;

my @keepLines = ();
my $doKeep = 0;

open(FILE, "<$fileName") || die "Can't open $fileName: $!";
while (my $line = <FILE>)
{
# Look for comment: -- Table structure for table 'tableName'
if (substr($line, 0,8) eq "-- Table")
{
if ($doKeep)
{
last;
}
elsif ($line =~ m/$table/i)
{
$doKeep = 1;
}
}
push @keepLines, $line if $doKeep;
}
close FILE;

print for @keepLines;