Skip to content

Instantly share code, notes, and snippets.

View derhuerst's full-sized avatar

Jannis R derhuerst

View GitHub Profile
@derhuerst
derhuerst / train-routes-3943.http
Created September 4, 2025 21:29
SJ (Swedish Railways) live journey/trip information API
GET /public/trafficinfo-api/v2/rest/train-routes?transportId=3943&lang=en-GB&date=2025-09-03 HTTP/3
Host: prod-api.adp.sj.se
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:141.0) Gecko/20100101 Firefox/141.0
Accept: */*
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Referer: https://www.sj.se/
ocp-apim-subscription-key: 39296c1a13304493b44236e1bcb7f544
request-id: |cebb240828a34cf59a9bb7df6302e49b.14c2fddb78834d96
traceparent: 00-cebb240828a34cf59a9bb7df6302e49b-14c2fddb78834d96-01
@derhuerst
derhuerst / 01-lines.http
Created August 26, 2025 20:05
Vy Bus4You live tracking API
GET /api/buslocation/FetchBusLines HTTP/2
Host: www.vybuss.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:141.0) Gecko/20100101 Firefox/141.0
Accept: application/json, text/plain, */*
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Connection: keep-alive
Referer: https://www.vybuss.com/traffic-information/
Cookie: ASP.NET_SessionId=pduk1iwtt3wabugauungkoob; __RequestVerificationToken=YAQMK7HMvCbpzZTsSaSyhqynJeydctGMyyf8nG2ZCaDN2rtAS1L7F3Yl8wCFGDhzE4HT8AG-nucy7_kHFqQMp8zYoBk1
Sec-Fetch-Dest: empty
@derhuerst
derhuerst / notes.md
Created May 28, 2025 19:27
Vortrag VBB-GTFS-RT 2025-05-28

intro

  • Jannis: selbstständiger Software-Engineer
  • VBB: Verkehrsverbund Berlin/Brandenburg, recht groß, einige wenige und viele kleine VUs
  • GTFS-RT-Feed

Problem

@derhuerst
derhuerst / komoot-gpx.js
Created April 19, 2025 23:11
Komoot route to GPX conversion
const t0 = Date.parse('2025-04-20T13:00+02:00')
const waypoints = kmtBoot.getProps().page.store.moc['//api.komoot.de/v007/discover_tours/11959690']._coordsGenerate()[0]
process.stdout.write(`\
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" xmlns="http://www.topografix.com/GPX/1/1">
<metadata>
<name>tour</name>
</metadata>
<trk>
@derhuerst
derhuerst / cheese-grater.py
Created February 4, 2025 22:42
cheese grater pattern in build123d
import logging
import math
from build123d import *
logging.basicConfig(level=logging.WARN)
from yacv_server import show
# %%
hole_diameter = 20
board_x, board_y = 400, 120
@derhuerst
derhuerst / _.md
Created September 12, 2024 11:43
Acer Predator XB283K KV monitor review

Acer Predator XB283K KV monitor review

pro

  • as of late 2023, for 500€, good value!
  • refresh rates >60hz are amazing, i’m hooked now! – why aren’t there slightly cheaper 90hz monitors for office work?
  • for a gaming monitor (🙄), it looks quite okay

contra

@derhuerst
derhuerst / 01-validate.sh
Created September 9, 2024 18:56
Flixbus/Flix booking number validation HTTP call
curl 'https://help.flixbus.com/s/sfsites/aura?r=18&other.CSPaxUtilities.checkBookingNumber=1' \
-X 'POST' \
-H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' \
-H 'Accept: */*' \
-H 'Accept-Language: en-GB,en;q=0.9' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15' \
--data 'message=%7B%22actions%22%3A%5B%7B%22id%22%3A%22273%3Ba%22%2C%22descriptor%22%3A%22apex%3A%2F%2FCSPaxUtilities%2FACTION%24checkBookingNumber%22%2C%22callingDescriptor%22%3A%22markup%3A%2F%2Fc%3Acs_pax_feedbackForm%22%2C%22params%22%3A%7B%22bookingNumber%22%3A%223192968124%22%7D%7D%5D%7D&aura.context=%7B%22mode%22%3A%22PROD%22%2C%22fwuid%22%3A%22eGx3MHlRT1lEMUpQaWVxbGRUM1h0Z2hZX25NdHFVdGpDN3BnWlROY1ZGT3cyNTAuOC40LTYuNC41%22%2C%22app%22%3A%22siteforce%3AcommunityApp%22%2C%22loaded%22%3A%7B%22APPLICATION%40markup%3A%2F%2Fsiteforce%3AcommunityApp%22%3A%22wi0I2YUoyrm6Lo80fhxdzA%22%2C%22MODULE%40markup
@derhuerst
derhuerst / _.md
Created August 29, 2024 07:43
Trangia global fuel list
@derhuerst
derhuerst / _.md
Created August 21, 2024 21:18
historical VBB (Berlin/Brandenburg) GTFS datasets
@derhuerst
derhuerst / 01-location.name.http
Created August 13, 2024 00:01
ZVV iOS v2.2.1 HTTP requests
POST https://fpbe.zvv.ch/restproxy/location.name HTTP/2.0
content-type: application/x-www-form-urlencoded; charset=utf-8
accept: application/json
baggage: sentry-environment=prod,sentry-public_key=ff852a2ea3aa4350b43626abc027b8f2,sentry-release=ch.zvv.app%402.2.1%2B2,sentry-trace_id=4283b63db8e74a65b25d054abc5902a9
authorization: Basic Og==
accept-language: en-GB,en;q=0.9
accept-encoding: gzip, deflate
sentry-trace: 4283b63db8e74a65b25d054abc5902a9-0de6a46a665a4982-0
content-length: 65
user-agent: ZVVOneApp/2 CFNetwork/1498.700.2 Darwin/23.6.0