Skip to content

Instantly share code, notes, and snippets.

@michaelkirk
michaelkirk / mpeginate
Created May 13, 2024 21:28
Resize and re-encode a video to something appropriate for a GH upload or other small file sharing.
set -x
set -e
BIN_NAME=$0
function usage {
cat <<EOS
Usage:
$BIN_NAME <video file> [width_scale]
Example:
$BIN_NAME foo.mov
@michaelkirk
michaelkirk / us_counties_bbox.csv
Created November 30, 2022 21:17
the bounding box of every US county (West, South, East, North)
SD_Todd -101.2278366 42.9978714 -100.1980286 43.3904114
TN_Carter -82.3425903 36.1029015 -81.9331589 36.5105019
TN_Franklin -86.3334427 34.9881744 -85.8648071 35.3625984
TN_Houston -87.9811859 36.1778755 -87.5135193 36.368187
TN_Maury -87.3543396 35.4093018 -86.7820129 35.8505821
TN_Robertson -87.1504898 36.3493996 -86.5641556 36.6524429
TN_Washington -82.7026901 36.0960999 -82.3000031 36.4471016
TX_Bastrop -97.6508179 29.786314 -97.0242004 30.4193554
TX_Burnet -98.458931 30.4259892 -97.8282318 31.0347443
TX_Collin -96.8444214 32.981781 -96.2951736 33.4052048

👖 4 geo

This is a proposal to explicitly use the Dimenstionally Extended 9 Intersection Model (DE-9IM) semantics to succinctly, conventionally, and accurately implement some of our geometric relations.

georust doesn't have a history of formal proposals before making changes (yet!?), but this seemed like a substantial enough endeavor that soliciting input from other folks up front seemed helpful.

Background / Motivation

@michaelkirk
michaelkirk / gifinate
Last active September 24, 2020 01:58
# default output resolution
WIDTH_SCALE=480
set -x
set -e
BIN_NAME=$0
function usage {
cat <<EOS
Usage:
# given a list of numbers, print any prefixes that overlap.
#
# e.g. [1, 2, 34, 35] has no overlaps
# e.g. [1, 2, 34, 3, 5] overlaps (3 is more general than 34)
#
# This is useful in the TZip gem, since if our prefixes
# overlap, the more specific mapping will never be used - probably
# not the intended behavior of anyone inputting a mapping.
#
# Note: this doesn't detect duplicate prefixes, since they've already
@michaelkirk
michaelkirk / show-remote-branch-info.sh
Created May 4, 2012 16:51
sort remote branches by age
#!/bin/sh
#
# Too many crusty old git branches? Run this to find likely candidates for deletion
# It lists all the remote branches and sorts them by age.
#
# Folks at pivotal shared this with me
#
#$ . show-remote-branch-info.sh
# 2012-05-04 09:42:29 -0700 4 minutes ago Ted & Bill \torigin/hey_Bill