Archive for the ‘hacks’ Category

DIY headset locker for Rock Shox Pike

Tuesday, 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.

Follow my TiVo on Twitter

Tuesday, 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.

TwitPic upload hack

Tuesday, 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.

Hate the iGoogle left-side navigation?

Friday, December 12th, 2008

Hate that it takes up screen real estate for no reason? Find Gmail canvas view as unusable as I do?

Check out all that unused grey space:
igoogle
The last straw for me today was to discover that they put chat in the navigation bar, and it was impossible to turn off. I found a groups forum thread where I could actually register my discontent, and found this little gem:

http://www.google.com/ig?hl=all

Add that “?hl=all” to the end of the URL, and hooray! Tabs on top again!

Some things you do just because you can

Friday, October 24th, 2008

Need another Sonos controller?

Hack together openlink, perl, sonosweb and iphone sonos:

I had to go through Perl dependency hell (Perl really is an abomination) to get sonosweb working on the linkstation, but it works pretty well now.

Throw in a little DD-WRT and ssh and you can really mess with your S.O. by changing the music at home from the office.

Now I need to write up how I got through the seven circles of dependency hell before I forget. It took more than a quarter to Charon.