Usage:
npm i @mapbox/vector-tile
node count-features-in-tile.js tile.pbf| const zlib = require("zlib"); | |
| const Protobuf = require("pbf"); | |
| const postgis = require("tilelive-postgis"); | |
| const tilelive = require("@mapbox/tilelive"); | |
| const VectorTile = require("@mapbox/vector-tile").VectorTile; | |
| postgis.registerProtocols(tilelive); | |
| const uri = | |
| "postgis://postgres@localhost/test?table=test&layerName=myLayer&geometry_field=geom"; |
| wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb | |
| dpkg -i mysql-apt-config_0.8.10-1_all.deb # choose OK | |
| apt-get update | |
| apt-get install mysql-client |
| version: '3.6' | |
| services: | |
| traefik: | |
| image: traefik:1.6-alpine | |
| container_name: traefik | |
| restart: always | |
| ports: | |
| - 80:80 | |
| - 443:443 |
| const request = require("request-promise"); | |
| const main = async () => { | |
| try { | |
| const { Id, Warnings } = await request({ | |
| method: 'POST', | |
| uri: 'http://unix:/var/run/docker.sock:/v1.24/containers/create', | |
| body: { Image: 'bfirsh/reticulate-splines' }, | |
| headers: { | |
| 'Host': null, |
| sudo sshfs -d -o allow_other -o reconnect -o IdentityFile=/home/stepan/.ssh/id_rsa -o ServerAliveInterval=15 [email protected]:/root/gitlab-backups /srv/gitlab/data/backups |
| const fs = require("fs"); | |
| const path = require("path"); | |
| const argv = process.argv.slice(2); | |
| const dir = argv[0]; | |
| if (!dir) { | |
| console.log("Usage: node get-first-features.js [dir]"); | |
| process.exit(-1); | |
| } |
| select | |
| ST_XMax(geom), | |
| ST_YMax(geom), | |
| * | |
| from gamma.cores_boundaries | |
| where ST_XMax(geom) > 180 OR ST_XMax(geom) < -180 OR ST_YMax(geom) > 90 OR ST_YMax(geom) < -90; |
| import { is, isImmutable } from 'immutable'; | |
| import { shouldUpdate, shallowEqual } from 'recompose'; | |
| const shouldUpdateImmutable = shouldUpdate((props, nextProps) => { | |
| const keys = Object.keys(props); | |
| const nextKeys = Object.keys(nextProps); | |
| if (keys.length !== nextKeys.length) { | |
| return true; | |
| } |