Skip to content

Instantly share code, notes, and snippets.

Mike Stenhouse mikesten

Block or report user

Report or block mikesten

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mondo.rb
require 'faraday'
require 'launchy'
conn = Faraday.new(url: 'https://www.crowdcube.com') do |faraday|
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
faraday.options.timeout = 5
faraday.options.open_timeout = 2
end
success = false
@mikesten
mikesten / simple-app.rb
Created May 30, 2012
A Sinatra app at its simplest. Run it with "ruby simple-app.rb"
View simple-app.rb
require "rubygems"
require "sinatra"
get "/hi" do
"Hello World!"
end
@mikesten
mikesten / build.json
Created Apr 23, 2012
Combining Javascript files seems to prepend a / to the include
View build.json
{
"source": "src",
"ext": "ext",
"output": "lib"
}
@mikesten
mikesten / gist:775566
Created Jan 12, 2011
brew install postgresql failing with no available formula for ossp-uuid
View gist:775566
I'm trying to "brew install postgresql" but it's failing with "No available formula for ossp-uuid". A bit of poking though and there does seem to be a ossp-uuid formula. See the terminal output below:
~: brew doctor
Your OS X is ripe for brewing.
Any troubles you may be experiencing are likely purely psychosomatic.
~: brew update
From http://github.com/mxcl/homebrew
* branch master -> FETCH_HEAD
Already up-to-date.
View gist:490614
/projects/boston/footage/11e98991-c53a-4eda-945b-069513eb80f1/view/54d2c99d441141ca00de18fe393f7bc6.mp4
/projects/boston/footage/9aa95066-f485-4ac0-80ab-3f0512710f5a/view/98d47b00b56c4b8831a2d9fd296aad2f.mp4
/projects/boston/footage/c0ecbd9e-af95-4275-8188-18088a2e352c/view/73f45643599d27bd681f45a929f3ae05.mp4
/projects/boston/footage/44eea69b-5bf4-4853-be99-adace1c47a3d/view/b2cba30e2f54a31bf417bdca62edfefb.mp4
/projects/boston/footage/8d39ae02-8ab6-45a3-b7bd-8869a22da665/view/de37d88b85641a796e496d22df9deeb9.mp4
/projects/boston/footage/49e2a08b-2540-4d07-92a0-69e7f2867695/view/98de2cd375b04c5ce545681cfcf66de7.mp4
/projects/boston/footage/a2c3f46b-aea4-4af5-9b8c-0b759da4023e/view/dd7fd6e314b84d9842937ab27635f563.mp4
127.0.0.1 - - [26/Jul/2010 15:31:12] "GET /projects/boston/footage HTTP/1.1" 200 13276 0.3615
127.0.0.1 - - [26/Jul/2010 15:31:12] "GET /projects/boston/footage HTTP/1.1" 200 13276 0.3623
Connection went away (#<Bunny::ConnectionError: No connection to server>). Reconnecting
View app.rb
require "rubygems"
gem "sinatra", "=1.0"
require "sinatra/base"
class App < Sinatra::Base
get "/direct" do
params.inspect
end
end
View gist:246303
~/Projects/allin-see [master] : git push heroku master
Counting objects: 198, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (84/84), done.
Writing objects: 100% (198/198), 78.22 KiB, done.
Total 198 (delta 118), reused 186 (delta 110)
-----> Heroku receiving push
-----> Skipping rest-client 1.0.3 - this gem is installed by default on Heroku
You can’t perform that action at this time.