This was cloned off of some work by the fantastic Max Odgen, and does a great job of showing what CouchDB can do.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var playlist = $('.songs .song').toArray().map(function(song) { | |
var song = $(song) | |
, deets = song.find('.details').text().split(' • ') | |
, image = $(song).find('.thumb').attr('style') | |
return { | |
title: song.find('.title').text(), | |
artist: deets.shift(), | |
length: deets.shift(), | |
cover: image ? /\((.*)\)/.exec(image).pop() : null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while [[ -n $(port list leaves 2> /dev/null) ]]; do | |
sudo port uninstall leaves | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cert_file="$( openssl version -d | awk -F'"' '{print $2}' )/cert.pem" | |
mkdir -p "${cert_file%/*}" | |
security find-certificate -a -p /Library/Keychains/System.keychain > "$cert_file" | |
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> "$cert_file" |
This repo has some handy handy hooks to run bundle
or npm install
whenever you:
git checkout
a new branch with a different Gemfile or package.jsongit pull
a change to Gemfile or package.json
git clone https://gist.github.com/5869846.git hooks && cd hooks && chmod +x install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Find and log every DOMNode on the page which isn't using Proxima Nova | |
// as its font-family | |
function isHeretic(node) { return (window.getComputedStyle(node).fontFamily.indexOf('proxima-nova') < 0) } | |
function isVisible(node) { return (window.getComputedStyle(node).display !== 'none') } | |
function log(node) { console.log(node, window.getComputedStyle(node).fontFamily) } | |
function toArray(domlist) { return Array.prototype.slice.call(domlist) } | |
toArray(document.querySelectorAll('#fs-main-content *')).filter(isHeretic).filter(isVisible).forEach(log) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Child() { | |
Parent.call(this); | |
} | |
extends(Child, Parent); |