Skip to content

Instantly share code, notes, and snippets.

View trotter's full-sized avatar

Trotter Cashion trotter

View GitHub Profile
@trotter
trotter / gist:942937
Created April 26, 2011 19:36 — forked from schacon/gist:942899
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -Ev '>|master' |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete
@trotter
trotter / chloe-example.js
Created April 2, 2011 17:57
The Chloe example
var chloe = new Chloe({host: "<%= server_name %>", port: 8901});
chloe.connect(function () {
console.log('Holy crap, connected!');
chloe.send('Ohai Chloe!');
chloe.subscribe('pumpkin', function (message) {
console.log('Someone was eating pumpkins: ' + message);
});
r = Raphael("jobs-graph", 640, 120);
rect = r.rect(481, 30, 7, 90);
rect.attr({stroke: "none",
fill: "#446093"});
r = Raphael("jobs-graph", 640, 140);
text = r.text(490, 130, "Clinton");
text.attr({"font-family": "8px Courier",
fill: "#9c9c9b"});
var r = Raphael("circle", 100, 100);
r.circle(50, 50, 40);
function Chart() {
}
Chart.prototype = {
l_gutter: 120,
l_margin: 20,
r_margin: 20,
r_gutter: 80,
x_bound: 900,
t_gutter: 20,
@trotter
trotter / .vimrc
Created December 15, 2010 16:34
It's mah vimrc
set nocompatible
syntax on
set backspace=indent,eol,start
set number " Show line numbers
" Pathogen ********************************************************************
filetype off
call pathogen#helptags()
@trotter
trotter / tmux.conf
Created December 13, 2010 15:25
it's mah tmux conf and bash functions
# Change prefix key to Ctrl+\
unbind C-b
set -g prefix C-\
# Last active window
unbind l
bind C-\ last-window
# Use Vi mode
setw -g mode-keys vi
[Mon, 25 Oct 2010 16:23:23 -0400] INFO: Setting the run_list to ["role[app]"] from JSON
[Mon, 25 Oct 2010 16:23:23 -0400] INFO: Starting Chef Run (Version 0.9.12)
[Mon, 25 Oct 2010 16:23:23 -0400] WARN: Missing gem 'mysql'
[Mon, 25 Oct 2010 16:23:23 -0400] ERROR: Running exception handlers
[Mon, 25 Oct 2010 16:23:23 -0400] ERROR: Exception handlers complete
/tmp/chef-solo/cookbooks/mysql/attributes/server.rb:20:in `from_file': uninitialized constant Opscode::OpenSSL (NameError)
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/node.rb:578:in `load_attributes'
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/node.rb:576:in `each'
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/node.rb:576:in `load_attributes'
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/node.rb:575:in `each'
# ./roles/db.rb
name "database"
description "Be a DB"
run_list [ "mysql::server" ]
default_attributes :mysql => { :server_root_password => "beefcake" }
// ./config/db.json
{ "mysql": { "server_root_password": "beefcakes" },
"recipes": [ "mysql" ] }