Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@zoonderkins
zoonderkins / xmrig-install-ubuntu-debian.sh
Created March 28, 2024 05:33
xmrig-install-ubuntu-debian
#!/bin/bash
# GitHub user/repo
GITHUB_REPO="xmrig/xmrig"
# Use GitHub API to fetch the latest release information
LATEST_RELEASE_INFO=$(curl -s https://api.github.com/repos/$GITHUB_REPO/releases/latest)
# Parse version and tarball URL from the release information
XMRIG_VERSION=$(echo "$LATEST_RELEASE_INFO" | jq -r '.tag_name')
@zoonderkins
zoonderkins / linux-nftables-set-ttl-65.md
Created December 11, 2023 05:06
Linux nftables set ttl 65 on GL-inet router

Config on GL-inet router

mkdir -p /usr/share/nftables.d/chain-pre/mangle_postrouting/
echo "ip ttl set 65" >  /usr/share/nftables.d/chain-pre/mangle_postrouting/01-set-ttl.nft
fw4 reload

@zoonderkins
zoonderkins / remove-old-kernel-linux.md
Last active December 11, 2023 05:04
remove-old-kernel-linux.sh

Usage

chmod +x ./remove-old-kernel-linux.sh

./remove-old-kernel-linux.sh exec
@zoonderkins
zoonderkins / fresh-caddy-install-with-xcaddy-webdav-module.md
Created November 16, 2023 08:22
Fresh caddy install on debian with xcaddy + webdav module

Install Caddy

apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
@zoonderkins
zoonderkins / one-click-install-dnsproxy.sh
Created November 14, 2023 09:59
one click install dnsproxy
#!/bin/bash
# Function to download file
download_file() {
url=$1
file_name=$2
if command -v wget > /dev/null; then
wget "$url" -O "$file_name"
elif command -v curl > /dev/null; then
@zoonderkins
zoonderkins / check incoming and outgoing udp traffic.md
Last active October 17, 2023 04:22
check incoming and outgoing udp traffic

Check incoming and outgoing UDP traffic

# Outgoing
nc -v -u www.google.com 443

# Incoming
nc -v -u 1.1.1.1 443
@zoonderkins
zoonderkins / gl-inet-router-modify-ttl-to-65.md
Created September 20, 2023 02:26
GL-inet router modify iptables ttl to 65
@zoonderkins
zoonderkins / how-transfer-migrate-file-between-vps-on-the-fly-rclone.md
Last active September 19, 2023 12:00
Transfer tar file on the fly between vps debian 12

Transfer tar file on the fly between vps

Setup temporary rclone webdav server

## Edit file: .config/rclone/rclone.conf

[my-dest-server]
type = webdav
url = http://webdav.xxx.com:8080
@zoonderkins
zoonderkins / install-python3-on-ubuntu-18.md
Created August 14, 2023 09:50
Ubuntu 18 make Python3.9

Why

As of Aug 14, 2023 deadsnakes ppa remove Ubuntu 18 bionic support for Python3.9 Therefore, We have to manually make it.

Installation

must be root user

@zoonderkins
zoonderkins / delete-file-with-find-command.md
Created April 19, 2023 17:11
delete file with find command

Find the file with .torrent extension and delete it

# Find 
find . -name "*.torrent"

./xxx.torrent
./xxx1.torrent
./xxx2.torrent