Skip to content

Instantly share code, notes, and snippets.

Avatar

Jannis R derhuerst

View GitHub Profile
@derhuerst
derhuerst / _.sh
Created Jan 19, 2022
build CoreDNS with a plugin
View _.sh
#!/bin/bash
set -e
set -o pipefail
cd "$(dirname $(realpath $0))"
set -x
# update Go
# https://www.vultr.com/docs/install-the-latest-version-of-golang-on-ubuntu
# todo: determine latest version automatically
@derhuerst
derhuerst / _.sh
Created Jan 19, 2022
make Certbot/Let's Encrypt certificates available to other tools
View _.sh
#!/bin/bash
set -e
set -o pipefail
# install & configure Certbot…
# make /etc/letsencrypt accessible to ssl-cert group
chgrp -R ssl-cert /etc/letsencrypt
find /etc/letsencrypt -exec chmod g+r "{}" \;
@derhuerst
derhuerst / package.json
Last active Jan 6, 2022
persisted, idempotent & timed queue of async functions
View package.json
{
"private": true,
"name": "persisted-idempotent-timed-promise-queue",
"description": "persisted, idempotent & timed queue of async functions",
"version": "2.0.0",
"main": "persisted-idempotent-timed-queue.js",
"author": "Jannis R <mail@jannisr.de>",
"license": "ISC",
"engines": {
"node": ">=14"
@derhuerst
derhuerst / 0-readme.md
Last active Oct 19, 2021
HAFAS-subscription-based cloud storage
View 0-readme.md

HAFAS's subscription feature has a flaw: It lets you store arbitrary data. Let's make a cloud storage API from this!

@derhuerst
derhuerst / 1-create-subscription-user.http
Created Oct 19, 2021
INSA Young HAFAS iOS app: subscription requests
View 1-create-subscription-user.http
POST /bin/mgate.exe HTTP/1.1
Host: reiseauskunft.insa.de
Content-Type: application/json
Connection: keep-alive
Accept: */*
User-Agent: insayoung/2.1.1 (iPhone; iOS 14.8; Scale/3.00)
Accept-Language: en-DE;q=1, de-DE;q=0.9
Content-Length: 548
Accept-Encoding: gzip, deflate, br
@derhuerst
derhuerst / list.md
Last active Jun 24, 2022
VPS price & performance comparison
View list.md
product price cores RAM SSD Geekbench 5 ST Geekbench 5 MT date of benchmark
Hetzner CPX11 4,75€/m 2 2GB 40GB 869/856 1631/1626 2021-10-03
Hetzner CX21 5,83€/m 2 4GB 40GB 729/727 1422/1421 2021-10-03
Hetzner CPX21 8,21€/m 3 4GB 80GB 1006/953 2690/2670 2021-10-05
Scaleway Stardust1-s 2,14€/m 1 1GB 10GB [565](https://browser.geek
@derhuerst
derhuerst / _.md
Last active Aug 2, 2021
parse Power BI's querydata JSON API responses using JavaScript
@derhuerst
derhuerst / talk.txt
Created Jun 2, 2021
Berlin/Hamburg GTFS-Realtime talk
View talk.txt
realtime data in public transport
cancellations
delays
positions
notices/warnings
why?
without it, public transport doesn't feel reliable enough
long-term: frustration accumulates, people stop using it (if they have the choice)
why not?! part of service: A->B, on time, reliably, comfortably
existing (legacy) APIs
@derhuerst
derhuerst / 1-locmatch.http
Created Feb 12, 2021
ÖBB Scotty HAFAS iOS app requests
View 1-locmatch.http
POST /bin/mgate.exe?mic=f2ba9aacd5df701b65c782a1a90a8d8d&mac=e97cec963fced24ef681859165a1d4aa HTTP/1.1
Host: fahrplan.oebb.at
Content-Type: application/json
Connection: keep-alive
Accept: */*
User-Agent: oebbPROD-ADHOC/6.3.6 (iPhone; iOS 14.3; Scale/3.00)
Accept-Language: en-DE;q=1, de-DE;q=0.9
Content-Length: 268
Accept-Encoding: gzip, deflate, br