Skip to content

Instantly share code, notes, and snippets.

View TimDorand's full-sized avatar

Timothée Dorand TimDorand

View GitHub Profile
@TimDorand
TimDorand / bash_profile.sh
Last active February 3, 2021 09:57
Ultimate Terminal Prompt (Date / Folder / Git branch)
# FOR CATALINA AND HIGHER
function parse_git_branch() {
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
setopt PROMPT_SUBST
export PROMPT='%F{grey}%n%f %F{cyan}%~%f %F{green}$(parse_git_branch)%f %F{normal}$%f '
# FOR THE REST
@ricardoalcocer
ricardoalcocer / detailwin.js
Created November 23, 2012 20:27
Basic Alloy : Dynamic TableView Handling + Open Window
var args = arguments[0] || {};
$.rowId.text=args.rowId;
$.itemName.text=args.itemName;
function closeme(){
$.win.close();
}