Skip to content

Instantly share code, notes, and snippets.

@ftk
ftk / Cargo.toml
Last active April 23, 2025 14:48
http mitm proxy. Simple http proxy to modify Range: http headers. Can be used to speed up youtube in mpv
# To generate mitm cert and key:
# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:"third-wheel" -subj "/C=US/ST=private/L=province/O=city/CN=hostname.example.com"
# see: https://github.com/campbellC/third-wheel
[package]
name = "http-ytproxy"
version = "0.1.0"
edition = "2021"
@karolba
karolba / libc-minumum-supported-linux-versions.md
Last active March 18, 2024 07:41
(GNU/)Linux distributions and their minimum kernel versions supported by their libc

glibc-based systems

The minimum kernel version can be configured by passing in the --enable-kernel parameter to glibc's configure script.

  1. Arch Linux - Linux 4.4 (release year: 2016)
...
--enable-kernel=4.4
...
@haasn
haasn / image.lua
Last active May 21, 2024 21:54
mvi - set of configuration for turning mpv into an image viewer
-- Allow changing a property with by zoom-adjusted amount
function zoom_invariant_add(prop, amt)
amt = amt / 2 ^ mp.get_property_number("video-zoom")
mp.set_property_number(prop, mp.get_property_number(prop) + amt)
end
-- Resets the pan if the entire image would be visible
function zoom_check_center()
local zoom = mp.get_property_number("video-zoom")
local rot = mp.get_property_number("video-rotate") * math.pi / 180