<%= NewRelic::Agent.browser_timing_header rescue "" %>

David van Geest

Software, Life, and Stuff I Couldn't Find on the Internet

Reviewing your GitHub SSH key

| Comments

Those of you living in a cave may not have heard that someone recently hacked GitHub to prove a point about default Rails mass-assignment settings. You can read all the gory details here and here.

At any rate, GitHub sent an email notifying everyone that they are performing an SSH key audit, and included a link to the audit page.

The page shows the SSH key’s fingerprint, but neglects to explain what it is or how to check the fingerprint on your own system. Here’s what you need to do:

  • Locate your public SSH key, it’s likely at ~/.ssh/id_rsa.pub
  • Run this command (or similar, depending on your system) to get the key fingerprint, replacing id_rsa.pub with the location of your public key:
1
 ssh-keygen -lf id_rsa.pub
  • If the printed key fingerprint matches the fingerprint on GitHub, you’re good! If not… follow their instructions and hope for the best :-P.

New city, new site!

| Comments

So Jo and I moved to Toronto at the beginning of December, and things are going swimmingly. I’m still working for Spindance, but now from the comfort of our home study.

Once things settled down a little, I got to work revamping davidvg.com. Astute readers might note that I did the same thing last year, moving from 60cycleCMS to Typo, and ask why I’m changing it up again.

One of the bigger problems was trying to host a full-blown Rails site on Dreamhost. I like Dreamhost for the most part, but they’re really not set up for Rails sites. I sporadically had random application crashes, and the site was really slow at times. Installing the right gems was downright painful, although I imagine using Bundler would mitigate that considerably (I haven’t actually tried it). What I really wanted to do was move davidvg.com to Heroku. I had previously moved pvanreenen.com there (as well as porting it from PHP to Sinatra), and it was a very pleasent experience.

Typo is good, but it was really starting to bug me. It’s weighed down by a lot of legacy code (although they’re working on that), and I kept finding bugs that seemed to be un-squashable because of the huge and complex codebase. There were some missing or non-functional features too, like decent syntax highlighting and a comments system that played well with others. That said, I was using an older version, and I’m sure the newer versions are a lot better, but the thought of trying to upgrade Typo and merge my changes was making me ill.

A little bit of Googling revealed Octopress. It’s a static site generator based on Jekyll that uses a lot of my favourite tools, like Ruby and Sinatra. It had all the features I wanted, it was dead-easy to use, and it’s a great fit for Heroku. I was hooked pretty quickly.

So, welcome to the new Heroku-hosted, Octopress-baked version of davidvg.com. Do let me know if you see any rough edges!

Converting a Git repo to SVN

| Comments

I know, usually people go the other way. This is a bit of special case though: a contractor had a project in git which we needed to import on our SVN server. The contractor was only able to provide a zip of his repo, for various reasons. This seems to preclude the widely used method detailed here. I’m not enough of a git wizard to modify that for our specific situation.

Ironically enough, Mercurial provided the easiest solution.

Install Mercurial and a python subversion lib if you haven’t already (I’m using Ubuntu, adjust as necessary):

1
sudo apt-get install mercurial python-subversion

Configure Mercurial to use the ConvertExtension. Add this to ~/.hgrc:

1
2
[extensions]
hgext.convert=

Use Mercurial to covert from git to svn:

1
hg convert --dest-type svn path/to/git/repo path/to/new/svn/repo

Now you should have a directory with a full SVN repo, complete with commit history.
Note that the commit times will not be correct.

If needed, you can move your new SVN repo to another server using the excellent instructions here.