Skip to content

Instantly share code, notes, and snippets.


  • Germany
Block or report user

Report or block sfan5

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sfan5 / cutshit.vpy
Last active Mar 17, 2017
VapourSynth script for "simple" frame exact cutting of video & audio
View cutshit.vpy
import vapoursynth as vs
import csv
core = vs.get_core()
if "input" not in dir():
print("ERROR: Provide input file via --arg input=./spec.txt")
assert False
vsrc = None
asrc = None
sfan5 /
Last active Mar 17, 2019
Builds OpenConnect server ( into a portable, static Linux binary
#!/bin/bash -e
sfan5 / 0001-Add-STouchInput-to-header-file.patch
Created Nov 5, 2016
touch input for irrlicht on windows (incomplete)
View 0001-Add-STouchInput-to-header-file.patch
From d61676afdfd10fcba779ceab8fa00779a9eb2ccd Mon Sep 17 00:00:00 2001
From: sfan5 <>
Date: Sat, 15 Oct 2016 15:13:07 +0200
Subject: [PATCH 1/3] Add STouchInput to header file
include/IEventReceiver.h | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/include/IEventReceiver.h b/include/IEventReceiver.h
sfan5 /
Created Nov 2, 2016
Removes a single node from a whole Minetest world (SQLite3 backend only)
#!/usr/bin/env python3
import sys
import os.path
import struct
import zlib
import sqlite3
class BufferConsumer():
def __init__(self, buf):
assert(type(buf) == bytes)
sfan5 /
Last active Jul 23, 2019
Build system & recipes for cross-compiling various libraries/programs for Windows (32-bit & 64-bit)
#!/bin/bash -eu
common_init () {
CURRENT_PACKAGE_NAME=$(basename "$0")
sfan5 /
Created Sep 8, 2016
Removes toolchain-wrapper added by recent versions of Buildroot
if [ ! -f toolchain-wrapper ]; then
echo "Not a bin folder or wrapper already removed"
exit 1
echo ":: Replacing symlinks to toolchain-wrapper"
for file in *; do
sfan5 /
Last active May 9, 2017
parses serialized MapBlock
#!/usr/bin/env python3
import sys
import struct
import binascii
import zlib
import getopt
BS = 16 # MapBlock side length (not to be confused with the BS for visuals)
ENDIAN = "!"
sfan5 /
Last active May 2, 2016
Bruteforces brnboot command mode password (required either broken firmware (unbootable) or manual resets)
#!/usr/bin/env python2
import time
import serial
class PasswordGen(object):
def __init__(self):
self.charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
self.cur_pw = [0 for i in range(16)]
self.cur_i = 0
def restore(self, pw):
sfan5 /
Created Apr 8, 2016
Support multiple gateways on one machine
#!/bin/bash -e
# TBLN needs to be different for each interface
IPADDR=`ip addr show dev $IFACE | grep "inet " | awk '{print $2}' | cut -d '/' -f1`
IPSUBNET=`ip route show | grep "dev $IFACE" | grep "src $IPADDR" | awk '{print $1}'`
IPGATEWAY=`ip route | grep "default via" | grep "dev $IFACE" | awk '{print $3}'`
sfan5 / ytdl_plus.lua
Last active Sep 9, 2017
More and better configuration for youtube-dl (mpv)
View ytdl_plus.lua
-- ytdl_plus: More and better configuration for youtube-dl!
-- The main feature is being able to choose the requested formats based on the URL you're playing,
-- other features include blacklisting youtube-dl for specific URLs.
-- Configuration guide:
--- 'match' controls which formats apply to which URLs,
--- it's a key-value mapping of patterns to IDs: <key>=<value>[,<key>=<value>...]
--- Patterns are strings that are searched for in the URL,
--- if you prefix a pattern with ^ it will only match at the beginning.
--- Patterns are matched from first to last, which means that
--- if you put an empty pattern first, all others won't be matched.
You can’t perform that action at this time.