Skip to content

Instantly share code, notes, and snippets.

View briantjacobs's full-sized avatar

Brian Jacobs briantjacobs

View GitHub Profile
@briantjacobs
briantjacobs / storytelling_from_space.md
Last active February 18, 2024 10:02
Storytelling from Space

Storytelling from Space: Tools/Resources

This list of resources is all about acquring and processing aerial imagery. It's generally broken up in three ways: how to go about this in Photoshop/GIMP, using command-line tools, or in GIS software, depending what's most comfortable to you. Often these tools can be used in conjunction with each other.

Acquiring Landsat & MODIS

Web Interface

  • Landsat archive
@briantjacobs
briantjacobs / config.yml
Created November 24, 2015 19:43
Parse YAML from bash with sed and awk.
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@briantjacobs
briantjacobs / structured-wikipedia.md
Last active May 14, 2022 15:36
Structured Wikipedia data resources
#! /bin/bash
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs.
#
# Requirements:
# * gdal http://www.mapbox.com/tilemill/docs/guides/gdal/
# * convert (image-magick)
#
# Reference info:
# http://www.mapbox.com/blog/putting-landsat-8-bands-to-work/
@briantjacobs
briantjacobs / combineHorizons.py
Last active October 3, 2017 17:22
Script to process a folder of ephemeris data and break into date ranges
from jsonmerge import merge
import itertools
import os
import sys
import subprocess
import processHorizons
import simplejson as json
import msgpack
import dateutil.parser
from datetime import datetime
@briantjacobs
briantjacobs / processHorizons.py
Last active October 1, 2017 23:57
Scripts to process HORIZONS ephemeris data
import re
import os
import csv
import json
import sys
import StringIO
import dateutil.parser
import datetime
def main(inputFile):
@briantjacobs
briantjacobs / hi8-anim-howto.md
Created January 29, 2016 14:25 — forked from celoyd/hi8-anim-howto.md
A way to make Himawari-8 animations

Himawari-8 animation tutorial

Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:

  • curl (or you can translate to wget)
  • convert and montage, part of ImageMagick
  • ffmpeg, plus whatever codecs
  • parallel, for iteration that’s nicer than shell for loops or xargs
  • run everything in zsh for leading 0s in numerical ranges to work
@briantjacobs
briantjacobs / cubeSphere-example.js
Last active August 17, 2017 00:43
Create 6 gnomonic cube faces from a WGS84 input geotiff, render in three.js
var cubeSphere = new CubeSphere({
parent: PARENT, // scene or Object3D
scale: 1, // in case scaling according to other objects in scene
radius: 5, // size of sphere
textureFaces: [
new THREE.ImageUtils.loadTexture(04.jpg),
new THREE.ImageUtils.loadTexture(03.jpg),
new THREE.ImageUtils.loadTexture(05.jpg),
new THREE.ImageUtils.loadTexture(06.jpg),
new THREE.ImageUtils.loadTexture(02.jpg),
@briantjacobs
briantjacobs / gist:8c831d15acb3aa42da29f03c5f6153e4
Created August 5, 2017 23:12 — forked from jarek-foksa/gist:2648095
SVGElement.prototype.innerHTML shim
// Important: You must serve your pages as XHTML for this shim to work,
// otherwise namespaced attributes and elements will get messed up.
Object.defineProperty(SVGElement.prototype, 'innerHTML', {
get: function() {
var $child, $node, $temp, _i, _len, _ref;
$temp = document.createElement('div');
$node = this.cloneNode(true);
_ref = $node.children;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
$child = _ref[_i];