Skip to content

Instantly share code, notes, and snippets.

View benhamill's full-sized avatar
💖

Ben Hamill benhamill

💖
View GitHub Profile
@rubygeek
rubygeek / gist:4111823
Created November 19, 2012 16:53
Simple Breadcrumb Object with Tests
class Breadcrumb
Crumb = Struct.new(:name, :link)
attr_reader :crumbs
def initialize(name = "Home", link = "/")
@crumbs = []
self.add(name, link)
end
@benhamill
benhamill / unmerged-branches
Created September 28, 2011 00:38
Make this executable and it will list for you the remote branches that haven't been merged into the "develop" branch. You can, of course, grep for a different branch name (master?) or change the || to && to get remote branches that ARE merged in.
#! /bin/sh
if [[ -z $1 ]]; then
echo "You must provide a branch name against which to test merging."
exit 1
fi
gather_branches() {
for remote in `git for-each-ref --format='%(refname)' 'refs/remotes/'`
do
:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb: