Skip to content

Instantly share code, notes, and snippets.

@Bryan2333
Bryan2333 / launch-linuxqq
Created June 15, 2024 10:35
为LinuxQQ提供固定的MAC地址
#!/usr/bin/env bash
# 修改自:https://alampy.com/2024/05/15/fix-mac-for-linux-qq/
QQ_MAC_FILE="$HOME/.cache/qq_mac"
for cmd in slirp4netns socat nsenter unshare linuxqq
do
if ! command -v "$cmd" &>/dev/null
then
@Bryan2333
Bryan2333 / sign-uki
Created June 9, 2024 15:03
给UKI签名
#!/usr/bin/env fish
set uki "$argv[3]"
if test -z "$uki"
exit 0
end
set keypairs "/root/.secureboot/MOK.key" "/root/.secureboot/MOK.crt"
@Bryan2333
Bryan2333 / sha256sums
Last active June 5, 2024 11:27
ISO目录 checksum
4cc7e1c9f4e97b384f0d8731f317b5995bde256fcc17160d32359cab923c5892 archlinux-2024.06.01-x86_64.iso
2235d87c6d9ed38a305bc389145aed26524e5325b5a8b1b2ba2792bdef17c040 ThinPC_110415_EVAL_x86fre.iso
1a4560d7fe5c4ac0ce7be12a25abaa203c7502057a1a68a791d794a720fa7349 tiny10 23h1 x64.iso
39430c2b8dd5c21bbd5af9116573f8c574ae896ce31d47280914ef268f01e33f zh-hans_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-74070.iso
@Bryan2333
Bryan2333 / localrepo
Last active June 29, 2024 16:20
本地仓库localrepo相关脚本
#!/usr/bin/env fish
if ! fish_is_root_user
echo "This script must be run as root!"
exit 1
end
if ! type -q rsync
echo "Please install rsync first!"
exit 1
@Bryan2333
Bryan2333 / proxy.fish
Created April 15, 2024 15:05
fish shell proxy function
# Defined in /home/bryan/.config/fish/functions/proxy.fish @ line 1
function proxy
set -l DEFAULT_PROXY "http://127.0.0.1:7890"
set -l PROXY_URL_FORMAT "^(http|https|socks5|socks5h)://[a-zA-Z0-9.-]+:[0-9]+\$"
function __set_proxy
set -gx HTTP_PROXY $argv[1]
set -gx http_proxy $HTTP_PROXY
set -gx HTTPS_PROXY $HTTP_PROXY
@Bryan2333
Bryan2333 / pkgsizesort
Last active June 22, 2024 07:35
pkgstatus and pkgsizesort
function pkgsizesort
if test (count $argv) -eq 0 || test -z $argv
echo "用法: pkgsizesort 关键字或正则表达式"
return 1
end
set packages $(pacman -Qq | rg -e $argv)
if test (count $packages) -eq 0
echo "不存在符合条件的软件包"
@Bryan2333
Bryan2333 / launch.json
Created March 10, 2024 08:18
VSCode CodeLLDB Cpp Config
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "C调试",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"cwd": "${workspaceFolder}",
@Bryan2333
Bryan2333 / checksum
Created March 8, 2024 15:58
ttf mswin11
64bff9f3461fc688d3c959f6085a4d90d6516a13a0c9742b6632568b708e5953 ttf-ms-win11-10.0.22631.2506-1-any.pkg.tar.zst
7e2dd103fb5f2a52d2a91f9737b7424299250dcc41adf12355ff64f4ffeeac85 ttf-ms-win11-zh_cn-10.0.22631.2506-1-any.pkg.tar.zst
@Bryan2333
Bryan2333 / OneDark.conf
Last active March 9, 2024 03:45
Kitty terminal OneDark theme
#: OneDark Theme {{{
foreground #ABB2BF
background #282C34
# Black
color0 #3F4451
color8 #4d5564
# Red
@Bryan2333
Bryan2333 / btrfs-balance.service
Last active April 15, 2024 08:29
Btrfs Balance
[Unit]
Description=Balance Btrfs filesystem on nvme0n1
[Service]
Type=oneshot
ExecStart=/usr/bin/btrfs balance start -dusage=10 /