Skip to content

Instantly share code, notes, and snippets.

View milovanderlinden's full-sized avatar

M.vd.L milovanderlinden

View GitHub Profile
function getTempImg(base64Image,filename){
var decodedImage = new Buffer(base64Image, 'base64');
fs.writeFile('cache/' + filename + '.jpg', decodedImage, function(err, data) {
console.log(data);
if (err){
return err;
} else {
return 'cache/' + filename + '.jpg';
}
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<gpx version="1.1" creator="Osmand" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
<trkseg>
<trkpt lat="51.6338118" lon="5.3003459">
<ele>0.0</ele>
<hdop>37.0</hdop>
<time>2012-07-04T17:28:36Z</time>
</trkpt>
<trkpt lat="51.633991" lon="5.3002616">
SYMBOL
NAME "windrad"
TYPE TRUETYPE
FONT "carto"
CHARACTER "g"
ANTIALIAS TRUE
GAP 5
END
@milovanderlinden
milovanderlinden / refineries.geojson
Last active February 4, 2016 15:23
Refineries from OpenStreetMap (Centroids)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@milovanderlinden
milovanderlinden / gist:1893942c39cdcd004b92
Last active October 28, 2015 23:18
Want to parse a OGC GetCapabilities Document to JSON with nodejs?. This will bring filesize down to 10%!
var allOGC = function(req, res) {
if (req.query) {
//set method from req
console.log(req.method);
var options = {
method: req.method,
url: req.query.q,
headers: {
'User-Agent': 'opendispatcher'
},
#===========================================================================
# allowed DPIs
#===========================================================================
dpis:
- 254
- 190
- 127
- 56
#===========================================================================

GIST for storing screenshots

var id = 'mapbox.streets';
mbUrl = 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpandmbXliNDBjZWd2M2x6bDk3c2ZtOTkifQ._QA7i5Mpkd_m30IGElHziw';
L.tileLayer(mbUrl, {id: id}).addTo(mymap);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@milovanderlinden
milovanderlinden / shelters_jam_sep2016.csv
Last active January 4, 2017 09:13
Shelter list for September 2016, Jamaica
parish shelter_name priority type in_geojson communities_served/0 communities_served/1 communities_served/2 communities_served communities_served/3
Kingston & St . Andrew Harbour View Primary true school false Harbour View
Kingston & St . Andrew St. Benedicts Primary true school Harbour View Bull Bay
Kingston & St . Andrew Friendship Brook All Age true school Bull Bay Taylor Land
Kingston & St . Andrew Norman Gardens Jnr High school Rockfort Norman Gardens
Kingston & St . Andrew Rennock Lodge All Age school Rennock Lodge
Kingston & St . Andrew Windward Road Junior H. school Windward Road Bournemouth Gardens Burgher Gully (Right Side)
Kingston & St . Andrew Holy Rosary Primary School school Windward Road Bournemouth Gardens/ Springfield
Kingston & St . Andrew Dunoon Technical High school Sirgany Burgher Gully (Left side)
Kingston & St . Andrew National Arena true Port Royal, Portmore