Skip to content

Instantly share code, notes, and snippets.

View briantjacobs's full-sized avatar

Brian Jacobs briantjacobs

View GitHub Profile
norm / checksoftwareupdate
Created February 24, 2010 23:49
wrapper around 'softwareupdate -l' to silence it when no updates exist
# wrapper around 'softwareupdate -l' to silence it when no updates exist
# -- Mark Norman Francis <>
OUTPUT=`mktemp /tmp/checksoftup.XXXXX`
ERRORS=`mktemp /tmp/checksoftup.XXXXX`
# capture output to separate files
softwareupdate -l >$OUTPUT 2>$ERRORS
* jQuery Tiny Pub/Sub - v0.X - 11/18/2010
* Original Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* Made awesome by Rick Waldron
# Download all current FAA sectional GeoTIFFs (zipped)
import urllib, os, csv
from lxml.html.soupparser import fromstring
DOWNLOAD_DIR = 'download'
data = urllib.urlopen(FAA_CHART_URL).read()
kueda / d3.phylogram.js
Last active May 8, 2024 17:33
Right-angle phylograms and circular dendrograms with d3. To preview see
Wrapper around a d3-based phylogram (tree where branch lengths are scaled)
Also includes a radial dendrogram visualization (branch lengths not scaled)
along with some helper methods for building angled-branch trees.
Copyright (c) 2013, Ken-ichi Ueda
All rights reserved.
rstacruz /
Last active November 3, 2023 09:56
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User




jswartwood / Run in LOCAL terminal...
Created February 19, 2012 01:53
Automatic Git deploys on Dreamhost
# Replace any brackets with real values
# Try to ssh in to DREAMHOST (ensure it no longer asks for a PW); you may want to restart Terminal
ssh [user]@[host]
cd ~
mkdir [mydomain_com].git
cd [mydomain_com].git
git init --bare
vi hooks/post-receive
# Enter the code from the "post-receive" file (in this gist); save + quit
nvkelso /
Created March 1, 2012 22:04 — forked from andrewharvey/
Given a WGS84 bounding box and an OSM tile zoom range calculates a total number of tiles and how much the Amazon Cloud will cost ya.
# This script is from:
# By Nathaniel Vaughn Kelso and Mike Migurski @ Stamen
# Based on script by andrewharvey:
# This script should be considered CC0 licensed
walkermatt / osgb_map.js
Created July 2, 2012 18:25
Leaflet Map using Proj4Leaflet to display a projected TMS base map from MapProxy
// Bounding box of our TMS that define our area of interest
var bbox = [-600000, -300000, 1300000, 1600000];
// Resolutions of our TMS that the tiles will be displayed at calculated so
// that at resolution 0 the bounds fit one 256x256 tile: (maxx - minx)/256
var res = [7421.875, 3710.9375, 1855.46875, 927.734375];
// Define the Proj4Leaflet coordinate reference system base on British National Grid
var crs = L.CRS.proj4js(
dergachev /
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF


To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

hrwgc /
Last active September 4, 2023 11:15
VIIRS Nighttime Lights 2012 processing