Skip to content

Instantly share code, notes, and snippets.


Doug Goodwin douglasgoodwin

View GitHub Profile
douglasgoodwin / .block
Created Jul 2, 2022 — forked from mbostock/.block
Random Traversal III
View .block
license: gpl-3.0
View iris.csv
0.2 1.4 5.1 3.5 Iris-setosa
0.2 1.4 4.9 3 Iris-setosa
0.2 1.3 4.7 3.2 Iris-setosa
0.2 1.5 4.6 3.1 Iris-setosa
0.2 1.4 5 3.6 Iris-setosa
0.4 1.7 5.4 3.9 Iris-setosa
0.3 1.4 4.6 3.4 Iris-setosa
0.2 1.5 5 3.4 Iris-setosa
0.2 1.4 4.4 2.9 Iris-setosa
0.1 1.5 4.9 3.1 Iris-setosa
douglasgoodwin /
Last active Dec 4, 2017 — forked from dergachev/
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:


dgoodwin fork for Python3 and Los Angeles downtown.

Transitland Frequency Visualization

Accompanies blog post: Transit dimensions: Transitland Schedule API

The script:

  • Fetches all trips on a given date, between a start time and end time, inside of a bounding box
  • Calculates the number of connections between every stop
  • Uses a colormap and line width to show more frequent service
douglasgoodwin /
Last active Aug 26, 2016 — forked from markselby/
Build Nginx OpenResty version on Ubuntu. Add --stream and http_v2_module. install on mtawebproxy and
# Build dependencies for OpenResty.
sudo apt-get install build-essential libpcre3-dev libssl-dev libgeoip-dev
# Install standard Nginx first so that you get the relevant service scripts installed too
sudo apt-get install nginx
# If you want to access Postgres via Nginx
# sudo apt-get install libpq-dev

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

# get images to go with those codes
import json
import os
import time
import requests
from PIL import Image
from StringIO import StringIO
from requests.exceptions import ConnectionError
def go(query, path):
// FFmpeg settings for
// =============================
// Trying to find the best settings for encoding videos as described here:
// Input file: MOV
// Video: PAL DV, 720x576, 25fps
// Audio: aac Audio, Stereo, 48kHz, 256kbps
// OUT
View nginx.conf
# Set cache dir
proxy_cache_path /var/cache/nginx levels=1:2
keys_zone=microcache:5m max_size=1000m;
# Virtualhost/server configuration
server {
listen 80;
# Define cached location (may not be whole site)
View A generic cache manager.
from django.db.models.query import QuerySet
from django.core.cache import cache
from django.db import models
import random
# douglas goodwin 4/2010
# eculver's code with a couple of fixes and instructions
# maybe not the nest way to do it but...