Archive for March, 2009

My bike crash incident

3 cop cars, ambulance and firetruck - 45th st exit from I-5

3 cop cars, ambulance and firetruck - 45th st exit from I-5

So last night, as I was exiting I-5 at the 45th street exit, I was hit by a car. The douchebag clipped me on the left-hand side, knocking me into the brambles on the side of the road and threw me from the bike.

The bike landed on my left ankle, and with my weak-assed arms, I was unable to lift the bike off me (it hurt like a motherfucker*). Trapped under the bike, I was beat up but not broken. The bike has some damage, but is operational.

A kind citizen stopped and helped get the bike off me. However, he was on the phone with 911 (anyone that knows my bike knows how bad that could be for me – the bike isn’t registered, it’s not titled or plated, the plates are from a different bike, and I don’t have my endorsement).

Before I could regain my strength and stand up, the EMT’s, a firetruck, and 3 cop cars were on me. The police officer that took my information was super-duper kind – she could have arrested me and impounded the bike. Instead, she gave me a little bit of a hard time about the illegal bike and no endorsement, and made sure I got off the exit by pushing the bike up the hill to where my wife was waiting for me. That walk, pushing the bike on my bashed up legs, hurt like hell!

Bruises, lots of cuts and shit, but otherwise OK. The cops, firemen and EMT’s that showed up (via a 911 call from a citizen) were awesome – even more so because the police let me leave with my untitled, unregistered (no endorsement, either) bike. Today, I consider myself VERY LUCKY.

The bike will be off the road for a little while – I need to go over every nut and bolt and cable, and this gives me the chance to do the work I’ve long needed to on the bike. I hope I can get some assistance as I will need it for sure!

* I don’t swear much on my blog (as the “about me” blurb will tell), but this time it’s a necessary evil.

Kqueue hell!

I’m having a bad day programming-wise. I’m trying to learn how to implement kqueue on a Mac OS X 10.4.11 server.
I need to monitor a directory for changes, and update a database table with the changes (file added – add to db as new row; file removed – remove from db table).
Anyone out there know anything that might help? I’ve been searching for hours now!

Update: (2009-03-30)

I’ve “solved” the problem by using a combination of AppleScript, PERL, and MySQL. Here’s what I did:

  1. Created a folder action that monitors a folder on my PDF repository server for any additions/deletions
  2. Once the folder action is fired, the AppleScript checks to ensure the file added/deleted is a PDF (ignoring any other issues in the directory)
  3. If the file added/deleted is a PDF, the AppleScript fires one of two PERL scripts (perl_dbAdd.pl or perl_dbDelete.pl), passing as well the added/deleted filename
  4. The correct PERL script attempts a connection to the MySQL database on my MySQL/Web server (still internal network) and creates or deletes (as appropriate) a record for the PDF file
  5. The PERL file quits itself, and nobody is the wiser on my PDF repository server

This system seems to be working well. One thing I’d like to check for is within my PERL files: ensure that the PDF file actually exists (or not) depending on the corresponding PERL action.

Finally, I think I’ll create a PHP file that will test each database record against the actual file structure – there’s 4159 PDF files recorded in the database, and I’d like to be sure the ActionScript/PERL combo is working as expected.

Welcome Home

Justine and I just returned from our fabulous trip to California.
San Luis Obispo, Santa Barbara, Pismo Beach (my fav!), and points beyond (oh ya, Justine just reminded me about Solvang).
We had a wonderful trip, and I’ll upload photos soon!bishops_peak