- Swap Control and Caps Lock in System Preferences -> Keyboard -> Modifier Keys
- Google Chrome http://www.google.com/chrome/
- iTerm2 http://www.iterm2.com/
- Oh my zsh https://github.com/robbyrussell/oh-my-zsh/
- XCode (from the mac app store)
- XCode command line tools (run XCode, go to Preferences -> Downloads -> Command Line Tools)
- Homebrew https://github.com/mxcl/homebrew/wiki/installation
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
#!/usr/bin/env node | |
var cmds = []; | |
if (process.argv.length < 3) { | |
console.log('You need to provide a commit message!'); | |
process.exit(-1); | |
} | |
cmds.push('git add -A'); | |
cmds.push('git add -u'); |
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 encapsulate = (function() | |
{ | |
var rGetFirstChar = /^([a-z])/; | |
function isNumber (value) | |
{ | |
return !isNaN(parseFloat(value)) && typeof value !== 'string'; | |
} |
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
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
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(define){define(function(require,exports,module){ | |
//... | |
});})(typeof define=='function'&&define.amd?define | |
:(function(n,w){'use strict';return typeof module=='object'?function(c){ | |
c(require,exports,module);}:function(c){var m={exports:{}};c(function(n){ | |
return w[n];},m.exports,m);w[n]=m.exports;};})('module-name',this)); |
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script> | |
<script src="http://burritopizza.local/socket.io/socket.io.js"></script> | |
<script src="https://gist.github.com/raw/952547/f298c7e30d0978da0c78df0ff79436e883efbad2/gistfile1.txt"></script> | |
<script src="http://popcornjs.org/code/players/youtube/popcorn.youtube.js"></script> | |
<style type='text/css'> | |
body { | |
} |
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(Modernizr){ | |
// FROM: http://codepen.io/shshaw/pen/yyOaqW | |
// Here are all the values we will test. If you want to use just one or two, comment out the lines of test you don't need. | |
var tests = [ | |
{ name: 'svg', value: 'url(#test)' }, // False positive in IE, supports SVG clip-path, but not on HTML element | |
{ name: 'inset', value: 'inset(10px 20px 30px 40px)' }, | |
{ name: 'circle', value: 'circle(60px at center)' }, | |
{ name: 'ellipse', value: 'ellipse(50% 50% at 50% 50%)' }, | |
{ name: 'polygon', value: 'polygon(50% 0%, 0% 100%, 100% 100%)' } | |
]; |
Convenience function for performing a groupBy
on a list then a sortBy
on the resulting groups using Underscore methods.
sortedGroupBy(list, groupByIterator, sortByIterator)
#Letsencrypt Ubuntu 14.04 Nginx Letsencrypt (https://letsencrypt.org) is an initative which aims to increase the use of encryption for websites. It basically allows people to apply for free certificates provided that they prove the they control the requested domain.
Note: As of 8th March 2016 letsencrypt is still in public beta.
##Installation To install the client, clone the repostiory from github.
git clone https://github.com/letsencrypt/letsencrypt.git
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
// <img id="myimage" src="http://placecage/1280/720"> | |
var image = document.getElementById('myimage'); | |
var mc = new Hammer.Manager(image); | |
var pinch = new Hammer.Pinch(); | |
var pan = new Hammer.Pan(); | |
pinch.recognizeWith(pan); |
OlderNewer