Skip to content

Instantly share code, notes, and snippets.

PS1_BASE="$PS1"
format_prompt () {
if [ "$?" -ne "0" ]; then
PS1="${PS1_BASE}\[\033[0;31m\]ಠ_ಠ\[\033[0m\] "
else
PS1="${PS1_BASE}"
fi
}
PROMPT_COMMAND=format_prompt
@mataspetrikas
mataspetrikas / gist:811849
Created February 4, 2011 21:52
adding pushState support in BackBone.js (experimental)
// browser history with HTML5 support
(function() {
var loc = window.location,
pushSupport = !!(window.history && window.history.pushState),
hashStrip = /^#*/;
// add HTML5 support to Backbone.history, drop the old IE stuff
_.extend(Backbone.History.prototype, {
getFragment : function(l) {