Skip to content

Instantly share code, notes, and snippets.

View rwoloszyn's full-sized avatar

Rafal Woloszyn rwoloszyn

View GitHub Profile
@six519
six519 / setup.sh
Last active October 8, 2017 20:15
Install node/npm/nvm Bash Script In FreeBSD 10.2
#!/usr/bin/env bash
#just want to post something!!!!!! :D
sudo pkg install node www/npm git gmake wget
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
@dciccale
dciccale / git_branch.sh
Created May 11, 2013 18:02
Bash script to get the current git branch and last commit
#!/usr/bin/env bash
# checks if branch has something pending
function parse_git_dirty() {
git diff --quiet --ignore-submodules HEAD 2>/dev/null; [ $? -eq 1 ] && echo "*"
}
# gets the current git branch
function parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"