Skip to content

Instantly share code, notes, and snippets.

View delano's full-sized avatar

Delano delano

View GitHub Profile
s1 = {:host=>'foo', :user => 'foobar'}
s2 = {:host=>'bar', :user => 'foobar'}
s3 = {:host=>'baz', :user => 'foobar'}
s4 = {:host=>'moo', :user => 'foobar', :options => {:password => 'barfoo'}}
def gate(s, s2, opts={})
gw = Net::SSH::Gateway.new(s[:host], s[:user], {:port => 22}.merge(opts))
gw_port = gw.open(s2[:host], s2[:port])
yield(gw_port)
ensure

(This is the text of the keynote I gave at Startup Riot 2009. Will update when video becomes available.)

Hi everyone, I’m Chris Wanstrath, and I’m one of the co-founders of GitHub.

GitHub, if you haven’t heard of it, has been described as “Facebook for developers.” Which is great when talking about GitHub as a website, but not so great when describing GitHub as a business. In fact, I think we’re the polar opposite of Facebook as a business: we’re small, never took investment, and actually make money. Some have even called us successful.

Which I’ve always wondered about. Success is very vague, right? Probably even relative. How do you define it?

After thinking for a while I came up with two criteria. The first is profitability. We employ four people full time, one person part time, have thousands of paying customers, and are still growing. In fact, our rate of growth is increasing – which means January was our best month so far, and February is looking pretty damn good.

require 'uri'
require 'benchmark'
require 'net/http'
require 'rubygems'
require 'eventmachine'
require 'dnsruby'
# github.com/careo/em-http-request/
Sec total new wait
1 50 50 0 +
2 100 50 50 |+
3 150 50 100 ||+
4 200 50 150 |||+
5 250 100 150 +|||+
6 300 100 200 |+|||+
7 350 100 250 ||+|||+
8 400 100 300 |||+|||+
9 450 150 300 +|||+|||+
# uri_params
#
# Turn URI parameters like uri[0], uri[1]... into an array of values
# and ones like account[id], account[name]... into a hash
# This needs to be called inside of a "post" or "get" command. It doesn't work when placed inside the "before" (?)
def uri_params_fix!
p = params
p.each_pair do |key_with_index, value|
# where args is a hash of URI parameters
def initialize(args = {})
unless args.empty?
# I want to avoid doing this
#self.title = args[:title]
#self.uri = args[:uri]
# and check the parameters names dynamically
args.each do |n,v|
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-validations'
require 'dm-timestamps'
require 'syntaxi'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/toopaste.sqlite3")
@delano
delano / gist:180
Created July 21, 2008 20:45 — forked from dfischer/gist:170
undefined
This is so fucking awesome!