Skip to content

Instantly share code, notes, and snippets.

### VIDEO ###
# see: https://mpv.io/manual/stable/#video-output-drivers
# see: https://mpv.io/manual/stable/#profiles
vo=gpu
profile=gpu-hq
# "Reduce stuttering caused by mismatches in the video fps and display refresh rate (also known as judder)."
interpolation
# see: https://mpv.io/manual/stable/#gpu-renderer-options
scale=ewa_lanczossharp
@bodziek666
bodziek666 / flexgetctl
Last active November 19, 2021 18:52
Manage Flexget daemon which is running inside a separated network namespace
#!/bin/bash
set -euo pipefail
NETNS="torrent"
FLEXGETDIR="/opt/flexget"
# sanity check
if [ $# -gt 1 ]; then
echo "Too many arguments"
@bodziek666
bodziek666 / bash_strict_mode.md
Created December 14, 2020 20:55 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o pipefail explanation

set -e, -u, -o pipefail

The "set" lines These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing. With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.

set -euo pipefail is short for:

set -e
set -u
version: '3'
services:
umurmur:
image: hetsh/umurmur:0.2.17-4
volumes:
# PERSISTENT DATA
- ./data:/etc/umurmur
- ./umurmur.conf:/etc/umurmur.conf:ro
# TIMEZONE
- /etc/localtime:/etc/localtime:ro
version: '3'
services:
murmur:
image: goofball222/murmur
container_name: murmur
restart: on-failure
volumes:
- /etc/localtime:/etc/localtime:ro
- ./cert:/opt/murmur/cert
- ./config:/opt/murmur/config
@bodziek666
bodziek666 / .bashrc
Created August 22, 2020 19:57 — forked from copperlight/.bashrc
Window Subsystem for Linux ssh-agent Configuraton
# ... more above ...
# wsfl bash is not a login shell
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
@bodziek666
bodziek666 / letsencrypt-murmur-hook.sh
Last active October 26, 2020 17:02
let's encrypt hook for reloading murmurd ssl certificates
#!/bin/bash
LETSENCRYPT_DIR="/etc/letsencrypt/live/mumble.domain.tld"
MUMBLE_CERT_DIR="/opt/docker/murmur/cert"
DOCKER_CONTAINER="murmur"
DOCKER_MUMBLE_UID=2137
DOCKER_MUMBLE_GID=2137
server {
listen 80;
server_name localhost;
location ~* ^/(?:lib|test|node_modules) {
deny all;
}
location ~* ^/(?:Procfile|README.md|package.json|package-lock.json)$ {
deny all;
@bodziek666
bodziek666 / kwin.sh
Last active July 30, 2022 21:35
systemd-sleep kwin hook
#!/bin/bash
#
# Restart kwin on resume after suspend
case "${1}" in
post)
KWIN_PID=$(pidof kwin)
KWIN_X11_PID=$(pidof kwin_x11)
@bodziek666
bodziek666 / oneliners.sh
Created January 26, 2019 00:04
list of useful oneliners
# mpv/media playback form bash
select $i in *.mkv; do mpv "${i}"; done