Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@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
@zoonderkins
zoonderkins / debian13-install-dnsdist-2-1.md
Last active September 11, 2025 05:20
dnsdist-2.1-master install on debian 13

Error

The following packages have unmet dependencies:
 dnsdist : Depends: libre2-9 (>= 20131024+dfsg) but it is not installable
E: Unable to correct problems, you have held broken packages.
E: The following information from --solver 3.0 may provide additional context:
   Unable to satisfy dependencies. Reached two conflicting decisions:
   1. dnsdist:amd64=2.1.0~alpha0+master.717.g1fe1273bc-1pdns.debian12 is selected for install
 2. dnsdist:amd64=2.1.0~alpha0+master.717.g1fe1273bc-1pdns.debian12 Depends libre2-9 (>= 20131024+dfsg)
@zoonderkins
zoonderkins / crowdsec-install-debian.sh
Last active August 25, 2025 10:33
crowdsec-install-debian
## curl -s https://gist.githubusercontent.com/amanjuman/fe6324137c08b356061595e9f76a34b9/raw/b05185579853c8c779408c4bd48df2ea9e33c5a3/linux_install.sh | sudo bash
#!/bin/bash
# Function to detect Linux distribution
detect_distro() {
if [ -f /etc/os-release ]; then
. /etc/os-release
OS_NAME=$ID
OS_VERSION=$VERSION_ID
@zoonderkins
zoonderkins / change-mac.sh
Created July 9, 2025 02:12 — forked from nixpulvis/change-mac.sh
Change your MAC address on OS X.
#!/bin/bash
ssid=$(networksetup -getairportnetwork en0 | cut -d ":" -f 2 | sed "s/^[ \t]*//")
sudo airport -z
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.\$//")
networksetup -setairportnetwork en0 "$ssid"
@zoonderkins
zoonderkins / script.md
Created July 9, 2025 00:28
random-reset-mac-address

Linux

INTERFACE=""
NEW_MAC=$(printf '02:%02x:%02x:%02x:%02x:%02x\n' $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)))
sudo ip link set $INTERFACE down
sudo ip link set $INTERFACE address "$NEW_MAC"
sudo ip link set $INTERFACE up
@zoonderkins
zoonderkins / memory.md
Created July 8, 2025 03:12
Linux find memory use
ps -eo pid,comm,%mem --sort=-%mem | head -n 11
@zoonderkins
zoonderkins / cilium-grafana-dashboard.json
Created May 19, 2025 12:58
cilium grafana dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@zoonderkins
zoonderkins / .bashrc
Created May 11, 2025 08:18
.bashrc for Linux bash color prompt
# Last update 2025-05-11
# Author zoonderkins
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
@zoonderkins
zoonderkins / fail2ban.sh
Last active September 27, 2025 07:08
debian 13 and ubuntu install fail2ban script
#!/bin/bash
CHECK_OS(){
if [[ -f /etc/redhat-release ]]; then
release="centos"
elif grep -q -E -i "debian" /etc/issue; then
release="debian"
elif grep -q -E -i "ubuntu" /etc/issue; then
release="ubuntu"
elif grep -q -E -i "centos|red hat|redhat" /etc/issue; then