Skip to content

Instantly share code, notes, and snippets.

View douglasgoodwin's full-sized avatar

Doug Goodwin douglasgoodwin

View GitHub Profile
@douglasgoodwin
douglasgoodwin / .block
Created July 2, 2022 06:04 — forked from mbostock/.block
Random Traversal III
license: gpl-3.0
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
douglasgoodwin / GIF-Screencast-OSX.md
Last active December 4, 2017 23:09 — forked from dergachev/GIF-Screencast-OSX.md
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

Instructions

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 frequency.py 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
douglasgoodwin / 1_nginx-openresty-ubuntu-build-dependencies.sh
Last active August 26, 2016 17:23 — forked from markselby/nginx-openresty-ubuntu-build-dependencies.sh
Build Nginx OpenResty version on Ubuntu. Add --stream and http_v2_module. install on mtawebproxy and metroservices.io
# 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 vimeo.com
// =============================
// Trying to find the best settings for encoding videos as described here:
// http://vimeo.com/help/compression
//
// Input file: MOV
// Video: PAL DV, 720x576, 25fps
// Audio: aac Audio, Stereo, 48kHz, 256kbps
//
// OUT
@douglasgoodwin
douglasgoodwin / nginx.conf
Last active December 18, 2015 07:19 — forked from fennb/gist:1283573
# 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;
server_name yourhost.domain.com;
# Define cached location (may not be whole site)
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...
#