Skip to content

Instantly share code, notes, and snippets.

View cruft-ninja's full-sized avatar

Gary Collins cruft-ninja

View GitHub Profile
@cruft-ninja
cruft-ninja / GenerateSlippyMapTiles.py
Created December 6, 2017 09:02 — forked from jeffThompson/GenerateSlippyMapTiles.py
Takes a large image as the input, outputs map tiles at the appropriate size and file structure for use in frameworks like leaflet.js, MapBox, etc.
# -*- coding: utf-8 -*-
import argparse, magic, re, os, math, glob, shutil
'''
GENERATE SLIPPY MAP TILES
Jeff Thompson | 2016 | jeffreythompson.org
Takes a large image as the input, outputs map tiles
at the appropriate size and file structure for use
@cruft-ninja
cruft-ninja / csv-to-json.php
Created May 21, 2016 00:45 — forked from robflaherty/csv-to-json.php
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed