Skip to content

Instantly share code, notes, and snippets.

View wtfgimmeaname's full-sized avatar

Dustin Weatherford wtfgimmeaname

View GitHub Profile
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* Latitude/longitude spherical geodesy formulae & scripts (c) Chris Veness 2002-2012 */
/* - www.movable-type.co.uk/scripts/latlong.html */
/* */
/* Sample usage: */
/* var p1 = new LatLon(51.5136, -0.0983); */
/* var p2 = new LatLon(51.4778, -0.0015); */
/* var dist = p1.distanceTo(p2); // in km */
/* var brng = p1.bearingTo(p2); // in degrees clockwise from north */
/* ... etc */
@wtfgimmeaname
wtfgimmeaname / This is what happens larry...js
Created March 21, 2012 20:30
Watch function on inputs
function watch(label, input) {
var update = function() {
label.classList.remove(!input.checked);
label.classList.add(input.checked);
};
update();
input.addEventListener("change", update, false);
}
var inputs = document.querySelectorAll("input[type=checkbox]");
@wtfgimmeaname
wtfgimmeaname / gist:1934402
Created February 28, 2012 19:02
Campfire API quick ref
# /room/ROOM_ID.json, /rooms.json, /room/ROOM_ID/speak.json
# Auth token and a dummy password (x)
curl -u AUTH_TOKEN:X
-H 'Content-Type: application/json'
-d '{"message":{"body":"message in campfire room"}}'
https://subdomain.campfirenow.com/room/ROOM_ID/speak.json
@wtfgimmeaname
wtfgimmeaname / vim_config_opts.txt
Created February 7, 2012 20:21
Compiling vim...
./configure
--prefix=/usr/bin
--enable-gui=no
--enable-perlinterp=yes
--enable-pythoninterp=yes
--enable-rubyinterp
--with-features=huge
--with-compiledby=yourmom
--with-python-config-dir=/usr/lib/python2.7/config
@wtfgimmeaname
wtfgimmeaname / tmx.sh
Created February 7, 2012 19:53
tmx startup sh
#!/bin/bashϟ
TERM=xterm-256color tmux new -d -n 'code' -s 'do you party?'ϟ
TERM=xterm-256color tmux neww -n 'codee'ϟ
TERM=xterm-256color tmux neww -d -n 'codeee'ϟ
TERM=xterm-256color tmux neww -d -n 'git'ϟ
TERM=xterm-256color tmux neww -d -n 'shell'ϟ
TERM=xterm-256color tmux neww -d -n 'serv'ϟ
TERM=xterm-256color tmux neww -d -n 'data'ϟ
TERM=xterm-256color tmux neww -d -n 'util'ϟ
TERM=xterm-256color tmux attach-session -t 'do you party?'ϟ