Skip to content

Instantly share code, notes, and snippets.

View ITJesse's full-sized avatar
🦊

Jesse Zhu ITJesse

🦊
View GitHub Profile
@ITJesse
ITJesse / README.md
Last active February 28, 2025 07:34
一些 Linux 环境的自适应脚本

使用 Linux 需要很多自适应技巧,这里是我的一些日常脚本

fix-dpi.sh

修复 KDE 桌面在切换内置和外置显示器的时候应用缩放错误的问题

其实就是随便改一下缩放再改回来

罗技鼠标 Hi-res Scroll 去抖动

mouse_smoother

@ITJesse
ITJesse / Arch Linux on Encrypted BTRFS Raid.md
Last active February 20, 2025 19:57 — forked from redeemed2011/Arch Linux on Encrypted BTRFS Raid.md
Arch Linux LUKS Encrypted / on Btrfs Raid 0 (Stripe) of 2 Drives

General

Info

!ATTENTION! This script is intentionally designed to completely wipe all data on at least two drives! !ATTENTION!

I used standard Arch Linux on two NVME drives. The goal was as much encryption as possible with the smallest performance impact possible.

@ITJesse
ITJesse / ArchLinux_ZFS_LUKS_Setup.sh
Last active February 20, 2025 18:21 — forked from xunil154/ArchLinux_ZFS_LUKS_Setup.sh
ArchLinux install script with ZFS as the root, all sitting on LUKS encryption, using systemd-boot for UEFI (ArchLinux with ZFS Root on LUKS with UEFI)
#!/bin/sh
SWAPSIZE=3 # IN GB
SYSTEM_NAME=aerozine # Hostname and used in ZFS structure (zroot/sys/${SYSTEM_NAME}/ROOT/default)
USER=xunil # Initial admin user for the system
# Archlinux on ZFS Root on LUKS setup script (v1.0)
#
# USAGE: ./ArchLinux_ZFS_LUKS_Setup.sh /dev/sda
#
#!/bin/bash
for FILE in "$@"
do
echo $FILE
NAME=$(basename "$FILE" | cut -d . -f1)
PAGES=`pdfinfo "$FILE" | grep Pages | grep -P '\d+' -o`
mkdir -p "$NAME"
seq 1 $PAGES | parallel pdftoppm -f {} -l {} -aa yes -r 400 -png "$(printf "%q" "$FILE")" "$(printf "%q/img" "$NAME")"
find $NAME -type f -name "*.png" | parallel optipng -o4 {}
/**
* Full documentation for the "identitytoolkit" API can be found here:
* https://cloud.google.com/identity-platform/docs/reference/rest/v1/accounts
*/
/**
* Settings object for an IDP(Identity Provider).
* @typedef {Object} ProviderOptions
* @property {string} options.name The name of the provider in lowercase.
* @property {string} [options.scope] The scopes for the IDP, this is optional and defaults to "openid email".
@ITJesse
ITJesse / 漫读券.js
Last active November 14, 2022 17:38 — forked from xmdhs/漫读券.js
批量使用漫读券
(async () => {
let u = new URL(location.href);
let mc = u.pathname.match(/detail\/mc(\d+)/);
if (mc.length != 2) {
return
}
let mcid = mc[1];
let r = await fetch("https://manga.bilibili.com/twirp/comic.v1.Comic/ComicDetail?device=pc&platform=web", {
"headers": {
@ITJesse
ITJesse / main.js
Last active May 8, 2019 12:52
Exhentai Preview Image
// ==UserScript==
// @name Exhentai Preview Image
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://exhentai.org/*
// @grant none
// ==/UserScript==
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/Homebrew/brew/tarball/master anywhere you like or
# change the value of HOMEBREW_PREFIX.
HOMEBREW_PREFIX = "/usr/local".freeze
HOMEBREW_REPOSITORY = "/usr/local/Homebrew".freeze
HOMEBREW_CACHE = "#{ENV["HOME"]}/Library/Caches/Homebrew".freeze
HOMEBREW_OLD_CACHE = "/Library/Caches/Homebrew".freeze
BREW_REPO = "https://mirrors.ustc.edu.cn/brew".freeze
CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core".freeze
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/Homebrew/brew/tarball/master anywhere you like or
# change the value of HOMEBREW_PREFIX.
HOMEBREW_PREFIX = "/usr/local".freeze
HOMEBREW_REPOSITORY = "/usr/local/Homebrew".freeze
HOMEBREW_CACHE = "#{ENV["HOME"]}/Library/Caches/Homebrew".freeze
HOMEBREW_OLD_CACHE = "/Library/Caches/Homebrew".freeze
BREW_REPO = "https://mirrors.ustc.edu.cn/brew".freeze
CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core".freeze
@ITJesse
ITJesse / API.md
Created April 2, 2018 09:12
Wechat Bot API

登陆接口

Request

{
	"username": "test",
	"password": "test
}