Instantly share code, notes, and snippets.

View gist:f61d3ec2a9ec4b3736320b8dace6c235
namespace :db do
require "sequel"
Sequel.extension :migration
DB = Sequel.connect(ENV['DATABASE_URL'])
desc "Prints current schema version"
task :version do
version = if DB.tables.include?(:schema_info)
DB[:schema_info].first[:version]
end || 0
View gist:2c2cbdd39a60184c1938f9e75a547a3c
Bloggy McBlogface is my master.
```
def foo(bar)
baz
end
```
View gist:b759445b2f6709a28fa2
Verifying that +jonstokes is my blockchain ID. https://onename.com/jonstokes
View gist:809a1bd9628b7913cb41
### Keybase proof
I hereby claim:
* I am jonstokes on github.
* I am jonstokes (https://keybase.io/jonstokes) on keybase.
* I have a public key whose fingerprint is FA64 D2B7 B076 B3DF 592A 6295 C17A 9056 03A2 F315
To claim this, I am signing this object:
View 00.howto_install_phantomjs.md

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
View poltergeist.rb
require "capybara"
require "capybara/poltergeist"
require "capybara/poltergeist/utility"
module Capybara::Poltergeist
Client.class_eval do
def start
@pid = Process.spawn(*command.map(&:to_s), pgroup: true)
ObjectSpace.define_finalizer(self, self.class.process_killer(@pid))
end
View git-happy.zsh-theme
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)$(check_git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
RPROMPT='%{$fg_bold[green]%}$(git_prompt_short_sha)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
#ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[red]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
View mountain-lion-brew-setup.markdown

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

View osx_lion_rail_setup.md

Setup new Mac with OSX Mountain Lion from scratch

These commands are good as of 2013-1-8.

Install The latest XCode from the App Store

App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.

Install Command Line Tools