Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@zoonderkins
zoonderkins / locale-fix.sh
Created April 6, 2026 07:15
Chinese-not-show-on-linux
#!/usr/bin/env bash
set -euo pipefail
log() { printf '\033[1;32m[INFO]\033[0m %s\n' "$*"; }
warn() { printf '\033[1;33m[WARN]\033[0m %s\n' "$*"; }
err() { printf '\033[1;31m[ERR ]\033[0m %s\n' "$*" >&2; }
require_root() {
if [ "${EUID:-$(id -u)}" -ne 0 ]; then
err "請用 sudo 執行:sudo bash $0"
@zoonderkins
zoonderkins / debug.sh
Created March 28, 2026 09:08
debug.sh
echo "=== 1. Hostname & IP ==="
hostname
ip -4 addr show | grep inet | grep -v 127.0.0
echo ""
echo "=== 2. Default route ==="
ip route show default
echo ""
echo "=== 3. Outgoing connectivity ==="
@zoonderkins
zoonderkins / mise-gpg-error-on-error.md
Created March 27, 2026 12:43
mise-gpg-error-install-error

Error message example

❯ mise upgrade
gpg: WARNING: server 'keyboxd' is older than us (2.4.9 < 2.5.18)
gpg: WARNING: server 'keyboxd' is older than us (2.4.9 < 2.5.18)
gpg: Signature made Wed Mar 25 04:38:51 2026 CST
gpg:                using RSA key 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4
gpg: WARNING: server 'keyboxd' is older than us (2.4.9 < 2.5.18)
gpg: Can't check signature: No public key
@zoonderkins
zoonderkins / litellm-python-scan.sh
Created March 26, 2026 19:06
litellm-python-IOC-scan
#!/usr/bin/env bash
set -euo pipefail
OUT="/tmp/teampcp_triage_$(hostname)_$(date +%F_%H%M%S).txt"
IOC='checkmarx\.zone|scan\.aquasecurity\.org|models\.litellm\.cloud|litellm\.cloud|tpcp\.tar\.gz|docs-tpcp|tpcp-docs|sysmon\.py|sysmon\.service|litellm_init\.pth'
{
echo "## host"
hostname
date
@zoonderkins
zoonderkins / block-scanners-update.service
Last active March 12, 2026 08:39
blocklist-ipset common internet scanner like shadow cenysus
[Unit]
Description=Update scanner and malicious IP blocklists
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/block-scanners.sh input-only
TimeoutStartSec=30min
Nice=10
sudo apt-get remove --purge -y grub-cloud-amd64 || true
sudo dpkg --configure -a
sudo apt-get install -f -y
dpkg -l | grep grub-cloud-amd64 || true
dpkg --audit || true
apt update; apt upgrade -y
apt -y autoremove --purge;
update-grub;
@zoonderkins
zoonderkins / dnsdist-install.sh
Created March 11, 2026 09:19
dnsdist-install-debian
#!/usr/bin/env bash
set -Eeuo pipefail
export DEBIAN_FRONTEND=noninteractive
DNSDIST_CHANNEL="${DNSDIST_CHANNEL:-21}" # default 21 https://repo.powerdns.com/
APT_DIR="/etc/apt"
SOURCES_DIR="/etc/apt/sources.list.d"
PREF_DIR="/etc/apt/preferences.d"
KEYRING_DIR="/etc/apt/keyrings"
@zoonderkins
zoonderkins / README.md
Last active December 25, 2025 12:51
cisco-duo-install on debian 13 to protect ssh

Duo SSH 2FA 安全登入整合

適用 Linux 伺服器:Debian / Ubuntu / Proxmox / Standard VPS
支援 密碼 + Duo / 公鑰 + Duo / Root Key + Duo,使用者密碼 + Duo


🚀 功能特色

功能 支援
@zoonderkins
zoonderkins / dnsdist-2-ebpf-fix-on-debian.md
Created September 13, 2025 01:48
dnsdist2-ebpf-fix-on-debian

Install

apt install bpftool
uname -r
bpftool feature probe | sed -n '1,200p'
mount | grep bpffs || sudo mount -t bpf bpffs /sys/fs/bpf

@zoonderkins
zoonderkins / fix-debian-locale-bash-warning.md
Created September 13, 2025 01:31
debian-locale-bash-warning

Error

-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory