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
#!/usr/bin/env node | |
// usage node getStyleComponents.js > groups.json | |
// looks for a style named style.json, rename to match or use process.argv if you want | |
// then save these ids to an array and toggle with: | |
// layers?.forEach(lyr => map.setLayoutProperty(lyr, "visibility", value)); | |
const style = require("./style.json"); | |
const components = style.layers.reduce((map, lyr) => { |
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
license: gpl-3.0 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Swap Studio Source for GeoJSON</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link | |
rel="shortcut icon" | |
href="https://static-assets.mapbox.com/branding/favicon/v1/favicon.ico" | |
type="image/x-icon" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title></title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.css' rel='stylesheet' /> | |
<script src='http://mapbox-gl-inspect.lukasmartinelli.ch/dist/mapbox-gl-inspect.min.js'></script> | |
<link href='http://mapbox-gl-inspect.lukasmartinelli.ch/dist/mapbox-gl-inspect.css' rel='stylesheet' /> |
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
{ | |
"version": 0.6, | |
"generator": "Overpass API 0.7.54.12 054bb0bb", | |
"osm3s": { | |
"timestamp_osm_base": "2018-01-09T23:33:02Z", | |
"timestamp_areas_base": "2018-01-09T23:09:02Z", | |
"copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL." | |
}, | |
"elements": [ | |
{ |
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
" vim-plug | |
" Specify a directory for plugins | |
" - For Neovim: ~/.local/share/nvim/plugged | |
" - Avoid using standard Vim directory names like 'plugin' | |
if !has('nvim') | |
call plug#begin('~/.vim/plugged') | |
else | |
call plug#begin('~/.local/share/nvim/plugged') | |
endif |
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
import scipy.io | |
UNWANTED_KEYS = ('__globals__', '__header__', '__version__') | |
def load_dataset(path): | |
data = scipy.io.loadmat(path) | |
for key in UNWANTED_KEYS: | |
del data[key] |
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
<?php | |
/* from http://lists.osgeo.org/pipermail/openlayers-users/2010-June/017976.html */ | |
$conn_string = "host=localhost port=5432 | |
dbname=mydatabase_with_postgis_activated user=my_user password=my_password"; | |
$link = pg_connect($conn_string) or die("Could not connect"); | |
$start_epsg = 'Proj4js.defs["EPSG:'; | |
$end_epsg_start_proj4js = '"] = "'; | |
$end_proj4js ='";'; |
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
module.exports = function(Proj4js){ | |
Proj4js.defs["EPSG:3819"] = "+proj=longlat +ellps=bessel +towgs84=595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408 +no_defs"; | |
Proj4js.defs["EPSG:3821"] = "+proj=longlat +ellps=aust_SA +no_defs"; | |
Proj4js.defs["EPSG:3824"] = "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"; | |
Proj4js.defs["EPSG:3889"] = "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs"; | |
Proj4js.defs["EPSG:3906"] = "+proj=longlat +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +no_defs"; | |
Proj4js.defs["EPSG:4001"] = "+proj=longlat +ellps=airy +no_defs"; | |
Proj4js.defs["EPSG:4002"] = "+proj=longlat +ellps=mod_airy +no_defs"; | |
Proj4js.defs["EPSG:4003"] = "+proj=longlat +ellps=aust_SA +no_defs"; | |
Proj4js.defs["EPSG:4004"] = "+proj=longlat +ellps=bessel +no_defs"; |
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
# config/environments/development.rb | |
# current setting -- saves sent mails locally in rails_root/tmp/mails/ | |
config.action_mailer.delivery_method = :file | |
# OR... | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.smtp_settings = { | |
:enable_starttls_auto => true, | |
:address => "smtp.gmail.com", |
NewerOlder