Skip to content

Instantly share code, notes, and snippets.


Ryan Morrison~Westphal ryanttb

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ryanttb on github.
  • I am ryanttb ( on keybase.
  • I have a public key ASCRNQ4JXIt3D6GbMUtFuaaQENLVbpYSZrIsHkIbMmj2pwo

To claim this, I am signing this object:

ryanttb /
Last active Dec 4, 2019
Install node on Linux Subsystem for Windows
# this script requires root
# be sure to run the following before running this:
# $ sudo su
# since there's an issue piping the curl response to bash
# just download the install script
curl -sL >
ryanttb / thread_gc.rb
Last active Aug 29, 2015
Using Thread to help ruby garbage collection
View thread_gc.rb
# GC.start does not help here, the heap keeps growing
class Foo < ActiveRecord::Base
def self.process_all!
all.each { |record|
puts "Processing #{ }"
ryanttb / gist:975364
Created May 16, 2011
Google geocode => OpenLayers Map.setCenter
View gist:975364
function toWebMercator(googLatLng) {
// you'll have to put your conversion code here (not included in this gist)
return { x: googLatLng.lng(), y: };
geocoder.geocode({ address: "somewhere" }, function (result, status) {
if (status == google.maps.GeocoderStatus.OK && result.length > 0) {
first = result[0],