Skip to content

Instantly share code, notes, and snippets.

@sk22
sk22 / oebb-db640-codes-2024.csv
Last active July 20, 2023 16:34
DB 640 Betriebsstellen-Codes (laut ÖBB DA 30.04.21). Quelle: ÖBB SNNB 2024, Anhang "Verzeichnis der Verkehrsstationen / Station register": https://infrastruktur.oebb.at/de/geschaeftspartner/schienennetz/snnb/snnb-2024/snnb-2024-anhaenge/verzeichnis-der-verkehrsstationen-excel
Verkehrsstation BST Code
Abfaltersbach Abf H1
Absdorf-Hippersdorf Ah
Achau Ach
Achenlohe Nst H4H
Achleitnersiedlung Puw H1A
Admont Ad
Aich im Jauntal Spa H3
Aich-Assach Grb H2
Aigen-Schlägl Ai
@sk22
sk22 / .bashrc
Created April 19, 2023 18:32
sl alias for ls
# ...
function sl { echo -ne '\033[1A'; echo ${(%%)PS1}ls; ls }
# ...
@sk22
sk22 / philipp.regex
Created March 11, 2023 20:15
regular expression to find all the phillips
/(ph?|f)(i|e)l(l?i(pp?|b)(e|o)?)?/gi
@sk22
sk22 / webcam.desktop
Created July 8, 2022 20:43
Minimal webcam desktop entry opening a borderless MPV window showing your webcam
[Desktop Entry]
Name=Webcam
Exec=mpv /dev/video0 --profile=low-latency --untimed --no-osc --no-border
Icon=cheese
StartupNotify=false
StartupWMClass=mpv
Terminal=false
Type=Application
Categories=AudioVideo;Player;Audio;
# you can also use bash tricks like
# `wget https://blabla/manifest_blabla_296221{1..9}`
# and use cool editors like visual studio code to edit multiple lines
# at the same time to avoid wasting time
wget https://orf2.mdn.ors.at/out/u/orf2/qxb/manifest_video_1_5_init.mp4
wget https://orf2.mdn.ors.at/out/u/orf2/qxb/manifest_video_1_5_2962209.mp4
wget https://orf2.mdn.ors.at/out/u/orf2/qxb/manifest_video_1_5_2962210.mp4
wget https://orf2.mdn.ors.at/out/u/orf2/qxb/manifest_video_1_5_2962211.mp4
wget https://orf2.mdn.ors.at/out/u/orf2/qxb/manifest_video_1_5_2962212.mp4
@sk22
sk22 / etc_gerbera_config.xml
Last active March 16, 2022 00:28
gerbera as an upnp-av/dlna server for web radio stations with nginx proxying https streams over http :)
<?xml version="1.0" encoding="UTF-8"?>
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
<!--
See http://gerbera.io or read the docs for more
information on creating and using config.xml configuration files.
-->
<!-- ... -->
<import hidden-files="no">
<scripting script-charset="UTF-8">
<common-script>/usr/share/gerbera/js/common.js</common-script>
@sk22
sk22 / jellyfin-custom.css
Last active May 26, 2021 12:38
custom css for jellyfin. no more accidental full volume on touch
.layout-mobile .volumecontrol .nowPlayingVolumeSliderContainer {
visibility: hidden;
opacity: 0;
transform: scale(0.9);
transition: opacity 0.3s ease;
transition-property: opacity, transform;
position: fixed;
top: 50vh;
left: 0;
width: 60%;
@sk22
sk22 / make-web-app
Last active May 18, 2021 09:52
make firefox web app profiles based on profile "webapp.template" with installed firefox-gnome-theme (https://github.com/rafaelmardojai/firefox-gnome-theme)
#!/bin/bash
PROFILES=$HOME/.mozilla/firefox
TEMPLATE_DIR=$PROFILES/webapp.template
usage() {
cat << EOF
make-web-app
-n name (e.g. twitter, used as profile name and wm class webapp.twitter)
-t title (e.g. Twitter)
@sk22
sk22 / twitter-quick-delete-bookmarklet.js
Created May 4, 2021 11:37
run this script on twitter web, click the "more" button and watch the tweet disappear
document.querySelectorAll('div[aria-label="More"]').forEach(more => more.addEventListener('click', () => {
setTimeout(() => document.querySelectorAll('div[role="menuitem"][tabindex="0"]')[0].click(), 250)
setTimeout(() => document.querySelector('[data-testid="confirmationSheetConfirm"]').click(), 500)
}))
@sk22
sk22 / imgs2pdf.bat
Last active April 14, 2021 13:10
wrapper script for img2pdf to facilitate creating a pdf by simply dragging and dropping the file list
@echo off
rem make sure to install python3 and "pip install img2pdf" before using this script
echo creating pdf from files:
echo.
echo %*
img2pdf -o %1.pdf %*
echo.
echo saved as %1.pdf
echo.