Skip to content

Instantly share code, notes, and snippets.

View rodhfr's full-sized avatar
🎯
Focusing

Rodolfo Souza rodhfr

🎯
Focusing
View GitHub Profile
@rodhfr
rodhfr / podsync update yt-dlp
Created April 9, 2025 17:16
podsync update yt-dlp
docker exec -it podsync /usr/bin/youtube-dl -U
@rodhfr
rodhfr / x11vnc
Created April 18, 2025 05:51
x11vnc
x11vnc -display :0 -auth ~/.Xauthority -nopw -noshm -forever -ncache 10 -ncache_cr
mkdir -p converted
for f in *.mp4; do
ffmpeg -hwaccel qsv -i "$f" -c:v hevc_qsv -c:a copy "converted/${f%.mp4}_hevc.mp4"
done
{
"type": "AlertGroup",
"alerts": [
{
"type": "InventoryAlert",
"inventoryAlertType": "ITEM",
"itemName": "Coin Pouch",
"isRegexEnabled": false,
"itemQuantity": 55,
"quantityComparator": "GREATER_THAN_OR_EQUALS",
Copy of (1987) - Blind Chance [1080p] -> Blind Chance (1987)
(2008) - Martyrs [1080p] -> Martyrs (2008)
DRY RUN:
prename -n 's/^(Copy of )?\((\d{4})\) - (.+?)( \[[^\]]*\])*( \[[^\]]*\])*$/\3 (\2)/' *
ACTUAL:
prename 's/^(Copy of )?\((\d{4})\) - (.+?)( \[[^\]]*\])*( \[[^\]]*\])*$/\3 (\2)/' *
pandoc -o book.html *epub --embed-resources --standalone
ffmpeg -i *mkv 2>&1 | grep Subtitle
ffmpeg -i "input.mkv" 2>&1 | grep Subtitle
ffmpeg -i "input.mkv" -map 0:2 -c:s copy "subtitle.srt"
distrobox enter archbox -- cat /etc/os-release

Identify the drive UUID with lsblk

lsblk -f

NAME        FSTYPE FSVER LABEL   UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                  
└─sda1      xfs          largehd 88ec6f75-3a37-4608-842d-0151bda2d0b3  506.5G    46% /mnt/largehd
zram0                                                                                [SWAP]
nvme0n1                                                                              
├─nvme0n1p1 vfat FAT32 36FA-3464 579.4M 3% /boot/efi
import os
import subprocess
import re
import time
from tqdm import tqdm
def list_subtitle_tracks(filename):
cmd = ['mkvmerge', '-i', filename]
result = subprocess.run(cmd, capture_output=True, text=True)
tracks = []
# /home/rodhfr/.config/pipewire/pipewire.conf.d/snapcast.conf
context.modules = [
{ name = libpipewire-module-pipe-tunnel
args = {
node.name="snapcast"
tunnel.mode = sink
#tunnel.may-pause = true
# Set the pipe name to tunnel to
pipe.filename = "/tmp/snapfifo"
audio.format=S16LE