library(tidyverse)
# 1 -----------------------------------------------------------------------
# a: 142
x <- read_lines(
"1abc2
pqr3stu8vwx
a1b2c3d4e5f
treb7uchet
")
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
let gpx = `<?xml version="1.0" encoding="utf-8"?> | |
<gpx xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xmlns="http://www.topografix.com/GPX/1/1"> | |
`; | |
document.querySelectorAll("div.waypoint_item div.fl0.fs0").forEach(poi => { | |
let descr = poi.querySelector(".columns-header").innerText.trim(); | |
let [poi_match,poi_lat,poi_lon,poi_elev,poi_date,poi_time] = poi.querySelector(".columns-para").innerText.trim().match(/([\d.]+), ([\d.]+) ([\d.]+ m )?([\d.]+) ([\d:]+)/); | |
let [d_match,d,m,y] = poi_date.match(/(\d+)\.(\d+)\.(\d+)/) | |
let [t_match,hh,mm] = poi_time.match(/(\d+):(\d+)/); | |
let poi_datetime = new Date(y,m - 1,d,hh,mm); |
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
<TMS> | |
<Layer idx="0"> | |
<Title>Maa-amet - Eesti kaart</Title> | |
<Script><![CDATA[(function convert(z1,x1,y1){ y=(1<<z1)-1-y1;return "http://tiles.maaamet.ee/tm/tms/1.0.0/kaart@GMC/" + z1 + "/" + x1 + "/" + y + ".png&ASUTUS=MAAAMET&KESKKOND=LIVE&IS=TMSNAIDE";})]]> | |
</Script> | |
</Layer> | |
<Layer idx="1"> | |
<Title>Maa-amet - Ortofoto</Title> | |
<Script><![CDATA[(function convert(z1,x1,y1){ y=(1<<z1)-1-y1;return "http://tiles.maaamet.ee/tm/tms/1.0.0/foto@GMC/" + z1 + "/" + x1 + "/" + y + ".png&ASUTUS=MAAAMET&KESKKOND=LIVE&IS=TMSNAIDE";})]]> | |
</Script> |
Random js snippets for Chrome dev tools
Bookmarklet for adding Export FIT links to SportsTracker Dashboard - https://www.sports-tracker.com/dashboard
As of time writing, those files happen to have the same content that Suunto App backend is sending to 3rd party services like Strava & TrainingPeaks
Bookmarklet link can be found here - https://gistcdn.githack.com/marguslt/b0ee7e88960b2d03de2da62a44233893/raw/bookmarklet-link.html
javascript:(function(){
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
document.querySelector("#moveCharts-chart > div > svg > g.highcharts-series-group > g:nth-child(3) > path").style.stroke="#aa0000"; | |
document.querySelector("#moveCharts-chart > div > svg > g.highcharts-series-group > g:nth-child(5) > path").style.stroke="#00aa00"; |
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
/* | |
Own variables: | |
WorkCycleLength = 25 | |
BreakCycleLength = 5 | |
While in sport mode do this once per second | |
*/ | |
if (Suunto.mod(SUUNTO_LAP_NUMBER,2) != 0) { | |
prefix = "W"; | |
RESULT = 60 * WorkCycleLength - SUUNTO_LAP_DURATION; |