Skip to content

Instantly share code, notes, and snippets.

View shiftb's full-sized avatar

Brandon Leonardo shiftb

View GitHub Profile
@shiftb
shiftb / gist:366066
Created April 14, 2010 17:12 — forked from reinh/ship.sh
#!/bin/sh -x
# git name-rev is fail
CURRENT=`git branch | grep '\*' | awk '{print $2}'`
git checkout master
git merge ${CURRENT}
git push origin master
git checkout ${CURRENT}
@shiftb
shiftb / gist:366067
Created April 14, 2010 17:12 — forked from reinh/hack.sh
#!/bin/sh -x
# git name-rev is fail
CURRENT=`git branch | grep '\*' | awk '{print $2}'`
git checkout master
git pull origin master
git checkout ${CURRENT}
git rebase master
@shiftb
shiftb / app.rb
Created March 20, 2011 23:52 — forked from trydionel/app.rb
A fast sinatra redis data viewer
require 'rubygems'
require 'haml'
require 'sinatra'
require 'redis'
helpers do
def redis
@redis ||= Redis.new
end
end
@shiftb
shiftb / pushState.cljs
Last active March 6, 2017 19:23 — forked from danielsz/pushState.cljs
Example using pushState with ClojureScript + Secretary
; require [goog.events :as events]
; import [goog.history Html5History]
; [goog Uri]
; [goog.history EventType]
(defn listen [el type]
(let [out (chan)]
(events/listen el type
(fn [e] (put! out e)))
out))