Instantly share code, notes, and snippets.

lunch android
make -j14
# you got it B-)

##How Homakov hacked GitHub and the line of code that could have prevented it

Please note: THIS ARTICLE IS NOT WRITTEN BY THE GITHUB TEAM or in any way associated with them. It's simply hosted as a Gist because the markdown formatting is excellent and far clearer than anything I could manage on my personal Tumblr at

If you'd like to follow me on twitter my handle is @peternixey

View deploy.rb
namespace :deploy do
namespace :assets do
task :precompile, :roles => :web, :except => { :no_release => true } do
from = source.next_revision(current_revision)
if capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0
run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
else "*"*100 "Skipping asset pre-compilation because there were no asset changes" "*"*100
View gist:1086873
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
View Sources.list file for ubuntu 10.10
# deb cdrom:[Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007)]/ maverick main restricted
# See for how to upgrade to
# newer versions of the distribution.
deb natty main restricted
deb-src natty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb natty-updates main restricted
View gist:742461
class ImportedContactsController << ApplicationController
require 'net/http'
require 'net/https'
require 'uri'
def authenticate
# initiate authentication w/ gmail
# create url with url-encoded params to initiate connection with contacts api
# next - The URL of the page that Google should redirect the user to after authentication.
# scope - Indicates that the application is requesting a token to access contacts feeds.