Skip to content

Instantly share code, notes, and snippets.

@miccolis
miccolis / gdal_in_2019.md
Last active December 12, 2019 15:59
GIS tools with Docker

Installing GDAL (ogr2ogr) in 2019

docker pull osgeo/gdal:alpine-small-3.0.2
docker run -it --rm -v /home/jeff/Data:/root/hostData/ osgeo/gdal:alpine-small-3.0.2 /bin/sh
@miccolis
miccolis / index.html
Last active August 29, 2015 14:01
CSS Transform Tiles
<html>
<head>
<style>
div#main {
overflow: hidden;
position: relative;
height: 100%;
width: 100%;
}
div.tile {

Keybase proof

I hereby claim:

  • I am miccolis on github.
  • I am miccolis (https://keybase.io/miccolis) on keybase.
  • I have a public key whose fingerprint is 7E2A 0B70 BFC0 2B04 FCA7 04A9 45B3 552F F64D D041

To claim this, I am signing this object:

@miccolis
miccolis / sumo-rpm-install.sh
Last active July 14, 2016 00:44
Extracted from the sumologic collector rpm
#!/bin/sh
if id -u sumo >/dev/null 2>&1; then
echo "User sumo exists..."
else
groupadd -f sumo &&
useradd -g sumo sumo
echo "Create user sumo..."
fi
/opt/SumoCollector/collector stop > /dev/null 2>&1 || true
@miccolis
miccolis / freq.c
Created January 5, 2013 23:32 — forked from anonymous/freq.c
#include <stdio.h>
#include <stdint.h>
int main() {
// B7, G7 & G#7 intentionally differ from the hex values in the data sheet
static int octave[12] = {0x892B, 0x9153, 0x99F7, 0xA31F, 0xACD2, 0xB719, 0xC1FC,
0xCD85, 0xD9BD, 0xE6B0, 0xF467, 0x102F0};
for (int i = 0; i < 95; i++) {
@miccolis
miccolis / nextbus.js
Created May 20, 2012 22:07
WMATA NextBus script
#!/usr/bin/env node
/**
* Gets the number of minutes before a bus shows up at a particular bus stop.
*
* Usage: ./nextbus.js API-KEY STOP-ID
*/
// Since WMATA uses Mashery you need to get a Mashery account, and then register
// your application. See http://developer.wmata.com/
var apiKey = process.argv[2];
@miccolis
miccolis / hst2rgb-test.js
Created March 29, 2012 03:06
Test of various hsl2rgb conversions
var assert = require('assert');
var tests = [
{hsl: [0, 0, 0], rgb: [0, 0, 0]}, // black
{hsl: [0, 0, 1], rgb: [255, 255, 255]}, // white
{hsl: [0, 1, 0.5], rgb: [255, 0, 0]}, // red
{hsl: [120, 1, 0.5], rgb: [0, 255, 0]}, // green
{hsl: [240, 1, 0.5], rgb: [0, 0, 255]}, // blue
// http://www.december.com/html/spec/colorcodes.html
@miccolis
miccolis / setup.sh
Created January 5, 2012 15:14
link dotfiles into a home dir
#!/bin/sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
FILES=`ls -a $DIR`;
for FILENAME in $FILES; do
if [ ${FILENAME:0:1} == "." -a ${#FILENAME} -gt "2" ]; then
EXT=${FILENAME##*.}