Skip to content

Instantly share code, notes, and snippets.

View autosave.lua
-- autosave.lua
-- Periodically saves "watch later" data during playback, rather than only saving on quit.
-- This lets you easily recover your position in the case of an ungraceful shutdown of mpv (crash, power failure, etc.).
-- You can configure the save period by creating a "lua-settings" directory inside your mpv configuration directory.
-- Inside the "lua-settings" directory, create a file named "autosave.conf".
-- The save period can be set like so:
-- save_period=60
oldherl / github-oldherl.css
Last active Jun 26, 2020
Userstyle to fix the new Github theme
View github-oldherl.css
@-moz-document domain("") {
/* no round avatars */
.avatar-user {
border-radius: 0 !important;
/* only slightly round buttons */
.btn {
border-radius: 2px;
olejorgenb / copy-permalink.lua
Last active Apr 24, 2021
mpv user script: copy a command that will resume video at current position
View copy-permalink.lua
tayfie /
Created Mar 14, 2017
how to scrape images from 4chan using wget

How To Scrape Images from 4chan Using Wget

This guide is to save other sorry plebs from needing to RTFM in figuring out how to use wget to scrape images from 4chan and other imageboards. There are lots of image downloaders in existence, but they are usually outdated and broken. You will save time following this guide to learn how to use a powerful and general purpose tool instead.

What Is Wget?

Wget is a command-line file downloader that can handle just about any file downloading task normal and power users will ever need to do. It has versions available for Windows, Mac, and Linux. If it is not already installed on your machine, install it now.

Basic syntax

View post-install_win10.ps1
# Important note: this enables REMOTE DESKTOP! Use good passwords!
## function definitions
function Set-Reg($key, $name, $value, $type) {
If (-Not (Test-Path "$key")) {
New-Item -Path "$key" -ItemType RegistryKey -Force | Out-Null
if ($type -eq $null) {
Set-ItemProperty -path "$key" -Name "$name" -Value $value
} else {
MrYar / Firefox-68
Last active Oct 14, 2021 — forked from haasn/
Firefox telemetry and spy removal
View Firefox-68
// Turn off "Sends data to servers when leaving pages"
user_pref("beacon.enabled", false);
// Prevention of some telemetry related to the newtab
user_pref("", "");
user_pref("", "");
user_pref("browser.newtabpage.enhanced", false);
// "In the release channels the Mozilla location service is used to help in figuring out regional search defaults."
// Which means sending collectable data
IntergalacticApps / make_windows10_great_again.bat
Last active Jan 3, 2022
Make Windows 10 Great Again - stop Windows 10 spying!
View make_windows10_great_again.bat
@echo off
setlocal EnableDelayedExpansion
ver | find "10." > nul
if errorlevel 1 (
echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
programus /
Last active Oct 15, 2020
Extended windows cd command

CDX Command - CD eXtension batch file

This is a batch file could help you change working directory easier especially you need to change many directories very often like me.


  • Save histroy of all navigated directories
  • No duplicated directories in histroy
  • Name history directories
  • Jump into any directory in histroy by index or name
  • Quich jump into previous directory
  • Maintain history list
haasn / image.lua
Last active Nov 11, 2021
mvi - set of configuration for turning mpv into an image viewer
View image.lua
-- 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)
-- 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


Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with: