Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Leaflet</title> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" /> | |
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script> | |
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script> | |
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script> | |
</head> | |
<body> |
.leaflet-div-icon { | |
background: transparent; | |
border: none; | |
} | |
.leaflet-marker-icon .number{ | |
position: relative; | |
top: -37px; | |
font-size: 12px; | |
width: 25px; |
This playbook has been removed as it is now very outdated. |
// the location we want to GeoCode | |
var location = 'London'; | |
// we are using MapQuest's Nominatim service | |
var geocode = 'http://open.mapquestapi.com/search?format=json&q=' + location; | |
// use jQuery to call the API and get the JSON results | |
$.getJSON(geocode, function(data) { | |
// get lat + lon from first match | |
var latlng = [data[0].lat, data[0].lon] |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
# Git grep for external static deps (ignores static:: and self:: calls) | |
alias staticdeps="git grep -Pi '^(?!\s+[*\/]).+\b[a-z][a-z0-9_]++(?<!static|self)::'" | |
# can also be assigned as a git alias | |
# add --global if you want it everywhere | |
git config alias.extdeps "grep -Pi '^(?"'!'"\s+[*\/]).+\\b[a-z][a-z0-9_]++(?<"'!'"static|self)::'" | |
# usage, global search | |
git extdeps |
#!/bin/bash | |
###################################################################################### | |
# THIS GIST IS NO LONGER MAINTAINED AND MAY BE DELETED IN THE FUTURE! # | |
# PLEASE GO TO https://github.com/shadowhand/git-switchbranch FOR A CURRENT VERSION! # | |
###################################################################################### | |
# git-switchbranch | |
# @link https://gist.github.com/shadowhand/9813453 | |
# @author shadowhand https://github.com/shadowhand |
Kinesis Freestyle (Terrible key switches. Mushy and un-lovable)
Kinesis Freestyle Edge (Traditional layout with too many keys, mech switches, proably too big to be tented easily/properly)
Matias Ergo Pro (Looks pretty great. Have not tried.)
ErgoDox Kit (Currently, my everyday keyboard. Can buy pre-assembled on eBay.)
ErgoDox EZ (Prolly the best option for most people.)
ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4
-r 24
- output frame rate-pattern_type glob -i '*.JPG'
- all JPG files in the current directory-i DSC_%04d.JPG
- e.g. DSC_0397.JPG-s hd1080
- 1920x1080 resolution