Skip to content

Instantly share code, notes, and snippets.

@KCCat
KCCat / mpv-mvtools-blksize64.py
Last active February 4, 2024 12:48
mpv-mvtools.vpy
import vapoursynth as vs
core = vs.core
clip = video_in
vfps = int(container_fps*1e8)
dfps = 60000
#dfps = 0
def ffps(fps):
rfps = int('%.0f' % fps)
if ( abs(fps - (rfps/1.001)) < abs(fps - (rfps/1.000)) ):
iptables -t mangle -A POSTROUTING -o ppp+ -p tcp -m string --algo bm --from 40 --to 69 --hex-string 'GET ' -j CONNMARK --set-mark 1/1
iptables -t mangle -A POSTROUTING -o ppp+ -p tcp -m string --algo bm --from 40 --to 69 --hex-string 'POST ' -j CONNMARK --set-mark 1/1
iptables -t filter -A INPUT -i ppp+ -p tcp -m connmark --mark 1/1 -m string --algo bm --from 40 --to 69 --hex-string 'HTTP/1.1 302 ' -j DPI
iptables -t filter -A FORWARD -i ppp+ -p tcp -m connmark --mark 1/1 -m string --algo bm --from 40 --to 69 --hex-string 'HTTP/1.1 302 ' -j DPI
iptables -t filter -N DPI
iptables -t filter -A DPI -j LOG --log-level info --log-prefix 'DPI 302: ' --log-tcp-options --log-ip-options
iptables -t filter -A DPI -j CONNMARK --set-mark 0/1
iptables -t filter -A DPI -j DROP
@KCCat
KCCat / BAN.js
Last active November 13, 2019 12:06
自动BAN吸血雷 QBit,推荐使用/query/getLog页面来跑脚本
// ==UserScript==
// @name 自动BAN吸血雷 QBit
// @namespace QBit-KCC
// @author KCC
// @version 0.01.0
// @match *://0.0.0.0:9898/*
// @grant GM_registerMenuCommand
// ==/UserScript==
function interval(func, wait){
@KCCat
KCCat / .sh
Created January 18, 2019 08:36
gnome proxy
gsettings set org.gnome.system.proxy mode auto
gsettings set org.gnome.system.proxy autoconfig-url 'http://my.prox.org/foo.pac'
gsettings set org.gnome.system.proxy autoconfig-url ''
gsettings set org.gnome.system.proxy mode none
@KCCat
KCCat / ADB.pac
Created December 26, 2018 03:43
iOS fake VPN ADBlocker
function FindProxyForURL(url, host) {
"use strict";
var lIst = [
"bayescom.com",
"adsdk.dmzj.com",
"umeng.com",
];
var eNd = lIst.some(function(E,I,A){
#!/usr/bin/zsh
export LC_ALL=en_US.UTF-8
export WINEPREFIX="$HOME/.RUN64" WINEARCH=win64
rm -rf $HOME/.RUN64
winetricks cfc=enabled fontfix fontsmooth=rgb mwo=force isolate_home cjkfonts
setup_dxvk64
setup_dxvk32
cp u3dfont/{arial.ttf,msyh.ttc} .RUN64/drive_c/windows/Fonts
@KCCat
KCCat / e-hentai_hidpi_fix.js
Last active November 11, 2022 01:25
e-hentai_hidpi_fix 色图太大修复
// ==UserScript==
// @name e-hentai hidpi fix
// @namespace Violentmonkey Scripts
// @match https://exhentai.org/mpv/*/*
// @match https://e-hentai.org/mpv/*/*
// @run-at document-start
// @grant none
// ==/UserScript==
JSON_parse = JSON.parse;
@KCCat
KCCat / spectrwm_status_ber.py
Last active July 31, 2020 17:26
spectrwm_status_ber.py python3
#!/usr/bin/env python3
from time import sleep, strftime, localtime
from sys import stdout
from os import statvfs
#import time, sys
from pathlib import Path
find ~/epub/ -name '*.epub' | xargs -n1 -P16 -I {} ./kindlegen -locale zh {} -c2 -verbose -dont_append_source
# Torchlight II
LD_PRELOAD=~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so LD_PRELOAD=/usr/lib/libfreetype.so %command%
# Divinity
allow_glsl_extension_directive_midshader=true LD_PRELOAD="divos-hack.so" %command%
# Slay the Spire
#xrandr