Skip to content

Instantly share code, notes, and snippets.

@D221
D221 / dcc.lua
Last active March 19, 2025 19:25
mpv Windows only script that uses MonitorConfig DDC to control monitor brightness using mpv keybindings
-- MPV Lua script to control monitor brightness using key bindings
--- This script utilizes the MonitorConfig PowerShell module , which can be installed using:
--- Install-Module MonitorConfig
--- https://github.com/MartinGC94/MonitorConfig
--- The script is designed to work with the primary monitor only.
-- Function to execute a PowerShell command and return the output
local function executePowerShell(command)
local result = mp.command_native({
name = "subprocess",
@D221
D221 / guide.md
Last active October 20, 2025 06:47
Touhou 8 (東方永夜抄 ~ Imperishable Night) installation with Minimal Input lag + english patches

Obtain ISO and patches for the game

https://www16.big.or.jp/~zun/html/th08dl.html

東方永夜抄 ~ Imperishable Night.iso
md5 F0C8B50089ED55BC1BCF1BC3E9614A68

eiya_update100a.exe
md5 3269D49D81EAFAE366BD6B2AEA4AE82D

eiya_update100a_100d.exe
@D221
D221 / twitch.py
Created February 21, 2025 00:40
twitch chat convert thing. TwitchDownloaderWPF to yt-dlp / chat-downloader like, for use on archive.ragtag.moe/player. not all badges are displayed, timestamp is little off
#!/usr/bin/env python3
import argparse
import json
import os
from collections import OrderedDict
from datetime import datetime
def parse_timestamp(timestamp_str):
"""
@D221
D221 / dyn_rotate.py
Last active January 15, 2024 19:40
dynamic video rotation / spin for TikTok etc using ffmpeg+ffprobe
import argparse
import json
import os
import subprocess
IMAGE_DIR = "./images/"
WEBM_DIR = "./mp4/"
TEMP_VIDEO = "./temp.mp4"
SEQUENCE_LIST = "./mylist.txt"
VIDEO_NAME = "./video.mp4"
import socks
import requests
import socket
import time
# example url for testing
url = "https://raw.githubusercontent.com/monosans/proxy-list/main/proxies_geolocation/socks5.txt"
response = requests.get(url) # retrieve data from the url
data = response.content.decode(