Skip to content

Instantly share code, notes, and snippets.

View andrewljohnson's full-sized avatar

Andrew L. Johnson andrewljohnson

View GitHub Profile
@mwkorver
mwkorver / mapserver.user-data
Last active August 24, 2016 14:36
EC2 user data script to deploy MapServer container mounting USDA NAIP data (about 100TB) in aws-naip bucket.
#cloud-boothook
#!/bin/bash
set -x
# This EC2 user-data file will run a Mapserver docker container.
# Still working on getting it to reboot properly. See this link for more info on user-data scripts
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html#user-data-shell-scripts
# Because this setup uses data stored in an S3 bucket located in the standard region, it needs to be run in us-east-1 (Virginia Region).
# It mounts S3 data by using danilop/yas3fs. USDA CONUS NAIP data, Mapfile and shapefile indexes are made available to Mapserver in this way.
# Just running this instance will give you access to all of the NAIP data via the EC2 instance's filesystem.
# One caveat is that the combination of mapfile and UTM projected geotifs only supports WMS requests near native 1m/pixel resolution or level 17,
@stevengoldberg
stevengoldberg / bst.js
Last active March 16, 2020 13:02
ES6 functions for manipulating a Binary Search Tree
/*
* Based on the work of Nicholas C. Zakas
* https://github.com/nzakas/computer-science-in-javascript/
*/
class Node {
constructor(value = null, left = null, right = null) {
this.value = value;
this.right = right;
this.left = left;