Skip to content

Instantly share code, notes, and snippets.

View zdila's full-sized avatar

Martin Ždila zdila

View GitHub Profile
@zdila
zdila / ciiozatd700e4axlztyxupsor.json
Last active January 20, 2016 17:23
Hiking Slovakia
{
"version": 8,
"name": "Hiking Slovakia",
"metadata": {
"mapbox:groups": {
"1444934828655.3389": {
"name": "Aeroways",
"collapsed": true
},
"1444933322393.2852": {
@zdila
zdila / map_of_gps_traces.txt
Created December 28, 2015 15:36
Map of GPS traces
# 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
@zdila
zdila / prechodene.html
Created December 28, 2015 13:53
Prechodene
<!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; }
@zdila
zdila / GSM_GPS.c
Last active August 26, 2017 16:01
SMS controlled GPS tracker
#include <TinyGPS++.h>
#include <AltSoftSerial.h>
AltSoftSerial altSerial;
TinyGPSPlus gps;
char line[256] = "";
int p = 0;