Skip to content

Instantly share code, notes, and snippets.

@KCCat
KCCat / lightnovel2epub.test.js
Last active August 15, 2019 01:33
转换轻国论坛帖子到epub. 用法: 0.切换到只看楼主模式 1.鼠标选取章节 2. 猴子扩展里的按钮开始运行 3. 完成后帖子标题转为下载链接
// ==UserScript==
// @name lightnovel2epub
// @description 快速输出半成品epub3.0
// @author KCC
// @version 0.99.25
// @namespace lightnovel2epub
// @match *://www.lightnovel.us/forum.php*
// @match *://www.lightnovel.cn/forum.php*
// @require https://github.com/Stuk/jszip/raw/master/dist/jszip.min.js
// @grant GM_registerMenuCommand
@KCCat
KCCat / cpu_fan.sh
Created July 21, 2018 18:43
Dell 9020M Fan
#!/bin/bash
modprobe dell_smm_hwmon force=1
while true
do
if [ `cat /sys/class/hwmon/hwmon1/temp1_input` -lt 55000 ]
then
Vl=0
echo "FAN L"
echo "2-10.1" | sudo tee /sys/bus/usb/drivers/usb/unbind
colord colord-gtk xiccd
@KCCat
KCCat / amdgpu_pwm_dpm_fix.sh
Last active June 23, 2019 09:52
amdgpu_pwm_dpm_fix first add amdgpu.ppfeaturemask=0xffffffff
#!/bin/bash
enable -f /usr/lib/bash/sleep sleep
#OD_SCLK:
#0: 825mV
#1: 825mV
#2: 825mV
#3: 950mV
#4: 1000mV
# 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
find ~/epub/ -name '*.epub' | xargs -n1 -P16 -I {} ./kindlegen -locale zh {} -c2 -verbose -dont_append_source
@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
@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;
#!/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