Skip to content

Instantly share code, notes, and snippets.

View midendian's full-sized avatar

Adam Fritzler midendian

View GitHub Profile
#!/usr/bin/env python2
"""
eg:
$ adsbx2geojson.py -m Mdl -M C-17 C-5M \
--files 2018-05-12-1[89]*.json 2018-05-12-2[0-9]*Z.json > x.json
$ adsbx2geojson.py -m OpIcao -M RCH \
--files 2018-05-12-1[89]*.json 2018-05-12-2[0-9]*Z.json > x.json
"""
import sys
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@midendian
midendian / capture-flat-field.sh
Created August 20, 2014 05:42
Collect flat-field images using gphoto2
#!/bin/bash
# capture several images at every ISO from your Canon. expects:
# 1) your camera is turned on and plugged into USB (beware auto-off)
# 2) it does not have a lens attached (flat fields should not be taken with focused light)
# 3) it's in P mode (or Av mode)
# 4) it's in RAW mode (not sRAW)
# 5) it doesn't have any custom functions enabled that would break gphoto2
@midendian
midendian / gist:08e5920fa69a228832e2
Created August 2, 2014 21:24
pip install gdal on os x with GDAL Framework
# download+install this pkg: http://www.kyngchaos.com/files/software/frameworks/GDAL_Complete-1.11.dmg
export CPLUS_INCLUDE_PATH=/Library/Frameworks/GDAL.framework/unix/include/
export C_INCLUDE_PATH=/Library/Frameworks/GDAL.framework/unix/include/
(cd /Library/Frameworks/GDAL.framework/Versions/1.11 && sudo ln -s unix/lib)
export PATH="$PATH:/Library/Frameworks/GDAL.framework/unix/bin"
pip install gdal
#!/usr/bin/perl
# push list of files to an s3 bucket+prefix, in parallel and without retransmit if already present and same size.
# uses aws.pl from https://github.com/timkay/aws (use a recent version so multipart uploads/very large objects Just Work)
#
# run like:
# AWSPL="/path/to/aws --secrets-file=/root/.awssecret.blah" s3pushdir.pl bucketname/prefix/prefix file1 file2 test/file3 test2/*whatever
#
# set maxCon below at your descretion.