Skip to content

Instantly share code, notes, and snippets.

View Grub4K's full-sized avatar

Simon Sawicki Grub4K

  • Idstein, Germany
  • 11:23 (UTC +02:00)
  • X @Grub4K
View GitHub Profile
@Grub4K
Grub4K / progress_rate.py
Created January 27, 2024 10:33
Fixed update, configurable progress rate as a plugin
import functools
import time
from threading import Lock
from yt_dlp.downloader.common import FileDownloader
# Configure update delay here, in nanoseconds
UPDATE_DELAY_NS = 1_000_000_000
@Grub4K
Grub4K / snotify
Last active August 8, 2023 07:13
Small bash notification panel helper
#!/usr/bin/env bash
show_help() {
cat << EOF
${1}
USAGE:
snotify log [MODULE] MESSAGE
Log a message to the notifications panel
snotify enable [HEIGHT]
@Grub4K
Grub4K / dw_intro.py
Created August 6, 2022 17:32
Doctor Who audio synced intro
import subprocess
from collections import namedtuple
from pathlib import Path
Timewarp = namedtuple("Timewarp", ["start", "end", "rate"])
def font_filter(stream: str, text: str):
return ":".join(
[
@Grub4K
Grub4K / input.bat
Last active May 13, 2023 20:47
Advanced user input in batch [using xcopy]
@echo off
setlocal enableDelayedExpansion
:::::
:: Advanced user input in batch [using xcopy]
:: Fetch result using for /f from main
:::::
set "prompt="
:: the input prompt
set "symbol="
:: the symbol that displays instead