This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Array<T> { | |
flatMap: () => T[] | |
} | |
Array.prototype.flatMap = function() { | |
function innerFlatMap(arr) { | |
if (arr instanceof Array) { | |
return arr.reduce((r, e) => r.concat(innerFlatMap(e)), []); | |
} | |
return arr; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var readline = require('readline'); | |
var rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false | |
}); | |
var f = process.argv[2]; | |
rl.on('line', function(line){ | |
var str = line.replace(/[\""]/g, '\\"'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MYSQL_USER=root | |
OUT_FILE=$1 | |
MYSQL_PASS=$2 | |
MYSQL_CONN="-u${MYSQL_USER} -p${MYSQL_PASS}" | |
# | |
# Collect all database names except for | |
# mysql, information_schema, and performance_schema | |
# | |
SQL="SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN" |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0"><ows:ServiceIdentification><ows:ServiceType>OGC WMTS</ows:ServiceType><ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion></ows:ServiceIdentification><ows:ServiceProvider><ows:ServiceContact><ows:ContactInfo></ows:ContactInfo></ows:ServiceContact></ows:ServiceProvider><ows:OperationsMetadata><ows:Operation name="GetCapabilities"><ows:DCP><ows:HTTP><ows:Get xlink:href="https://test-portals-maps.landcareresearch.co.nz/mapcache/portals/wmts?"><ows:Constraint name="GetEncoding"><ows:AllowedValues><ows:Value>KVP</ows:Value></ows:AllowedValues></ows:Constraint></ows:Get></ows:HTTP></ows:DCP></ows:Operation><ows:Operation name="GetTile"><ows:DCP><ows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function log() { | |
//document.getElementById('log').innerHTML += Array.prototype.join.apply(arguments, ["\n"]) + "\n\n"; | |
console.log(arguments); | |
} | |
Function.prototype.bind2 = function (o) { | |
var fn = this; | |
log('closure this:', this, "\nfn:", fn); | |
return function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"name": "Afghanistan", "code": "AF"}, | |
{"name": "Åland Islands", "code": "AX"}, | |
{"name": "Albania", "code": "AL"}, | |
{"name": "Algeria", "code": "DZ"}, | |
{"name": "American Samoa", "code": "AS"}, | |
{"name": "AndorrA", "code": "AD"}, | |
{"name": "Angola", "code": "AO"}, | |
{"name": "Anguilla", "code": "AI"}, | |
{"name": "Antarctica", "code": "AQ"}, |