Skip to content

Instantly share code, notes, and snippets.

Mars Hall mars

Block or report user

Report or block mars

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mars / .bash_profile
Last active Oct 22, 2018
bash prompt git status
View .bash_profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
function parse_git_dirty {
git diff --quiet || echo ""
function parse_git_branch {
e=`echo $( { git status; } 2>&1 ) | tr '[:upper:]' '[:lower:]'`
if [[ ! $e =~ 'not a git repository' ]]
then git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)] /"
mars / bulk_email.rb
Created Jul 25, 2012
Bulk email via gmail
View bulk_email.rb
require "rubygems"
# gem install ruby-gmail
require 'gmail'
# gather email list
addresses = %w{
You can’t perform that action at this time.