Skip to content

Instantly share code, notes, and snippets.

View xarblu's full-sized avatar
🏳️‍🌈
:3

Xarblu xarblu

🏳️‍🌈
:3
View GitHub Profile
@xarblu
xarblu / movenc.sh
Created March 16, 2024 16:19
FFMPEG Movie Encode Script
#!/usr/bin/env bash
# Usage:
# movenc.sh <infile> [<outfile>]
#
# User variables/args:
# CROP - ffmpeg crop filter of format xx:xx:xx:xx
# ASTREAMS - ffmpeg audio stream
# SSTREAMS - ffmpeg subtitle stream
# TUNE - x264 tune
@xarblu
xarblu / 12-dns-dot-resolved.sh
Created December 14, 2023 21:29
A cheap "Android Private DNS" for systemd-resolved and NetworkManager. Resolves your DoT host and then sets it via resolvectl. Triggered by NM-dispatcher "up" action.
#!/usr/bin/env bash
# dns host to connect over DoT to
DNS_HOST="example.host.com"
INTERFACE="$1"
case $NM_DISPATCHER_ACTION in
# set dns
up)
# wait for connection to be fully up (e.g. NM configuring resolved)
@xarblu
xarblu / mush.c
Created November 7, 2023 19:09
mush - the Memory Unsafe SHell
/**
* mush - the Memory Unsafe SHell
* a crappy shell written in dirty C
*
* A couple words from the dev:
* "I hate this"
* "it can run commands"
* "wow this thing can't even cd"
**/
@xarblu
xarblu / mpv-yt-thumbnail-as-cover-art.lua
Last active January 16, 2025 20:33
A very simple script for mpv that allows playing YouTube audio while displaying the videos thumbnail.
--Very simple mpv script that disables video on YouTube videos
--and instead shows the video thumbnail.
--Because there is no toggle for this I recommend only calling
--the script via the "--scripts-append" flag unless you always
--want to just see video thumbnails.
--Set this to 1 if you use Windows
windows = 0
function thumbnail_as_cover()