Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Walker paulwalker

View GitHub Profile
@paulwalker
paulwalker / 2.1.1-railsexpress.sh
Created May 7, 2014
ruby-build definition for 2.1.1-railsexpress
View 2.1.1-railsexpress.sh
build_package_reconfigure() {
test -f configure || autoconf
}
build_package_patch_ruby_railsexpress() {
fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master
patch -p1 < rvm-patchsets/patches/ruby/2.1.1/railsexpress/01-zero-broken-tests.patch
patch -p1 < rvm-patchsets/patches/ruby/2.1.1/railsexpress/02-improve-gc-stats.patch
patch -p1 < rvm-patchsets/patches/ruby/2.1.1/railsexpress/03-display-more-detailed-stack-trace.patch
View mavericks_setup.sh
## OSX Mavericks - Setting up The Killer Dev Env
## System Preferences
# Track : Tap to click
# Keyboard : Key Repeat -> Fast, Delay Until Repeat -> Short
# Dock : Remove all the doc items you can and your just left with the Finder and Trash
## Git and Developer Tools
git # follow onscreen instructions
View gist:6542358
{
"application_id": "88ZfDrKNIok6CILSOe9U95Q",
"src": {
"name": "s3",
"bucket": "yapert-stage-secure",
"key": "uploads/1160/B581C43A-572A-44E8-853A-2F0BB72FF689_1378914968.jpeg"
},
"postback_url": "http://stage-api.yapert.com:3000/api/v1/assets/007736130c976d105fab92dc89f90263/blitline/callback",
"functions": [
{
View mongo_tailable_cursor_fail_after_insert
require 'rubygems'
require 'mongo'
include Mongo
@client = MongoClient.new('localhost', 27017)
@db = @client['tail-db-failure']
@coll = @db.create_collection('foo', :capped => true, :size => 1024, :max => 1)
@paulwalker
paulwalker / gist:1098192
Created Jul 21, 2011
oauth2 => facebook example
View gist:1098192
require 'rubygems'; require 'spec/helper'; Faraday.default_adapter = :net_http
args = { :site => 'https://graph.facebook.com', :token_url => '/oauth/access_token', :ssl => { :verify => false } }
client = OAuth2::Client.new('155938287786939', '7e3f065e969f7c499bcda855b98e0989', args)
redirect_uri = 'https://github.com/paulwalker/oauth2/'
client.auth_code.authorize_url(:redirect_uri => redirect_uri)
# https://graph.facebook.com/oauth/authorize?response_type=code&client_id=155938287786939&redirect_uri=https%3A%2F%2Fgithub.com%2Fpaulwalker%2Foauth2%2F
# navigate to domain in browser and then put code value in
@paulwalker
paulwalker / gist:1097994
Created Jul 21, 2011
oauth2 => github example
View gist:1097994
require 'rubygems'; require 'spec/helper'; Faraday.default_adapter = :net_http
args = { :site => 'https://api.github.com', :authorize_url => 'https://github.com/login/oauth/authorize', :token_url => 'https://github.com/login/oauth/access_token', :ssl => { :verify => false } }
client = OAuth2::Client.new('9deeb74498c897efa13e', '5b40e74810edd50ebe24770a5f2dcd389d687c73', args)
redirect_uri = 'https://github.com/paulwalker/oauth2'
client.auth_code.authorize_url(:redirect_uri => redirect_uri)
# navigate to domain in browser and then put code value in
code = ''