I hereby claim:
- I am hhallman on github.
- I am hgo (https://keybase.io/hgo) on keybase.
- I have a public key ASA36SiE08ku1JqiIxsOF-t4sfHog8hpyx3vxW2aYuYAdAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#/bin/bash | |
# Prints the currently checked out version-name | |
# <number-of-commits-on-master-since-branchout-or-`rebase`>.branch-name.<number-of-commits-since-branchout><flags> | |
# example: 12342-feature-34 | |
# e.g.: 12334-feature-25cp for Changes-exist and Push-needed | |
origin="origin" # can be improved | |
master="master" # can be improved | |
short=" --short " # make it "" if long hashes are required instead of short |
#!/bin/bash | |
if [[ "$BASH_SOURCE" == "$0" ]]; then | |
ABSOLUTE_PATH=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/`basename "${BASH_SOURCE[0]}"`; | |
echo "This ($ABSOLUTE_PATH) is a source script, and should not be run directliy. Rather source the script by running: | |
source $ABSOLUTE_PATH; | |
p; | |
" | |
fi |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#Rename the last screen dump on Mac | |
function sdname { | |
screen_dump_dir=$(defaults read com.apple.screencapture location); | |
filename="$( ls -rt $screen_dump_dir | tail -1 )"; | |
echo renaming $screen_dump_dir/$filename; | |
title="$@"; | |
while test -z "$title"; do echo "Give the dump a title (break to abort)"; read title; done; | |
mv "$screen_dump_dir/$filename" "$screen_dump_dir/$title-$filename"; | |
} |