Access -> MySQL

October 23rd, 2009

Long, long ago I hacked together a Java app that imports the freedb CD info files from my local drive to an MS Access database. The CD ripper application I use creates a local freedb with a file for each CD I rip (all of them). So importing from that freedb to a database seemed a natural thing to do.

Access was all that I had access (heh) to, and it had a “music collection” database template, so with slight modification to the template that’s what I used.

Well now, I no longer have access (heh) to Access, Access is a PITA, and I already have MySQL available on my home server, so I figured it was time to finally migrate.

I found a handy application called Navicat (fully functional trial), that will import directly from the Access .MDB file to a MySQL database.

While Navicat mostly worked, I was not quite done. The import did not properly get the auto_increment attribute on the tables’ ‘id’ column. Also, the Access database tables had spaces in their names which is kind of a drag. Fortunately both were easily solved by exporting from MySQL to text using mysqldump, editing the .sql file that resulted, and then reimporting to MySQL from the .sql file.

Sure it’s a ridiculous thing nobody in their right mind will ever have to do, but I’m not in my right mind.

Crosier Mountain

October 17th, 2009

It’s a long way away, but we finally got up there to do this loop. Starting with about 5.5 miles climbing on the road, you then get another 5 miles or so of singletrack climb. This singletrack is minimally technical; just a good steady climb.

Once at the top, there are some beautiful views back into Rocky Mountain National Park from the top. A spur of trail (that we didn’t take) gets you to the true summit of Crosier.

Then it’s 4.5 miles of descent, some of it pretty sketchy and loose, but still pretty fun.

I’d do it again:

Flickr set:

O Canada

October 5th, 2009

ca-lgflag

In February, after my 3rd knee surgery since 2005, I had no plans or expectations for my riding this summer. And when all my friends made the commitment to a Whistler, BC trip in April, I just figured I was out. But as the summer got going, I was feeling pretty good, and riding pretty clean, and got the big encouragement from Steph, so I was in after all.

Scheduling difficulties meant that I would only get 3 days there instead of the 5 my friends would, but nevertheless, I was in.

We flew into Seattle, and rented a couple of cars there. Flights to Vancouver were 2 or more times the price. It means twice the driving, and add a border crossing, but we figured it was worth it to save a couple hundred each for 7 people.

The Whistler Bike Park is incredibly well managed, and loaded with great riding. There are ride-arounds for most of the big and committing features. I spent 2 days there, and 1 day riding Vancouver’s North Shore.

It was incredible riding. There’s a reason half the photos in bike magazines are from BC. I thought maybe this was a once in a lifetime trip, but now I sure hope it isn’t.

The bike park was amazing fun, but next time I want more North Shore. The incredible amount of work done there to build trails and mind-blowing stunts was astounding.

Friends of Tom from SoCal were there at the same time we were, and very very kindly showed us around the bike park, and especially the North Shore. They were very patient with our (meaning my) slow pace.

Lessons learned:

Park bikes are very heavy and don’t really pedal at all. They’re kind of inappropriate for my riding style on North Shore rides.
FlatlinePark-MD
So for me, park bike for park days, trail or all-mountain bike for the other stuff.

We had a condo, but the days were long and tiring, so we ate out all the time. Restaurants in Whistler are breathtakingly expensive. We could have hired a chef to cook for us in the condo and still come out ahead.
ADIP170602_T

There’s no good beer there. And it’s expensive. Buy in Bellingham, WA on your way in. (In fairness, we did receive this tip from others, but were too preoccupied with getting there.)
14-ImageResource

Body armor and full-face helmets get pretty sweaty and stinky. Since it’s somebody else’s stink, rented armor and rented full-face helmets are even worse. At least buy your own helmet.
bell_bellisticmatteblack_09_m

Allow extra time for the border crossing. Check the wait times.
250px-Peacearch-usside

Take lots of photos:

Day 1; Whistler Bike Park:

Day 2; More Whistler Bike Park

Day 3; Vancouver, North Shore:

Recent videos

July 16th, 2009

I have nothing really to say.

Vimeo works better than Google with the AVIs from my new camera.

The log bridges on Little Raven can be tricky:

little raven 1 from charlie wanek on Vimeo.

This video notwithstanding, Casey handled the LR/SSV ride with few problems:

casey – little raven from charlie wanek on Vimeo.

ssv 2 from charlie wanek on Vimeo.

south st. vrain 1 from charlie wanek on Vimeo.

kevin – ssv from charlie wanek on Vimeo.

tyler – ssv from charlie wanek on Vimeo.

The corkscrew at Keystone looks cool, and is scary at first, but is really more of a gimmick.

Keystone corkscrew from charlie wanek on Vimeo.

The VOIP experience

July 13th, 2009

I’ve been thinking about it literally for years, and I don’t know what finally made me do it, but I finally signed up for VOIP service. I chose Vonage, just because they seemed biggest, best known, and least likely to simply vanish overnight like Sunrocket did a couple years ago.

I’ve been pretty happy with my home network set up, particularly with DD-WRT providing lots of nifty stuff on my gateway router. So I didn’t want to screw with that by adding VOIP. Fortunately, while Vonage prefers the adapter between the cable modem and the router, they do support putting the phone adapter behind the router.

The shipping confirmation email from Vonage very helpfully included the MAC address of the VOIP adapter, so I was able to get my router configured way ahead of time.

I started by giving the adapter a static DHCP lease. This is trivial to set up in DD-WRT. Administration -> Services:
dhcp

I am not really doing any advanced firewalling on the router, so I didn’t have to do anything special for outgoing connections. But Vonage requires incoming ports 10000-20000 forwarded to the adapter. That is also trivial to set up in DD-WRT. Applications & Gaming -> Port Range Forwarding:
port range forwarding

With this setup, I plugged in the adapter and it just worked(tm).

The most important thing to me was 911 service. Vonage offers E911 in my neighborhood. I called up the regular police phone number and was told the only to test is to just dial 911. I don’t know if it’s this way everywhere, so you’d better not take my word for it.

It was actually sort of freaky to dial 911. You just immediately say “This is not an emergency, I’m testing my VOIP”. The emergency dispatcher’s system had already popped up with my name and address, just as promised by Vonage.

A POTS line works fine during a power outage, but what about VOIP? I have my cable modem, routers and voip adapter all on a UPS. Coincidentally, I was working at the house about a week earlier, when there was a power hit long enough to freak out my TiVo and other devices in the house. But my Comcast broadband stayed up through it, so I feel pretty good about my ability to use the phone during an outage. Again, I have no idea if this is common, so don’t come running to me if yours doesn’t work that way.

The last thing I was interested in testing was if I could get voice traffic prioritized on the WAN connection. DD-WRT has some handy Quality of Service settings, and there are a variety of pages out on teh interwebs with instructions for setting it up. In the end, I just took some conservative guesses, exempting the VOIP adapter from throttling and setting bittorrent to bulk. Applications & Gaming -> QoS:
qos

I then downloaded an Ubuntu ISO image, getting 200-300KBps down; a bit slower than normal, but for me, still a totally acceptable transfer rate. The voice quality was still good.

So everything looked good, but I was still interested in testing the quality and usability for a bit before committing to port our phone number from Qwest to Vonage. If you port at signup it’s free, but costs an extra $10 to do later, but I figured the testing was worth it.

I now have the cordless phone system on the VOIP, and put an answering machine on the old number’s line. So incoming calls are inconvenient, but outgoing calls would most often be over VOIP.

We lived with that for a couple days, and everything was just fine, so I kicked off the number porting process. The number port went right through, and it’s scheduled, but I have no idea why there’s a 10 day lead time for the switch even after all the approvals have gone through. I’m guessing that’s Qwest’s fault.

DIY headset locker for Rock Shox Pike

May 19th, 2009

This might work for other Rock Shox forks too…

My new Pike’s steerer tube has a cap in the bottom with a threaded hole the same size as a standard headset bolt (M6). Instead of pounding a star nut into the steerer, it’s exteremely easy use this cap as the bottom of a headset locker like the Azonic Headlock or USE Safe-T.

Required parts (in addition to headset, stem, spacers, etc.):
M6 threaded rod (shortest I could buy was 3 feet)
M6 coupler nut
Total cost about $5.

Insert the rod to measure the correct length. I threaded the rod through the bottom of the steerer tube until half an inch or so was protruding out the top of the tube. This took some time to thread the 10″ of rod through; I could have done an initial cut to an estimation of length to save myself some time, I suppose.
img_1182
img_1181

Add coupler nut, headset cap and original stem bolt. Thread the nut on the rod first, headset cap on original stem bolt, and then stem bolt into the coupler nut as well.
img_1183
img_1184

Tighten down the headset cap so there is no play or extra space in the steerer stack. Mark the point where the rod emerges from the bottom of the steerer tube. Take it all apart again, and cut the rod at the mark with a hacksaw.
img_1185
img_1186

Put it all together with the headset cap back on original bolt, coupler to original bolt, then threaded rod into coupler. You may want to use some removable threadlocker on the coupler to make it behave more like a single bolt when it’s in the steerer. Tighten the original stem bolt tightly into the coupler; it’ll butt up against the threaded rod.
img_1188
Drop the whole thing into the steerer tube, thread it into the bottom cap, then tighten the bolt to the torque specs of your headset.

More filler

February 24th, 2009

A dose of schadenfreude for your afternoon enjoyment:

Follow my TiVo on Twitter

February 24th, 2009

The other night my friend Bob mentioned somebody had set up a Twitter account for their TiVo. After thinking about it for a second I said something like “that’s almost trivial”.

Naturally I had to see if it really was trivial, which in fact it turned out to be. @mrbalkytivo is busier than I am.

Put tweetTivo.php someplace to be called by cron.

class_tivo_xml.php is not written by me and is required. Google it up. Figuring out how to get the XML info from the TiVo is left as an exercise for the reader.

The script will tweet about any new recording that starts, including TiVo suggestions, which are not always reflective of my taste, but then again, neither are many of MrsBalky’s choices. I thought about enhancing the script to skip suggestions, but grew bored and drifted away.

So long W

January 19th, 2009

Less than a day to go.

Don’t let the door hit you in the ass on the way out.

It may be that “history” will judge differently, but I’ll go out on a limb and say it now. Worst… President… Ever…

At last it’s time for the countdown to be retired:
ws-last-day

TwitPic upload hack

January 13th, 2009

Some Twitter users have been using TwitPic to link photos to tweets. I, on the other hand, have been using Flickr and Snipr. It’s a PITA, so I’m giving TwitPic a whirl. Sadly, Digsby, does not support TwitPic, and I’m not installing yet another app.

TwitPic has an API, so I rolled my own simple uploader with cygwin and curl. There’s no doubt in my mind that I’ve reinvented the wheel here…

Standard disclaimer applies: this is quick n’ dirty(tm):

#!/bin/bash

# curl executable.  I'm a PC.
CURL=C:/cygwin/bin/curl

# The upload script that will accept the data
UPLOAD_URL=http://twitpic.com/api/uploadAndPost

# Snag stuff off the command line
TWITTER_USER=$1
TWITTER_PW=$2
PHOTO=`cygpath -m "$3"`
TWEET_MSG=$4

# Prompt for message if it's not given
if [ "$TWEET_MSG" = "" ]; then
   read -p "Tweet msg: " TWEET_MSG
fi

# Go
echo Uploading...
$CURL \
  --form username=$TWITTER_USER \
  --form password=$TWITTER_PW \
  --form media=@"$PHOTO" \
  --form message="$TWEET_MSG" $UPLOAD_URL

# Wait for user to read result message
echo
read -p "Press <enter> to continue" bogus

Create a desktop shortcut with uid and password:

C:\cygwin\bin\sh.exe ~/twitpic.sh --userid-- --password--

Now just drag and drop the photo onto the desktop shortcut.