Jason’s musings

I just need a little time


leave a comment »

Because there weren’t already lyrics for So F’ing Pimp:

I’m so Pimp it should be a crime
My site’s been slashdotted four seperate times
I can factor numbers into their constituent primes
Oh, and did I mention that I spit the dopest rhymes

My cotton sheets are three hundred thread count
I got overdraft protection on my checking account
I got dual flat panel nineteen inch screens
I got slim flit boot cut Levi jeans
I can solve a rubicks cube in ninety seconds flat
I know all the fatalities in mortal combat
I scored a fifteen ninety on the SATs
I got a masters degree from MIT
I got Office season three on DVD
And that’s why I’m a motherfucking P-I-M-P

[I'm pimp... So pimp...]

I code in Java, Lisp, C and Perl
One time I swear I even saw a naked girl
I wear boxer briefs from Fruit of the Loom
There’s a foosball table in my living room

I’m top of the line, first in the class
Leader of the pack, number one brass
It’s platonic truth, I’m like an ideal gas
Pretty as a picture and smooth as glass

I’m fast as lightning, strong as an ox
Fit as a fiddle and sly as a fox
Cool as a cucumber, in fact I’m ice cold
I’m fine as wine, I’m good as gold
I’m the best there is son, second to none
Cream of the crop, can’t be outdone

I’m sharp as a tack, bright as the sun
I’m sweeter than sugar, and twice as fun
I’m tough as nails, hard as a rock
Tip of the top, the cock of the wok

You know I’m honest as the day is long
And I’m so fucking pimp I had to write this song

[I'm pimp... So pimp...]

My HMO’s co pay is only ten bucks
My motherboard’s a sus-p-five deluxe
I got a quad band walkman phone
And you know I got a badass ringtone

I’m the head honcho, the daddy mack
I’m the numero uno, the leader of the pack
I’m the big kahuna, the top of the stack
Yo, if this were France, I’d be Jacques Chirac

If I were a perfume, I would be Chanel
If i were a prize, I would be the Nobel
If I were a hotel, I would be the Plaza
If I were an espresso, I would be Lavazza
If I were a number, I would be complex
If I were a watch, I would be Rolex
If I were Greek, they would call me Zeus
If I were a vodka, I would be grey goose
If I were a primate, I would be a chimp
Which is just a way of saying that I’m so fucking pimp

[I'm pimp... So pimp...]

Were I a play mode, I would be shuffle
Were I a fungus, I would be a truffle
A composer? I would be Bach
A bag? I’d be a Ziploc

Written by jasonmc

November 20, 2008 at 2:41 pm

Posted in nerdcore

Tagged with

Really achieving your childhood dreams

with 2 comments

The “Last Lecture” by Randy Pausch. A CS professor fighting pancreatic cancer.

Written by jasonmc

May 14, 2008 at 11:13 am

Posted in Uncategorized

Tagged with ,

SSH magic

with 4 comments

I’m currently bedridden at home from a nasty dose of the flu and therefore have to use ssh to connect to my machine in the lab.

This machine is behind a firewall however, requiring the use of an intermediary SSH server. So typically you’d do:


While this can be satisfactory enough for most uses, it doesn’t make copying files any easier, and my usual course of action was to copy the file to the gateway machine and then copy it from there to my laptop.

Today I got a little tired of that and decided to fix it.

This exerpt from “SSH: The definitive guide” proposes that you either use a remote authorized_hosts file command from the gateway to connect to the destination or to create a manual tunnel like so:
# ~/.ssh/config on client C
host S
hostname localhost
port 2001

# Execute on client C
$ ssh -L2001:S:22 G

# Execute on client C in a different shell
$ ssh S

This works well enough, but annoying that it required the manual creation of the tunnel. As for the authorized_hosts command method, it would require creating a new key for the client to use to make each connection to the gateway in order for the gateway to know which machine to connect to. (Doesn’t matter if you don’t understand what I mean) – Too much effort.

Instead I started thinking about using ssh_config to create the tunnel automatically before the connection:


hostname GATEWAY
LocalForward 2002 DESTINATION:22
PermitLocalCommand yes
LocalCommand ssh -p 2002 localhost

However, this didn’t work, and I didn’t figure out why it couldn’t get past the key exchange.

Another solution I considered was to use something called ProxyCommand, which I already use to connect to machines using HTTPS and SOCKS proxies. So I wrote a script that will make an ssh tunnel through the gateway and connect to the remote machine using the handy ‘nc’ utility.


ProxyCommand ~/bin/sc 2002 %h %p [GATEWAY]


#$1 == local port $2 == far away host $3 == far away host port $4 == gateway host
ssh -oControlPath=~/.$2$4 -f -N -L$1:$2:$3 $4
nc localhost $1

This will always use the same tunnel to forward a connection to the ssh server on the destination machine, saving resources. There was however the issue that ssh would constantly try to create the tunnel at each invocation, and the ControlPath was a neat solution to avoid that (if there is already exists a tunnel it silently does nothing). The only problem with this technique is that I couldn’t come up with a good way to garbage collect the unused tunnels. Perhaps a file locking based technique, using a counter (similar to reference counting) would work well. But it would be a much bigger project than I wanted.

I realised that using nc on the gateway machine would also work:


ProxyCommand ssh [GATEWAY] nc %h %p

However this unsatisfactorily left nc processes running on the gateway machine, probably due to unimplemented shutdown message handling in some part of the network stack.

Both of these solutions were nice that they allowed the client to connect directly to the ssh server on the destination, enabling the use of ssh keys, forwarded ports, and preventing man-in-the-middle attacks. However, the nc utility is not exactly meant to be used in a production setup. A proper solution to the whole problem would involve modifying the sourcecode of ssh, to allow specifying a gateway in some fashion.

Update: Looking at the  Git tips page I noticed that the following works:

Host *.foo.internal
     ProxyCommand ssh gateway.foo.com exec nc %h %p

I really should have realized that would work. This is the perfect solution.

Written by jasonmc

April 16, 2008 at 12:09 am

Posted in Computing

Tagged with

I was there

leave a comment »

I attended this great talk at the Computer History Museum in Mountain View, CA while I was in San Francisco in March.

Written by jasonmc

April 14, 2008 at 12:41 am

Posted in Computing

A notable find

with 4 comments

Today I came across the “famous” Reith Lectures (named after the first Director General of the BBC). If you were ignorant like me to their existance, they can be found at http://www.bbc.co.uk/radio4/reith/

BertrandOf considerable note is the collection of historic Reith lectures, and in particular the one by Bertrand Russell, where he talks about social cohesion and human nature: http://www.bbc.co.uk/radio4/reith/historic_audio/reith_historic.shtml

It certainly makes for good listening. Just a shame that they’re only available in RealCrap format.

Written by jasonmc

February 26, 2008 at 2:20 am

Posted in humanity

Tagged with

In memory

leave a comment »

Christopher Johnson McCandless

February 12, 1968 – August 18, 1992

Written by jasonmc

November 16, 2007 at 12:41 am

Posted in Uncategorized

Here I am

with 2 comments

europe trip map

Written by jasonmc

September 22, 2007 at 8:18 pm

Posted in Uncategorized


Get every new post delivered to your Inbox.