Skip to content

Instantly share code, notes, and snippets.

View whazzmaster's full-sized avatar
:shipit:
Re-architect the world

Zachery Moneypenny whazzmaster

:shipit:
Re-architect the world
View GitHub Profile
@whazzmaster
whazzmaster / cross-project-status.sh
Created April 26, 2011 04:30
Shell function that shows a summary of all your current projects
function minutes_since_last_commit {
now=`date +%s`
last_commit=`git log --pretty=format:'%at' -1`
seconds_since_last_commit=$((now-last_commit))
minutes_since_last_commit=$((seconds_since_last_commit/60))
echo $minutes_since_last_commit
}
function has_modified_files {
status=`git status`
@whazzmaster
whazzmaster / git-prompt++
Created April 4, 2011 01:54
dotfile methods for showing the current branch name and minutes since last commit (or 'clean' if working directory has no changes)
function minutes_since_last_commit {
now=`date +%s`
last_commit=`git log --pretty=format:'%at' -1`
seconds_since_last_commit=$((now-last_commit))
minutes_since_last_commit=$((seconds_since_last_commit/60))
echo $minutes_since_last_commit
}
function has_modified_files {
status=`git status`