Skip to content

Instantly share code, notes, and snippets.

View drochetti's full-sized avatar
🎧
New projects!

Daniel Rochetti drochetti

🎧
New projects!
View GitHub Profile
// Use absolute URLs to navigate to anything not in your Router.
// Only need this for pushState enabled browsers
if (Backbone.history && Backbone.history._hasPushState) {
// Use delegation to avoid initial DOM selection and allow all matching elements to bubble
$(document).delegate("a", "click", function(evt) {
// Get the anchor href and protcol
var href = $(this).attr("href");
var protocol = this.protocol + "//";
@drochetti
drochetti / osx_setup.sh
Last active February 26, 2021 07:45 — forked from codeinthehole/osx_bootstrap.sh
Script to install/upgrade stuff an OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Reading:
#
# - http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
# - https://gist.github.com/MatthewMueller/e22d9840f9ea2fee4716