Skip to content

Instantly share code, notes, and snippets.

View hhallman's full-sized avatar

Hugo Hallman hhallman

  • Stockholm, Sweden
View GitHub Profile

Keybase proof

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:

#/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
@hhallman
hhallman / p.sh
Created November 28, 2012 10:13
bash project manager
#!/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
@hhallman
hhallman / about.md
Created August 23, 2011 14:16 — forked from windock/about.md
Programming Achievements: How to Level Up as a Developer
@hhallman
hhallman / aliases.sh
Created March 29, 2011 00:33
Aliases, many for mac
#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";
}