Skip to content

Instantly share code, notes, and snippets.

View derhuerst's full-sized avatar

Jannis derhuerst

View GitHub Profile
@derhuerst
derhuerst / output.js
Created May 10, 2016 10:22
how fetch a GitHub user's stars
[
{
owner: 'bcoe',
repo: 'top-npm-users',
description: ':star: Generate a list of top npm users by based on monthly downloads.',
language: 'JavaScript',
isFork: false,
stargazers: 27,
watchers: 27
}
@derhuerst
derhuerst / _.md
Last active January 29, 2026 23:59
mapping between GTFS feed/agency_id and Wikidata entity

As proposed in Traewelling/line-colors#91.

To be deprecated in favor of a more scalable and sustainable approach (e.g. a shared repo).

@derhuerst
derhuerst / _.md
Last active January 28, 2026 10:54
curl-based HTTP mirroring script

curl-based HTTP mirroring script

This is a script that creatively uses the curl CLI to download an HTTP resource (colloquially "file"); It saves time & bandwidth whenever possible, but not at the expense of correctness.

  • Compares ETags to make sure that an unchanged resource is not transfered again, but a changed resource always is.
  • Requests a CE-coded (a.k.a. compressed, e.g. gzipped) representation of the resource, falling back to the "regular" one.
  • Supports continuation, using conditional requests, but in contrast to the -C - curl flag works with CE-coded responses, and falls back to a "full body" request.

People asked me: Why not use wget for this?

@derhuerst
derhuerst / 10-geekbench-6.md
Last active January 22, 2026 08:57
VPS price & performance comparison

Geekbench 6

product notes price (incl. VAT) dedic.? cores RAM SSD Yabs Geekbench ST Geekbench MT Geekbench version operating system date of benchmark
Hetzner CPX11 4,58€/m no 2 2GB 40GB - 1476/1496 2714/2732 Geekbench 6.3.0 Build 603408 (rosedale-main-build bca065a7d9) Ubuntu 22.04 2024-07-02
Hetzner CPX21 8,39€/m no 3 4GB 80GB - 1484/1474 3862/3792 Geekbench 6.3.0 Build 603408 (rosedale-main-build bca065a7d9) Ubuntu 22.04 2024-07-02
Hetzner CPX22 no IPv4
@derhuerst
derhuerst / how-to.md
Last active January 12, 2026 23:18
match GTFS-RT TripDescriptors using DuckDB

This uses gtfs-via-duckdb.

curl -fsSL \
  'https://mobility-api.mobility-database.fintraffic.fi/gtfs-realtime/v2/' \
  -H 'accept: application/protobuf' \
  -H "x-api-key: $api_key" \
  | ~/web/print-gtfs-rt-cli/cli.js -j \
  | duckdb -readonly -csv -f match.sql gtfs/fintraffic.gtfs.duckdb \
  | qsv select '!item' | head -n 10
@derhuerst
derhuerst / _.md
Last active January 4, 2026 11:54
List of HAFAS API Endpoints
@derhuerst
derhuerst / _.md
Last active December 17, 2025 16:03
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 / intro.md
Last active November 19, 2025 18:46
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.

@derhuerst
derhuerst / intro.md
Last active November 3, 2025 16:15
Installing Git on Linux, Mac OS X and Windows