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.12.2/mapbox-gl.js'></script> | |
| <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.2/mapbox-gl.css' rel='stylesheet' /> | |
| <style> | |
| body { margin:0; padding: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
| # download list | |
| curl -u '*Martin*:****' http://api.openstreetmap.org/api/0.6/user/gpx_files > list.xml | |
| # download the traces not containing " by " in the description | |
| for id in `xmlstarlet sel -t -m "//gpx_file/description[not(contains(., ' by '))]/.." -v @id -nl list.xml`; do echo $id; curl -u '*Martin*:****' http://api.openstreetmap.org/api/0.6/gpx/$id/data > $id.gpx; done | |
| # merge traces | |
| gpsbabel -i gpx $(for GPX in *.gpx; do echo -n " -f $GPX "; done) -o gpx -F merged.gpx | |
| # simplify merged trace |
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": 8, | |
| "name": "Hiking Slovakia", | |
| "metadata": { | |
| "mapbox:groups": { | |
| "1444934828655.3389": { | |
| "name": "Aeroways", | |
| "collapsed": true | |
| }, | |
| "1444933322393.2852": { |
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
| // export NODE_PATH=/usr/local/lib/node_modules | |
| // https://overpass-turbo.eu/ | |
| // [out:json]; | |
| // relation(area:3600014296)[route=bicycle]({{bbox}}); | |
| // out body; | |
| // >; | |
| // out skel qt; | |
| var fs = require('fs'); |
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
| osmosis --rb austria-latest.osm.pbf --rb czech-republic-latest.osm.pbf --rb hungary-latest.osm.pbf --rb poland-latest.osm.pbf --rb slovakia-latest.osm.pbf --rb ukraine-latest.osm.pbf --merge --merge --merge merge --m --bp file="../slovakia-extrude.poly" clipIncompleteEntities=true --wb file="slovakia-extrude.osm.pbf" omitmetadata=true | |
| osmosis --rb austria-latest.osm.pbf --rb czech-republic-latest.osm.pbf --rb hungary-latest.osm.pbf --rb poland-latest.osm.pbf --rb slovakia-latest.osm.pbf --rb ukraine-latest.osm.pbf --merge --merge --merge --merge --m --bb left=16.6346 bottom=47.5438 right=22.7748 top=49.7483 clipIncompleteEntities=true --wb file="slovakia-extrude.osm.pbf" omitmetadata=true | |
| as pg root: | |
| CREATE EXTENSION hstore; | |
| CREATE EXTENSION postgis; | |
| -- drop TABLE ways, way_nodes, relation_members, relations, nodes, users; |
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
| rsync -av --progress 2015-12* 2016* /home/martin/1 --exclude *.JPG --exclude *.MOV --exclude *.jpg --exclude *.bin --exclude *.pto | |
| cat *.NMA > merged.NMA && gpsbabel -i nmea -f merged.NMA -o gpx -F skm53.gpx && rm *.NMA |
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
| // overpass query: | |
| /* | |
| [out:xml][timeout:250]; | |
| ( | |
| relation[route="hiking"][colour="yellow"]["operator"="KST"]; | |
| ); | |
| (._;>;); | |
| out meta; | |
| */ |
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
| void setup() { | |
| pinMode(3, OUTPUT); | |
| pinMode(4, OUTPUT); | |
| } | |
| void loop() { | |
| long m = millis(); | |
| tone(8, (1.0 + sin(m / 250.0)) * 300 + 1200); | |
| int x = m % 800; |
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
| #include <TinyGPS++.h> | |
| #include <AltSoftSerial.h> | |
| AltSoftSerial altSerial; | |
| TinyGPSPlus gps; | |
| char line[256] = ""; | |
| int p = 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
| #include <avr/sleep.h> | |
| volatile unsigned long count = 0L; | |
| unsigned long lastClosed = 0L; | |
| int sensorPin = 0; | |
| int buzzPin = 1; | |
| ISR(WDT_vect) { | |
| count++; |
OlderNewer