Skip to content

Instantly share code, notes, and snippets.


Jon Stokes jonstokes

View GitHub Profile
jonstokes / print.js
Created Jan 6, 2022 — forked from gfodor/print.js
print all users to console
View print.js
javascript:console.log(Object.values(window.APP.hubChannel.presence.state).map(v => v.metas[0].profile.displayName).join(","));
jonstokes / gist:f61d3ec2a9ec4b3736320b8dace6c235
Created Jul 9, 2017 — forked from kalmbach/gist:4471560
Rake task sugar for Sequel Migrations (version, migrate, rollback, reset)
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)
end || 0
View gist:2c2cbdd39a60184c1938f9e75a547a3c
Bloggy McBlogface is my master.
def foo(bar)
View gist:b759445b2f6709a28fa2
Verifying that +jonstokes is my blockchain ID.
View gist:809a1bd9628b7913cb41
### Keybase proof
I hereby claim:
* I am jonstokes on github.
* I am 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:

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
jonstokes / poltergeist.rb
Created Jul 13, 2014
Monkey patching poltergeist for use with JRuby 1.7.11
View poltergeist.rb
require "capybara"
require "capybara/poltergeist"
require "capybara/poltergeist/utility"
module Capybara::Poltergeist
Client.class_eval do
def start
@pid = Process.spawn(*, pgroup: true)
ObjectSpace.define_finalizer(self, self.class.process_killer(@pid))
jonstokes / git-happy.zsh-theme
Last active Dec 18, 2015
My "Git Happy!" ZSH theme (based on robby-russell). I use this with Solarized, and it is awesome.
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%}'
#ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[red]%}✗%{$reset_color%}"
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.


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 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