This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JAVA_PATH="/Library/Java/JavaVirtualMachines/21/Contents/Home/bin/java" | |
JAVA_OPTS="-Xmx4G -Xms2G" | |
JAR_FILE="server.jar" | |
cd "$(dirname "$0")" || exit 1 | |
[ -f "$JAR_FILE" ] || { echo "错误: 找不到 $JAR_FILE"; exit 1; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 切换到脚本所在目录(仅本地运行时) | |
if [[ -z "$BASH_SOURCE" || "$BASH_SOURCE" == "$0" ]]; then | |
cd "$(dirname "$0")" | |
fi | |
# Minecraft 服务器下载 URL | |
MINECRAFT_VERSIONS_API="https://launchermeta.mojang.com/mc/game/version_manifest.json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
theme = light:catppuccin-latte,dark:catppuccin-mocha | |
# https://github.com/catppuccin/ghostty/tree/main/themes | |
term=xterm-256color | |
# 英文字体 https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/ComicShannsMono.zip | |
font-family = "ComicShannsMono Nerd Font" | |
# 中文字体 https://github.com/lxgw/LxgwWenKai-Screen/releases/download/v1.510/LXGWWenKaiMonoGBScreen.ttf | |
font-family = "LXGW WenKai Mono GB Screen" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import re | |
from urllib.parse import urlparse | |
from typing import Optional | |
def extract_uid(url: str) -> Optional[str]: | |
if url.isdigit(): | |
return url | |
parsed = urlparse(url) | |
match = re.search(r'/(\d+)', parsed.path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dns": { | |
"servers": [ | |
{ | |
"tag": "cloudflare", | |
"type": "https", | |
"server": "1.1.1.1", | |
"detour": "Proxy" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import base64 | |
import time | |
import sys | |
from cryptography.hazmat.primitives.asymmetric import rsa, padding | |
from cryptography.hazmat.primitives import serialization, hashes | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.exceptions import InvalidTag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 检查 root 权限 | |
if [ "$EUID" -ne 0 ]; then | |
echo "请使用 sudo 运行本脚本" | |
exit 1 | |
fi | |
# 默认参数 | |
PROTO="tcp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tkinter | |
tkinterdnd2 | |
subprocess32 |