Skip to content

Instantly share code, notes, and snippets.

@laufhannes
laufhannes / Runalyze_api.js
Created July 3, 2025 12:02
Scriptable widget for Runalyze statistics
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-blue; icon-glyph: magic;
// For API details, see https://runalyze.com/doc/api/supporter#/Current%20Statistics/api_v1statisticscurrent_get
// Read access for current statistics requires Supporter or Premium level
// You need to set your API token as widget parameter or in line 62
async function getImage(image, vImageURL) {
let fm = FileManager.iCloud()
@laufhannes
laufhannes / SRTM1ArcSecondProvider.php
Created June 7, 2017 13:29
DEM provider for SRTM 1 arc second files
<?php
/*
* This file is part of the Runalyze DEM Reader.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
@laufhannes
laufhannes / hill-score-datasets.js
Created June 6, 2017 06:40
Some datasets for Hill Score examples
function getMoreDataSets() {
return {
"Rheinsteig": [[0,116.8],[133.4,119.8],[215.6,124.4],[338.4,129.6],[497,135.6],[658,139.6],[847,143],[1023.8,145.6],[1211.7,145],[1408.7,146],[1560.8,147.8],[1708.9,147.8],[1915.4,148.6],[2048.2,148],[2175.3,148.2],[2296.6,151.2],[2436,154.8],[2565,159.6],[2616.3,163.8],[2764.3,167.6],[2913.8,176.2],[3063.1,183],[3237.8,188.2],[3364.9,187.6],[3521.5,188],[3684.7,192.8],[3881.8,188],[4017.4,191.2],[4061.9,190.2],[4187.8,186.4],[4336.6,179],[4475.2,175.6],[4538,181.4],[4557,188.2],[4585.8,194.8],[4746.9,197.4],[4921.1,203.8],[5089.7,210.4],[5237.2,212.8],[5384.7,213.6],[5493.4,210.8],[5555.5,217.6],[5713.9,227.6],[5866,235.2],[6033,240.6],[6167,240.2],[6308.4,237.2],[6500.9,232.6],[6658.4,226.2],[6762.6,231.8],[6835.5,240],[6945.3,248.4],[7052.7,254.4],[7172.5,264.6],[7291.8,272.8],[7369.4,279.6],[7499.1,286.2],[7568.4,292.8],[7705.4,290.6],[7849.6,294.4],[7996.4,304.8],[8123.3,314],[8237.7,324.2],[8416.1,326.6],[8539.2,336],[8655.8,346],[8745,354.8],[8862.4,3
@laufhannes
laufhannes / runalyze-docs-on-cloud9.md
Created July 25, 2016 07:23
Runalyze docs on Cloud9

Set up Runalyze docs on Cloud9

Create a workspace with the desired repository and run

sudo pip install sphinx sphinx-autobuild
sudo pip install recommonmark
sudo pip install sphinx_rtd_theme

To build the docs:

@laufhannes
laufhannes / runalyze-on-cloud9.md
Last active November 8, 2018 15:39
Runalyze on Cloud9

Set up for Runalyze on Cloud9

Switch to php7 via https://community.c9.io/t/how-to-upgrade-to-php7/1379

sudo apt-get update
sudo apt-get install libmcrypt-dev
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
sudo mv phpbrew /usr/local/bin/
phpbrew init