Skip to content

Instantly share code, notes, and snippets.

View weiland's full-sized avatar
🍫
🎓 && 💻 #GitHubDropICE

Pascal Weiland weiland

🍫
🎓 && 💻 #GitHubDropICE
View GitHub Profile
@weiland
weiland / flake.nix
Created October 8, 2023 12:50
Elixir nix flake (Elixir version 1.15; without postgres)
{
description = "Elixir development environment (atm mainly for macOS).";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
@weiland
weiland / readme.md
Created January 13, 2023 09:34
TikTok's TTS 🗣️

Request TikTok's TTS voices

Requirements

  • httpie
  • jq
  • TikTok Account

Run

@weiland
weiland / readme.md
Created September 24, 2022 14:03
ScotRailFreeWiFi
@weiland
weiland / readme.md
Last active February 10, 2024 07:41
EurostarTrainsWifi
@weiland
weiland / checkin_request.md
Last active April 20, 2023 06:25
KCI Bahn
curl 'https://fahrkarten.bahn.de/mobile/dbc/xs.go?' -X POST \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0' -H 'Accept: */*' \
-H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br' \
-H 'Referer: https://www.img-bahn.de/' -H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Origin: https://www.img-bahn.de' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: cross-site' \
--data-raw $'<?xml version="1.0" encoding="UTF-8"?>\n<rqorderdetails version="1.0"><rqheader tnr="1653325251391" ts="2022-05-23T19:00:51" l="de" v="19120000" os="KCI" app="KCI-Webservice"/><rqorder on="GCP344"/><authname tln="LeMe" csc="" cui=""/></rqorderdetails>'
// http://cdwifi.cz/portal/api/timetable/connexion/current?locale=en_GB
{
"id": 515,
"name": "IC 515 Pendolino",
"line": null,
"connexionTimes": [
{
"id": 353,
"timeArrival": null,
"timeDeparture": "2022-05-13T14:27:00+02:00",
@weiland
weiland / circulation.jsonc
Created April 27, 2022 10:02
wifi.normandie.fr in-train Wifi
// https://wifi.normandie.fr/router/api/train/circulation
{
"number": "3105",
"circulationCode": "66979ae819749c3a785adc4e657a3fbe",
"origin": {
"name": "Paris Saint-Lazare",
"code": "OCE87384008"
},
"destination": {
"name": "Le Havre",
// https://onboard.sbb.ch/api/v2/content?tag=versioned_flavour_config&tag=v3&lang=en&r=1649759266348&contentType=mpd
[
{
"id": "flavour_config_sbb_v3",
"contentType": "versioned_flavour_config",
"domain": [
"staging-auth.sbb.gomedia.io",
"sbb.mst.gonet",
"test-sbb.mst.gonet",
"sbb.stg.gonet",
@weiland
weiland / info.jsonc
Last active February 10, 2024 07:46
portalefrecce.it (InTrain Wifi 🇮🇹)
// https://www.portalefrecce.it/BobHttpLogger/status/train
// somtimes comes as XML or JSON
{
"BobStatus": {
"Train": {
"Id": "9653",
"Token": "IhRbCoYDMQDm0OVbZbIqXw==",
"MealStatus": "on"
}
}
@weiland
weiland / report-days.ts
Last active February 28, 2022 17:39
Report working days (wednesdays and fridays) for a month
#!/usr/bin/env -S deno run --allow-run --quiet
// Collect 5 complete days from the last working month for reporting.
// Everything this or higher adresses the current month.
const MIN_DAY = 27;
const WORK_DAYS:Array<number> = [3, 5]; // ['Wendnesday', 'Friday']
const JANUARY = 0;
const DECEMBER = 11;
const MAX_DAYS = 31;