Skip to content

Instantly share code, notes, and snippets.

View enkrates's full-sized avatar

William Sullivan enkrates

View GitHub Profile
@enkrates
enkrates / invoices.rb
Created March 16, 2012 21:41 — forked from mokolabs/invoices.rb
archive your slicehost invoices
require 'rubygems'
require 'mechanize'
a = Mechanize.new { |agent|
agent.follow_meta_refresh = true
agent.pluggable_parser.pdf = Mechanize::FileSaver
}
a.get('https://manage.slicehost.com/') do |home_page|
@enkrates
enkrates / gist:1134773
Created August 9, 2011 18:18 — forked from rajiv/gist:957181
version control info in your bash shell prompt
# based on http://pastie.org/230805
# and http://gist.github.com/3829/
# from http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
_bold=$(tput bold)
_normal=$(tput sgr0)
__vcs_dir() {
local vcs base_dir sub_dir ref