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
const widget = new ListWidget() | |
const request = new Request('https://iceportal.de/api1/rs/status') | |
// {"connection":true,"serviceLevel":"AVAILABLE_SERVICE","gpsStatus":"LAST_KNOWN_POSITION","internet":"MIDDLE","latitude":50.9862425,"longitude":9.572488166666666,"tileY":109,"tileX":-2,"series":"412","serverTime":1704210660163,"speed":189.0,"trainType":"ICE","tzn":"ICE9474","wagonClass":"FIRST","connectivity":{"currentState":"HIGH","nextState":"UNSTABLE","remainingTimeSeconds":4800},"bapInstalled":true} | |
const json = await request.loadJSON() | |
const { speed } = json | |
widget.addText(speed?.toLocaleString('de', { | |
style: 'unit', | |
unit: 'kilometer-per-hour' | |
})) |
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
javascript:(function(){ var patharray=location.pathname.split('/');var mapurl='https://raw.githubusercontent.com/MichaelKreil/rc3-map-scraper/master/image/https___' + patharray.slice(-1*(patharray.length-patharray.indexOf('global')-1)).join('_').replaceAll('.','_') + '.png';if(!patharray.includes('lobby')){mapurl=mapurl.replace('rc3_world_','rc3_world__')}window.open(mapurl)})(); |
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
// You can use the entire C/C++ standard library, just add the relevant | |
// #includes. We recommend math.h ;-) | |
#include <algorithm> | |
#include <string> | |
#include "usercode.h" | |
/* | |
* This is your bot's startup function. Here you can set your snake's colors, | |
* set up persistent variables, etc. | |
*/ |
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
<?php | |
/* | |
original code by cogitom: https://gist.github.com/997980/ | |
This script reads future events (plus several days into the past) from Facebook pages | |
and creates a subscribable iCalendar | |
Improvements upon the original version: | |
- fixed start and endtime reading | |
- timezone adjustment done on facebook's side (more reliable) |