Skip to content

Instantly share code, notes, and snippets.

View mroderick's full-sized avatar

Morgan Roderick mroderick

View GitHub Profile
@mroderick
mroderick / find-old-branches.sh
Last active April 11, 2024 19:49
A small script to find stale branches
#!/bin/bash
# This is a very naive script, it doesn't do grouping and returns all branches
# I only really care about branches that have not seen commits in two months
#
# I am hoping to find some time to write a tool that can output these reports for me
# In the meantime, I am using this
echo "Merged branches"
for branch in `git branch -r --merged | grep -v HEAD`;do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an, %ae, " $branch | head -n 1` \\t$branch; done | sort -r

Using named constructors

The general usage of a Backbone class is to use the .extend method providing an .initialize method.

var MyView = Backbone.View.extend({
  initialize: function () {
    // Setup object.
 }
@mroderick
mroderick / keybase.md
Created August 5, 2014 07:38
keybase.md

Keybase proof

I hereby claim:

  • I am mroderick on github.
  • I am mrgnrdrck (https://keybase.io/mrgnrdrck) on keybase.
  • I have a public key whose fingerprint is 3ABC 8817 CF95 2AF1 78E1 0115 19F2 57E0 CF18 1A69

To claim this, I am signing this object: