Automatically sending changed files from BBEdit over SCP

If you use BBEdit on a local copy of code that you want to send to a remote server upon saving, here’s one way to do that:

  1. Create a file bbedit_docsave.scpt somewhere with the following contents:
    on documentDidSave(doc)
    set p to file of doc
    do shell script  "/Users/you/bin/ '" & p & "'"
    end documentDidSave

    and compile it with this command:

    osacompile -o Document.documentDidSave.scpt bbedit_docsave.scpt

  2. Create the directory ~/Library/Application Support/BBEdit/Attachment Scripts if it doesn’t exist.
  3. Move the compiled file Document.documentDidSave.scpt to the Attachment Scripts directory you just created (or that already existed).
  4. In /Users/you/bin (or somewhere else, but remember to adjust the path in the .scpt file above), create (and chmod 755) a file called with the following contents. Note the check for */projectname/* in the path. This is important, because BBEdit will trigger the script for all files you’ll ever edit, and you don’t want to copy all files to your remote server. Pick any marker in the file’s path that indicates it’s part of a project that you want to send to your remote server:
    # Change colons to slashes in path:
    p=`echo $1 | tr ":" "/"`
    # Check whether this is a file you want to copy
    if [[ $p == */projectname/* ]]; then
         # tweak this to match your path and server
         cmd=`echo "$p" | sed 's;^.*/projectname/\(.*\)$;scp /Users/you/devhome/projectname/\1 you@server\:~/you/projectname/\1;'`

That’s it.  This will require tweaking to match your situation.  Works in BBEdit 10.x, I haven’t tested with others version.

Why I love Softpro Books in Denver

I want to give a copy of Revolution in the Valley as a gift to a bright young programmer and Apple fan that I meet with a couple of times a month.  I love reading stories about the chaotic founding days of world-changing companies or products, and I think he would too.  But it turns out the book is out of print.  Softpro Books to the rescue:

Found a copy at O’Reilly’s offices in Sebastopol. I should have it in a few days for you.

Wow.  You just don’t get that kind of service anywhere but a local retailer.  Softpro is one of the last remaining retail computer bookstores in the country, and it’s a gem.

Worldwide WordPress 5K

Today is the official day for the Automattic Worldwide WordPress 5K.  Think distributed run for a distributed company, and everyone is welcome to join.  One of my favorite entries is from fellow Automattician Karim Osman, who did a 5K dance.

I ran my WWWP5K yesterday, it happened to be race day at CMRA.  The Bluffs Run 5K is a beautifully scenic course with a 10% average grade and total elevation change of 750 feet.  The elevation profile even has a W in it:

I finished in just under 24 minutes, not terrible for an old guy on a hilly course — the winning time was a blazing 17:50!  Most of all, a run is a great way to start the weekend, and it was especially fun running in spirit with everyone else joining in WWWP5K.

If you haven’t run (or danced) your WWWP5K yet, get outside, or on a treadmill, bike, dance floor, pool, whatever — and join the fun.

Minimal Running Shoes

This is my story of becoming the Imelda Marcos of minimal running shoes.  I’ve been running for about a dozen years, mostly in Adidas Supernovas:

Conventional running shoe (Adidas Supernova)

Over the last few years, I started to have increasing pain in my knees during and after a run.  More and more often, I’d have to skip a day until my knees felt well enough to run again.  Then, last summer, I was lucky enough to participate in a fantastic running seminar here in Denver, just at a time when my knee pain was getting so bad that I was ready to give up running.  Karen and Peter at Running Well helped me fix my form and my knee pain has completely disappeared.  Before, I was running upright, over-striding, and slamming my heel down with every step.  Now I’m better at leaning forward a little (without bending at the waist), lifting my legs from my hips, landing under my hips and pushing off.  I’m faster, and running is fun again!

My bulky, cushioned running shoes were not only not alleviating my knee pain, they were probably causing it by encouraging me to run with poor form.  For more information on why most running shoes are evil, and for a damn good adventure story about running, read Christopher McDougall’s Born to Run. Human feet are supremely engineered machines that are made to touch the earth as we run.  25% of our bones are in our feet.  If you’ve ever run barefoot, you know that your feet actually reach out and feel for the ground as they are landing.  That feedback from the ground helps your feet, ankles, knees, legs and the rest of your body adjust to changing surfaces, slopes and speeds, and prevent injury.

As running shoes have become more and more cushioned over the last few decades, our feet have literally lost touch with the ground.  Having half an inch of rubber under your feet makes them lazy and interrupts the feedback from the ground to your feet and to the rest of your body.  Your running form deteriorates and you create impacts on your body that it wasn’t designed for.  That’s the gist of the barefoot and minimal running movements.

New Balance MT101 Minimal Trail Running Shoe

I went shopping for “minimal” running shoes, ones that wouldn’t have too much cushioning, so my feet could commune with the ground.  Minimal means different things to different people, but in general shoes that don’t have much of a toe-to-heel rise (2-3% at most) and don’t have excessive padding in the sole are considered minimal.  I tried a few different shoes (the nice people at Boulder Running Company — all of seem to be runners — let you run around in the parking lot before you buy) and I ended up with New Balance MT101’s: which are super light trail running shoes (I run on gravel, trails, asphalt and some concrete paths in them).  I love these shoes.  They’re very light, they’re thin enough to feel the ground, they have almost no toe-to-heel rise, and the rock plate in the sole keeps my feet from being impaled on sharp rocks.

The only time I don’t like these shoes is when I run on concrete.  The almost complete lack of padding means I can feel the shock through my whole body.  Most likely, I need to tune my form further for lighter landings.  As an aside, there’s a useful exercise you can do to see how much you’re bouncing around: rather than looking at the ground about 8-10 ft in front of you, look at a tree or building ahead of you and see how much it bounces up and down in relation to the horizon.  If you’re running light and easy, it shouldn’t bounce very much at all.

So I went shopping for light, neutral shoes with a little more padding, for concrete and races on asphalt.  Neutral shoes have a very low (or no) profile, no rise from toe to heel — your foot is level in a neutral shoe, just as it is on the ground.  Neutral shoes aren’t necessarily minimal, but minimal shoes are often neutral or low-profile.  I ended with a pair of Newton Distance Racers, which have the extra geek bonus of having Sir Isaac on the insole:

Newton Distancia=Distance Men's Neutral Racer

I was very excited to have a shoe that was neutral, light and still provided some padding for running on concrete.  On some test runs, I felt like I was running softer on concrete, there was less pounding, but the horizon test proved that I was actually bouncing more.  After a couple of test runs, however, I felt like I was losing my form again.  Neutral they may be, but perhaps my Newtons are too cushy?  I’m still trying to figure that one out, I’ll try them a few more times on concrete, but I was disappointed that they were not a panacea.  And it was always possible that my form just wasn’t good enough yet, that I hadn’t completely reverted to running how we were meant to run before running shoes were invented.  So I dug out my Vibram FiveFingers, which I’d bought a few months ago but never used for more than walking:

Vibram FiveFingers Bikila

Vibram recommends getting used to the FiveFingers slowly, but I took them for a 3-mile run.  It was wonderful to feel the gravel and dirt paths under my feet, like a foot massage.  My calves were a little sore, because the FiveFingers are completely neutral, no heel at all, but I’m sure I’ll get used to them.  I wish you could buy a pair of FiveFingers in two different sizes, the right one is a little too snug across the top of my foot.  I now have my eye on the Bikila LS, which has “a closed speed lace system to accommodate a wider foot or higher instep”:

Vibram FiveFingers Bikila LS

My favorites are still the MT101’s, but I’m going to give the Newtons another chance and if I get some Bikila LS’es I’ll update this post with my findings.

Happy Running, and remember .. don’t spoil your feet, they’ll hate you for it.

UPDATE (July 2011):

I’ve started running in the New Balance MT10 Minimus Trail shoes:

New Balance Minimus Trail (MT10) Running Shoe
New Balance Minimus Trail (MT10)

This shoe has a Vibram sole, but no rock plate.  The shoe is super light and comfortable, and gives you almost the same feel of the ground as the FiveFingers, but occasionally you really notice the absence of the rock plate, ouch.

The Parking Lot Movie

Through the magic of Netflix I came across this amazing documentary last weekend.  The Parking Lot Movie is a 79-minute meditation on capitalism, sociology, management, class war, and of course, cars.

The Corner Parking Lot in Charlottesville, VA, is staffed by unlikely attendants — graduate students in philosophy and theology, for example — which gives them and this movie a wonderfully entertaining lens through wjich to watch the collision of low-paying service sector jobs, higher education and spoiled undergrads who park their parents’ BMWs in the lot and try to skirt a $0.40 parking charge.

As a bonus gem, there are some songs by parking lot attendant, bluesy folksinger and UVA law student Mark Schottinger:

Update: Smitten by these songs, I emailed Mark Schottinger to find out if more of his music is available somewhere:

  1. The Parking Lot Movie Soundtrack has the two songs from the film, but unfortunately not the full version of Hellbound (iTunes)
  2. Three songs on Dawn of Man Productions.
  3. There’s an album on Bandcamp — my opinion, this one doesn’t sound as good as the other stuff.
  4. YouTube, search for Mark Schottinger (also see YouTube video above).

What a Year

I relish the chance to reflect on an ending year, but the past few months have been insanely busy.  So without further ado, while it’s still January, here is my 2010 in a sentence: I left AOL, gave up coffee, took a trip around the world with my family, Germany nearly almost won the World Cup, I dropped my son off for his freshman year at college, and started a new job.  And that’s just  June-September, I’m not really sure what happened in the first half of the year, and the last few months are a blur.  The trip was, of course, the best part.  Here are some photos of Siegburg, Venice, Padua, Delhi, Agra, Ko Samui, Bangkok, and Hong Kong:

This slideshow requires JavaScript.