Skip to content

Instantly share code, notes, and snippets.

View douglasgoodwin's full-sized avatar

Doug Goodwin douglasgoodwin

View GitHub Profile
jalessio /
Last active September 13, 2016 17:51 — forked from irees/
Forked: Transit dimensions: Transitland Schedule API

Minor updates by jalessio 2016-08-04

  • Reduce PER_PAGE from 1000 to 500 to get around API gateway timeout errors
  • Remove call to meta['total'] which is no longer part of the API response JSON
  • Update date to August 2016

Transitland Frequency Visualization

Accompanies blog post: Transit dimensions: Transitland Schedule API

bertspaan /
Last active May 13, 2017 22:47
Ruby script to convert GTFS stops and shapes to GeoJSON.

Ruby script to convert stops.txt and shapes.txt to GeoJSON.

staltz /
Last active May 26, 2024 04:06
The introduction to Reactive Programming you've been missing
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:

pwenzel /
Created June 6, 2012 20:53
Git Log to Tab-Delimited CSV File
# Local Dates:
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.local.tsv.txt
# ISO Dates:
git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.iso.tsv.txt
jeromer /
Last active February 21, 2024 13:31
compass bearing between two points in Python
# LICENSE: public domain
def calculate_initial_compass_bearing(pointA, pointB):
Calculates the bearing between two points.
The formulae used is the following:
θ = atan2(sin(Δlong).cos(lat2),
cos(lat1).sin(lat2) − sin(lat1).cos(lat2).cos(Δlong))
kimlindholm / gist:1819143
Created February 13, 2012 19:10
Code snippets from presentation "Varnish Configuration Step by Step"
------ Slide 8 ------
sudo su -
yum install -y gcc make pkgconfig pcre-devel ncurses-devel
cd /usr/src
wget -O - | tar xz
cd varnish-3.0.2
make && make install
# Try generating RTTY WAV files in Python
import fileinput
import wave
import numpy
string = ''.join(line for line in fileinput.input())
baud = 50.0
tone_duration = 1.0/50.0