Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo -ne "\033]0;Minecraft Server Launcher\a"
cd "$(dirname "$0")" || exit 1
umask 022
green() { echo -e "\033[32m$1\033[0m"; }
red() { echo -e "\033[31m$1\033[0m"; }
import os
import threading
import tkinter as tk
from tkinter import filedialog, messagebox, ttk
from tkinterdnd2 import TkinterDnD, DND_FILES
import zipfile
import py7zr
import patoolib
import locale
from PIL import Image, ImageTk
#!/bin/bash
# 颜色样式
GREEN="\033[0;32m"
RED="\033[0;31m"
YELLOW="\033[1;33m"
NC="\033[0m" # 无色
# 扫描当前目录所有文件
files=()
@krisstibex
krisstibex / requirements.txt
Last active May 14, 2025 22:26
使用FFMPEG的视频处理压缩gui脚本 需要安装FFMPEG
tkinter
tkinterdnd2
subprocess32
@krisstibex
krisstibex / 1.12.3.json
Last active January 30, 2026 12:10
{
"log": {
"disabled": false,
"level": "info",
"timestamp": true,
"output": ""
},
"ntp": {
"enabled": true,
"server": "time.apple.com",
@krisstibex
krisstibex / bilidl.py
Last active April 15, 2025 09:02
need yt-dlp & ffmpeg
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)
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"
#!/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"
@krisstibex
krisstibex / run.sh
Last active March 5, 2025 06:07
MacOS.
#!/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; }