Skip to content

Instantly share code, notes, and snippets.

View rsiddle's full-sized avatar

Ryan Siddle rsiddle

View GitHub Profile
@masonforest
masonforest / gist:4048732
Created November 9, 2012 22:28
Installing a Gem on Heroku from a Private GitHub Repo

Installing a Gem on Heroku from a Private GitHub Repo

Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.

Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.

  1. Get an OAuth Token from GitHub

First you will need to get an OAuth Token from GitHub using your own username and "note"

@andflett
andflett / cartography.rb
Created June 23, 2012 00:52
Convert OSGB36 Eastings/Northings Coords to WGS84 Latitude/Longitude
module Cartography
extend self
# Takes OSGB36 Easting/Northing coords
# and returns WGS84 Latitude and Longitude
def en_to_ll(easting, northing)
@OSGB36_ll = to_OSGB36(easting, northing)
to_WGS84(@OSGB36_ll[:latitude], @OSGB36_ll[:longitude])
end