Skip to content

Instantly share code, notes, and snippets.

Avatar

Doug Goodwin douglasgoodwin

View GitHub Profile
@douglasgoodwin
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
douglasgoodwin / GIF-Screencast-OSX.md
Last active Dec 4, 2017 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

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:

View README.md

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 Aug 26, 2016 — 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
View 1_nginx-openresty-ubuntu-build-dependencies.sh
# 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
View GTFS-to-GEOJSON.md

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

View get_googleimages.py
# 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):
View vimeo.com.ffpreset
// 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
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;
server_name yourhost.domain.com;
# 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...
#