Skip to content

Instantly share code, notes, and snippets.

Vish (Ishaya) Abrams vishvananda

View GitHub Profile
View gist:1253118
#!/usr/bin/env bash
ENDPOINT_TYPE=${3:-$ENDPOINT_TYPE}
KEYSTONE_HOST=${4:-$KEYSTONE_HOST}
function die {
echo $1
echo "usage: $0 <username> <password>" \
"<type=\$ENDPOINT_TYPE> <host=\$KEYSTONE_HOST>"
exit 1
}
View rc.sh
function git_branch {
git branch --no-color 2> /dev/null | egrep '^\*' | sed -e 's/^* //'
}
function git_dirty {
# only tracks modifications, not unknown files needing adds
if [ -z "`git status -s | awk '{print $1}' | grep '[ADMTU]'`" ] ; then
return 1
else
return 0
You can’t perform that action at this time.