Category: Uncategorized

SSH authentication headache, solved

So yeah, fast forward since last post and the company that I took a job with was bought by Google… more about that in another post. For now, I wanted to share the solution to a problem I was having that I couldn’t find the answer to anywhere.

When I was setting up my new machine I was getting constant problems trying to ssh to our production servers. I had my ssh keys in the right directory, with the right permissions, but every time I tried to ssh to one of the machines It would prompt me for my password. When I turned on verbose logging I found this error:

PEM_read_PrivateKey failed

After regenerating keys and adding those to the server, countless reboots, we finally found out that my keys where not listed among those that the ssh-agent knew about (and the gui never popped up to prompt me to add them.) So the solution ended up being to use ssh-add to get the key into the list of known keys:

ssh-add .ssh/id_rsa

And viola, that solved it.

I’ve accepted a job offer

Last week I accepted a job offer from a start-up based in Philly and NYC called InviteMedia. They have built a platform for advertisers, ad networks and ad agencies to buy digital media advertising, and to manage campaigns.

They’re main office is in Philly and they have a second office in NYC. I’ll be spending a couple days a week in Philly to start, and then I’ll be in the NYC office full time, helping them build out that office.

I’ll be working with the user interface team on all parts of the platform that end users will see. I’m really excited about it. I’ve wanted to work for a small company for a while now, and I think this will be a great experience.

I had a couple other offers that I passed on, both before I had this offer. In each case there was a combination of issues with location, job role, technology and company size. The offer from InviteMedia seemed to fit the bill all of the ways that I was looking for.

So that’s it… I’m back in the north and here to stay for a while at least. I’ll be living with some family in Oceanside for a while and commuting into NYC on the LIRR.

There are some friends that I’ll miss in NC, but I’m glad to be back up north and to get a chance to reconnect with friends back here. It’s nice to be home 🙂

Don’t ever…

make me type a city and state in a form.

An address form from LinkedIn

An address form from LinkedIn

If you’re in the US (and I suppose this is true for any country with a robust postal code system) there is a unique mapping of postal code to city.

Writing a web service to turn the postal code into the city and state would be a triviality. I wrote one a few weeks ago just as a test.

There are free and pay lists of zip code -> city mappings which can be loaded in to a DB one one command, and the getting the data is a few lines of PHP. (yeah, I know this isn’t production code, its just a basic example)


while($row = mysql_fetch_array($result)){
    $xml_output .= "\t\n";
    $xml_output .= "\t\t" . $row['city'] . "\n";
    $xml_output .= "\t\t" . $row['state'] . "\n";
    $xml_output .= "\t\n";

echo $xml_output;


What I’ve been up to recently

I’ve put up some unintentionally cryptic tweets / facbook status updates, so I figured I’d update everyone on what I’m up to at the moment.

Between leaving IBM and now a whole lot has gone on. I’ve interviewed with about 10 companies and haven’t found the right fit yet. Because I’ve had relatively low expenses and a decent emergency fund / severance I’ve been taking my time to find something that I’m really passionate about.

Recently I decided that I wanted to give myself a kick to get out of North Carolina, so I made it happen. I put my place up on Craigslist and had quite a bit of interest, but nothing materialized right away. Then I got a note from a couple who were interested if another deal they had fell through. This is where things started to get kinetic.

They decided they wanted the place on Monday 29 June, and wanted to move in on Thursday 2 July. Back to Craigslist I turned and sold off most of my stuff. From Monday to Wednesday I got rid of most of the things in my house worth selling through Craigslist. The rest went to Goodwill (3 full carloads worth). Those of you who know me well will know how freeing a feeling it was to get rid of all that extra stuff.

I was so lucky to have my friend Jessica visiting to help out. She was a dynamo helping to get things packed up.

On Thursday the tenants showed up at noon. Between noon and 4pm Jessica and I packed the car, got the leases signed, did some last minute fix-ups on the house, took showers at the neighbors and drove up to Long Island.

I was also lucky to find time during this whirlwind to say goodbye to some of my good friends in NC. The whole move was much faster than I had hoped it would be, but I’m also not completely divorced from the area, so I’ll surely be back for visits. Some of you might ask what happened to the cats? They are hanging out with my excellent neighbor Christine, who will watch them while I’m sorting out my next move.

A few hours of playing with her kids later I turned up at my uncle’s in Oceanside, dropped off my stuff, drove upstate to see my aunt for her annual 4th of July party and then back down.

So now I’m here in Long Island. I’m hanging out just a 40 minute train ride to NYC so I can interview with companies there. I’m still considering options in California, but I figured that while I’m sorting out what’s next it’s best to be close to friends and family here in NY.

While I’m here I’ll be interviewing, spending time with friends and family, and hanging out on the beach and boardwalk at Long Beach. I forgot how lovely a place it is. If you’re in town and want to hang out, let me know!

Script v. Program

Here is how wikipedia describes a scripting language:

… “Scripts” are often treated as distinct from “programs”, which execute independently from any other application. At the same time they are distinct from the core code of the application, which is usually written in a different language, and by being accessible to the end-user they enable the behavior of the application to be adapted to the user’s needs. Scripts are often, but not always, interpreted from the source code or “semi-compiled” to bytecode which is interpreted, unlike the applications they are associated with, which are traditionally compiled to native machine code for the system on which they run. Scripting languages are nearly always embedded in the application with which they are associated.

They do go on to make a concession:

Historically, there was a clear distinction between “real” high speed programs written in languages such as C, and simple, slow scripts written in languages such as Bourne Shell or Awk. But as technology improved, the performance differences shrank and interpreted languages like Java, Lisp, Perl and Python emerged and gained in popularity to the point where they are considered general-purpose programming languages and not just languages that “drive” an interpreter.

I don’t like it. I think that this is one of those cases where language has evolved in a way that hasn’t been captured completely.

So tell me… when you hear (or use) the word ‘script’, what connotation comes along with it for you?

IE6, Sprites and Transparency (a follow on)

Long story short, IE 6 is a nightmare. Slightly longer story. If you want to use a sprite technique to reduce the number of roundtrips the browser makes to generate your page, it’s fairly straight forward… unless you use IE6.

If you’re making large sprites, with varied images that might be transparent, you might get away with using an 8 bit gif or png, but depending on how many colors the individual images contain you could easily fill up your color table. So, you’d be best off using all 32 bits of the RGBA PNG.

That works fine on IE7, FF2 and FF3. But we all know that way too many people still use IE6. There are some hacks to get transparent pngs to show up, but they don’t work for images in the background which is, of course, what you need for sprites.

In the midst of my preperations for hari-kari, I found this post on Julien Lecomte’s blog. It was a great step in the right direction, so I started hacking and got some stuff working. Here are some things that weren’t in Julien’s post worth sharing…

A simple example. Here is the markup that Julien showed, with an additional wrapper. Note one other difference, the clip:rect(...) statement doesn’t use commas between the dimensions. (More on this later)

Before you try this, you should read how to arrange the dimensions in the clip:rect(...) statement. It’s not terribly intuitive.

Here is the corresponding CSS. We use the filter hack to get the transparency to show, and we style the wrapper.

A couple of notes. We position the wrapper relative so that it flows naturally in the layout, but also acts as the reference coordinate system for the span inside (which has been positioned absolutely). If we didn’t do this, the inner span would be positioned with reference to the first positioned parent element. If there were none, the browser frame would become the reference.

We’ve also set the overflow to hidden. Since this hack just clips out the part of the sprite image that we want to see, IE6 still considers it as occupying part of the page. If you don’t hide the overflow, and your sprite strip is longer than the page, you’ll see scroll bars.

So what about those commas in the clip:rect(...) statement? Well thank the flying spaghetti monster for Google. I played with this code isolation, got it working, then brought it over to a page I that I was going to use it in and FAIL. After some hunting and reading on google I found out that when you set your browser’s compliance mode, e.g.

IE6 has a cow and doesn’t like the way your clip:rect(...) statement is formed with commas. The only solution is to get rid of the DOCTYPE statement, or get rid of the commas in the clip:rect(...) statement. I’ve also noticed some funky treatment of how this final sprite image get’s floated by IE6 when the compliance mode is set. More on that some other time when I can take a proper look at it. For now I’m just really glad to have this (mostly) sorted out.

The tip of the long tail

I just got this in the mail…


When I was a kid, I remember going into one of those giant “Hudson News” stores in Manhattan – the one with thousands of magazines. I thought to myself “wow! There is a magazine for EVERYTHING!”.

Of course, the web opens up the space even more so that there is a site for EVERYTHING. (I like exotic soaps, so a year ago I thought about starting a site all about soap. I was a bit too late)

So I’m not surprised that this email landed in my inbox. There is an entire group on flickr, with over 1,000 photos, that are just of toe socks. (Those socks that have little pockets for each toe).

Who could have known that there was a community of people that reveled in the glory of the toe sock? No one perhaps 🙂 But all they seemed to need to congregate was a space, and it looks like flickr has provided that space for them.

I <3 the web.

IBM GLBT Event in Second Life

The IBM GLBT group (Eagle at IBM) had our first event in the new dedicated Second Life space. It was a great time seeing some new people turn up, and exploring all of ThomThom’s creative building. We had some conversation in the clubhouse lobby:

Eagle in Second Life

Then we did a little dancing at the disco. (I played DJ for a bit – thats me with the blue spiky hair)

Eagle in Second Life