Skip to content

Instantly share code, notes, and snippets.

View Knusper's full-sized avatar
🚁
Working from a helicopter

E.C. Herenz Knusper

🚁
Working from a helicopter
View GitHub Profile
@user202729
user202729 / watching-mupdf.py
Last active September 30, 2025 08:35
watching-mupdf script: Wrapper around mupdf to allow automatically refreshing on file change, see also https://unix.stackexchange.com/questions/425907/how-to-make-mupdf-automatically-refresh-a-document
#!/bin/python3
from pathlib import Path
import sys
import argparse
parser=argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("filename", type=Path)
args=parser.parse_args()
if not args.filename.is_file():
@spirillen
spirillen / ffmpeg-add-subtitles.md
Last active November 22, 2025 20:27
Use FFmpeg to add subtitles to video

Use FFmpeg to add subtitles to video

MP4:

ffmpeg -i input.mp4 -f srt -i input.srt -map 0:0 -map 0:1 -map 1:0 -c:v copy \
    -c:a copy -c:s mov_text output.mp4

MKV:

@Zverik
Zverik / recursive_index.pl
Created August 31, 2012 16:14
Create index.html with a list of all files
#!/usr/bin/perl
# Create index.html with a list of all files.
# Written by Ilya Zverev, licensed WTFPL.
use strict;
use POSIX qw(strftime);
use HTML::Template;
use File::Basename;
use Getopt::Long;
@cqpx
cqpx / .Xdefaults
Created December 6, 2011 03:33
urxvt xterm zenburn theme
URxvt*termName: rxvt-256color
URxvt*xftAntialias: true
URxvt*background: #3f3f3f
URxvt*foreground: #dcdccc
URxvt*cursorColor: #aaaaaa
URxvt*colorUL: #366060
URxvt*underlineColor: #dfaf8f
URxvt*color0: #3f3f3f
URxvt*color1: #cc9393
URxvt*color2: #7f9f7f