Compiled Ruby? Pretty sweet...

This has made life a lot easier.  I spent a decent part of the last week working on a ruby script for deploying our application on our test and development servers.  Ruby seemed a good choice for this -- especially since I could use rake inside of it -- essentially creating a custom rakefile with a slew of useful tasks.  The only problem is that you can't always expect to have root access to the box you're using (i.e. external deployments).  Not only that, it becomes a pain in the ass to set up and maintain all the ruby dependencies for 10 boxes even if you do. 

(i.e. for one box)
$ cd /etc/yum.repos.d
$ sudo wget http://dev.centos.org/centos/4/CentOS-Testing.repo
$ sudo vi CentOS-Testing.repo   # set enabled=1
$ sudo yum install -y ruby rake ruby-devel ruby-docs ruby-ri ruby-irb ruby-rdoc
$ wget http://rubyforge.org/frs/download.php/35283/rubygems-1.1.1.tgz
$ tar -zxvf rubygems-1.1.1.tgz
$ cd rubygems-1.1.1
$ sudo ruby setup.rb
$ sudo gem install archive-tar-minitar net-ssh net-sftp --include-dependencies
$ ./yourRubyScript.rb  # run the script finally!

So how do you get around dependencies and not having super user privileges? You compile the damn script to an executable!

... Or just about.  What really happens is you end up with a binary file that houses all the dependencies (stripped down to only what you need) within it so your ruby script can be executed as though they were all installed (prob. using ruby's eval() methods) locally. 

The script (or rather gem) I used for this (rubyscript2exe) was written by this guy Erik Veenstra (http://www.erikveen.dds.nl/index2.html).  Download the gem with a simple: gem install rubyscript2exe

What's more is you can create a single executable file from an entire archive by first using his tar2rubyscript beforehand (imagine compiling and entire rails app into a single executable file -- with dependencies and everything else housed within; pretty cool).

So, with his gem, I get away from having to depend on any of the setup listed below.  Instead I get to use ruby script/rakefile straight away ; )

$ ./yourRubyScript.rb  # run the script -- immediately!

Marshaling at the Burlingame Criterium: 6/29/08

Helped 3P and the Pen Velo team put on the Burlingame Crit this morning.  Showed up at 8:15 and marshaled until 10:30 -- saw an average of one crash per hour (and missed the first crash of the day that saw two teammates go down).  As fun as it is to see people race these things, I've got to be honest that I'm currently not missing it -- especially the crashes (one guy broke his collar bone -- and I don't even know about the crashes that happened after I took off).

Anyway, these are some photos I snapped as the riders flew around the 3rd to last turn -- they were cutting the corner very tight, coming within a foot of me.  Strangely, the pictures didn't blur with the speed (mid to high 20s at this spot) -- instead they became slightly distorted!

I'm working here!

I set my Win XP task bar to be minimized by default.  When I need to access it I can either mouse over the bottom stretch of my primary monitor, or more commonly, hit the Windows button on the keyboard ??? this seems much cleaner to me than always having it up.  The drawback is that if you are ever working with a maximized console window (i.e. putty or such) on your primary display, the damn task bar will pop up and hide the command prompt any time you get an instant message from someone.  This results in a game of: type at comm??? > fuck, an IM just popped up ??? can't see what I'm typing > click on IM window ??? task bar returns to hidden > start typing at command pro??? > FUCK!  FUCKING IM AGAIN??? >> ... >> etc etc etc.

 

(i.e.: Where's my damn command prompt??)

 

Here's what you do to fix this:

  1. Right click on your task bar
  2. Click on properties
  3. Uncheck "Keep the taskbar on top of other windows"
  4. Click Apply and Close

 

Voila! Now you can work in peace.  The one drawback to this is that your taskbar will no longer pop out if you mouse over the edge of the screen with another application maximized.  But that's fine -- using the Windows key to pop it up does this for you.

Abusive relationship

I just ordered these shoes from Zappos Sunday night.  I had hit up a couple of running shoe stores over the weekend with Sanny looking for something just like them (but perhaps a little less yellow) over the weekend.  Unfortunately, shoes like everything else are targeted at the masses and the masses think you should be running and landing on your heels (I promise you humans aren't meant to) -- so no, nothing worth buying was to be found.  I hit up zappos instead. 

They're not as light weight as my puma h streets of years yonder, but considering that I'm just re-entering the world of running, it's prob. best they aren't.  I can already assure you that my first 15 minute run in them will see me calmly exhaling even while my muslces strain to accomodate the freshly returned abusive father that is running -- yes, the week after my first run will be spent limping.

Zappos says I should have them in my hands no later than 3pm today -- I don't know how they do it.