Skip to content

Instantly share code, notes, and snippets.

@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) {
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#