This file contains 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
// decorator | |
function replacerWithPath (fn) { | |
let paths = new Map() | |
return function (key, value) { | |
let path = paths.get(this) || '$' | |
if (key) path += Array.isArray(this) ? `[${key}]` : `.${key}` | |
let v = fn(key, value, path) | |
if (v === Object(v)) paths.set(v, path) | |
return v | |
} |
This file contains 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
const geojson = { | |
'id': -99, | |
'type': -6, | |
'properties': -5, | |
'geometry': -4, | |
'coordinates': -3, | |
'bbox': -2 | |
} | |
// GeoJSON Feature/Geometry |
This file contains 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
// copy->paste into the browser console and wait | |
// note: sorted with the highest points last | |
const csv = (text) => | |
text | |
.trim() | |
.split('\n') | |
.map((r) => { | |
const c = r.split(',').map((c) => c.trim()) | |
return { |
This file contains 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
package spatial | |
import ( | |
"fmt" | |
"strconv" | |
"github.com/golang/geo/s2" | |
"github.com/peterstace/simplefeatures/geom" | |
) |
This file contains 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
sudo tcpdump -X -v 'udp[8:4] = 0x03050b11' |
This file contains 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
{ | |
"AD": "ca", | |
"AE": "ar-AE,fa,en,hi,ur", | |
"AF": "fa-AF,ps,uz-AF,tk", | |
"AG": "en-AG", | |
"AI": "en-AI", | |
"AL": "sq,el", | |
"AM": "hy", | |
"AN": "nl-AN,en,es", | |
"AO": "pt-AO", |
This file contains 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
class Bitwise { | |
static trailingZeros8(b) { | |
let lsb = (b & -b) | |
if(lsb === 0) { return 8 } | |
return 31 - Math.clz32(lsb) | |
} | |
static trailingZeros64(a) { | |
for(let i=7; i>=0; i--) { | |
let z = Bitwise.trailingZeros8(a[i]) | |
if(z < 8) { return ((7-i) * 8) + z } |
This file contains 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
const fs = require('fs') | |
const path = require('path') | |
const fetch = require('node-fetch') // npm i node-fetch@2 | |
// Usage: node configure.js planet-v1.20.osm.pbf daylight | |
// A file named 'extract.sh' will be generated along with the `./configs` and `./extracts` directories | |
// first argument is the input .pbf file | |
const inputFile = process.argv[2] | |
if (!fs.existsSync(inputFile)) { throw new Error('input file not found') } |
We can't make this file beautiful and searchable because it's too large.
This file contains 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
3041129 Sant Vicenç d’Enclar Sant Vicenc d'Enclar Castell de Sant Vicenc,Castell de Sant Vicens,Castell de Sant Vicenç,Sant Vicenc d'Enclar,Sant Vicenç d’Enclar 42.49571 1.49372 S HSTS AD 07 0 1184 Europe/Andorra 2020-06-10 | |
8225419 Qaşr aḑ Ḑiyāfah Qasr ad Diyafah H.H. The Ruler's Guesthouse,H.H. The Ruler’s Guesthouse,Qasr ad Diyafah,Qaşr aḑ Ḑiyāfah,qsr aldyaft,قصر الضيافة 25.2412 55.26796 S HSTS AE 03 0 6 Asia/Dubai 2012-04-06 | |
8469451 Bayt ash Shaykh ‘Ubayd Bin Thānī Bayt ash Shaykh `Ubayd Bin Thani Bayt ash Shaykh `Ubayd Bin Thani,Bayt ash Shaykh ‘Ubayd Bin Thānī,House of Sheikh Obaid Bin Thani,byt alshykh ʿbyd bn thany,بيت الشيخ عبيد بن ثاني 25.26859 55.29059 S HSTS AE 03 0 4 Asia/Dubai 2020-06-12 | |
8469455 Murabba‘at ash Shindaghah Murabba`at ash Shindaghah Al-Shindagha Square Fort,Murabba`at ash Shindaghah,Murabba‘at ash Shindaghah,mrbʿt alshndght,مربعة الشندغة 25.26525 55.29031 S HSTS AE 03 0 4 Asia/Dubai 2020-06-12 | |
8469463 Al Burj al Gharbī Al Burj al Gharbi Al Burj al Gharbi,Al Burj |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder