Skip to content

Instantly share code, notes, and snippets.

View bricooke's full-sized avatar

Brian Cooke bricooke

  • WA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bricooke on github.
  • I am bricooke (https://keybase.io/bricooke) on keybase.
  • I have a public key whose fingerprint is 9BEC E19A 007A 793B 7929 3DD8 25A0 287F DB61 7E98

To claim this, I am signing this object:

@bricooke
bricooke / cleanbranches.sh
Created May 2, 2013 23:06
my cleanbranches script
#!/bin/bash
# Started from http://stackoverflow.com/questions/3184555/cleaning-up-old-remote-git-branches
# BTC edited to not prompt if there weren't any remote branches to remove and to
# not `say` that it's finished
# This has to be run from master
git checkout master > /dev/null 2>&1
# Update our list of remotes
# git shortcuts
alias gc='git commit -v'
alias gst='git status -sb'
alias gcvam='gc -v -a -m '
alias gcvm='gc -v -m '
alias gsl='git stash list'
alias fetch='git fetch'
alias co='git checkout'
@bricooke
bricooke / gist:1252505
Created September 30, 2011 02:27
Note: See comments. You can create custom behaviors in Xcode to do this and that's way better.
-- `menu_click`, by Jacob Rus, September 2006
-- via http://hints.macworld.com/article.php?story=20060921045743404
--
-- Accepts a list of form: `{"Finder", "View", "Arrange By", "Date"}`
-- Execute the specified menu item. In this case, assuming the Finder
-- is the active application, arranging the frontmost folder by date.
on menu_click(mList)
local appName, topMenu, r
@bricooke
bricooke / My git shortcuts from .bashrc
Created August 6, 2010 11:00
my .gitstuff (included in my .bashrc)
# git shortcuts
alias gc='git commit -v'
alias gst='git status -sb'
alias gcvam='gc -v -a -m '
alias gcvm='gc -v -m '
function gpull()
{
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.2 (140)
#
# Alignment
# ---------
## Alignment
#!/usr/bin/env ruby
require 'rubygems'
require File.join(File.dirname(__FILE__), 'basecamp')
require 'activesupport'
project_id = ARGV[0]
person_id = "2333575"
xml_data = File.open(ARGV[1]).read.gsub("@", "")
require 'net/https'
def random_word
alphabet = ('a'..'z').to_a
(1..12).inject("") { |s,x| s << alphabet[rand(alphabet.size)]}
end
class GoogleAuth
def self.login(email, password)
http = Net::HTTP.new('www.google.com', 443)