Skip to content

Instantly share code, notes, and snippets.

apollolm / nginx-ssl-config
Last active Apr 12, 2021
Nginx Configuration with multiple port apps on same domain, with SSL.
View nginx-ssl-config
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
upstream app_pcodes{
apollolm / gist:350c21e54ac8d8129fae
Created Dec 31, 2014
Converting DEM (or other raster format) to RAW for import into Unity
View gist:350c21e54ac8d8129fae
gdal_translate -ot UInt16 -scale -of ENVI -outsize 1025 1025 Seattle_16Int.tif seattle_heightmap.raw
-of ENVI means it will write out RAW
This works fine. However, importing this .raw file into Unity produces an Vertically inverted terrain.
I opened with Photoshop CS, then did Image > Flip Vertical.
“Save As” Photoshop RAW. Options were blank, but saving worked.
Loaded into Unity as a terrain setting. Then manually set the Terrain height to 75, which when walking around seems right.
apollolm / SingleTile.js
Last active Dec 31, 2015 — forked from Zverik/SingleTile.js
Use this with Leaflet map API to request a single dynamic tile to be generated when user stops panning. Request is made to PGRestAPI (Chubbs Spatial Server)
View SingleTile.js
* from -
* L.DynamicSingleTile uses L.ImageOverlay to display a single-tile layer from node-mapnik.
* url parameter must accept width, height and bbox.
L.DynamicSingleTile = L.ImageOverlay.extend({
initialize: function (url, options) {, url, null, options);
apollolm / gist:7624122
Created Nov 24, 2013
FSP Cost Surface CartoCSS - How to colorize a raster to store cost values in the blue band of a 1-band raster. Make sure to use the band="1" in the Advanced textbox of the raster properties.
View gist:7624122
Map {
background-color: #b8dee6;
#countries {
::outline {
line-color: #85c5d3;
line-width: 2;
line-join: round;
apollolm / gist:7607864
Created Nov 22, 2013
Access Summary Geoprocessing Task for Chubbs Spatial Server
View gist:7607864
//10.17.2013 - Ryan Whitley
var flow = require('flow');
var pg = require('pg'),
common = require("../../../common"),
settings = require('../../../settings');
//Takes in a where clause, buffers, dissolves and zonal stats. Return table of zonal stats.
//Arguments are:
//1. The points (or at least a where clause to query a particular table).
//2. Buffer Radius
apollolm / PG9.2Install
Created Nov 11, 2013
PostGres 9.2/PostGIS 2.1 install notes Ubuntu 13
View PG9.2Install
mkdir -p src
# First install PostgreSQL 9.2, plus contributed packages and any missing prerequisites
# ===
# add the Postgres PPA
echo 'deb precise-pgdg main' \
View gist:9afd97bebb338b998876
@RyanWhitley To convert polygons to polylines in GRASS: dsn=<input>.shp out=chad in=chad out=chad2
v.out.ogr type=boundary in=chad2 dsn=grass_chad_lines.shp
Roger Andre
9:58 AM
@RyanWhitley Here's how you can do it to lines: dsn=AdminLine2.shp out=chad
v.clean tool=rmdupl in=chad out=chad2 <--new step to remove dupe segments in=chad2 out=chad3
apollolm / gist:384b8f5bbaf428535430
Last active Aug 29, 2015
MapboxGL Native on OSX
View gist:384b8f5bbaf428535430
Trying to bulid MapboxGL Native on OSX Yosemite.
Following instructions here:
When doing this:
brew install pkg-config boost imagemagick
...response was imagemagick is already installed, but not linked.
apollolm / gist:87c285b2bff6a9efc591
Created Nov 18, 2014
SpatialServer nginx-cache inpsect and purge
View gist:87c285b2bff6a9efc591
On Ubuntu 14 SpatialServer box, here's how to use the nginx-cache-purge and inspect scripts.
cd to nginx-cache-inspector and run:
sudo ./nginx-cache-inspector "india_distance" /var/cache/nginx
apollolm / Seattle-Police-Beats.geojson
Created Nov 4, 2014
Seattle Police Beats Map Layer
View Seattle-Police-Beats.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.