Skip to content

Instantly share code, notes, and snippets.

Working 👍

Quack~ ookangzheng

Working 👍
View GitHub Profile
View One Liner to Download the Latest Release from Github
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \

Knot resolver on Debian HTTP module not found

Error Message

kresd -c /etc/knot-resolver/53/kresd.conf
[system] error: module 'kres_modules.http' not found:
	no field package.preload['kres_modules.http']
	no file '/usr/lib/knot-resolver/kres_modules/http.lua'
	no file '/usr/lib/knot-resolver/kres_modules/http/init.lua'
ookangzheng /
Created Oct 11, 2022
Remove node_modules recursivly on Linux or Mac cli

One line CLI remove node_modules

find . -name "node_modules" -type d -prune -print -exec rm -rf '{}' \;
ookangzheng /
Created Oct 3, 2022 — forked from sutlxwhx/
Synchronize folders between two servers using rclone and ssh-agent with ssh based authorisation


This tutorial will help you transfer your folders / files between two server using rclone and ssh-agent.
It was tested between two Ubuntu 16.04 servers.


First things first. We need to install the neccessary packages:

apt-get update -y
ookangzheng /
Last active Jun 26, 2022
Hetzner DDNS update script

Auto check latest VPS IP and update DDNS record on Hetzner

Last updated on: 2022/06/26

cd /root/

ookangzheng / gist:213d6c3a23f855150eb67eee74d49ae2
Created Jun 21, 2022 — forked from clyang/gist:4f3e9f4098469cf53715ed64bede3932
10GB以上的測速檔案 (IPv4及IPv6) - 10GB+ Speedtest file urls (IPv4 & IPv6)
View gist:213d6c3a23f855150eb67eee74d49ae2
ookangzheng /
Last active Jun 14, 2022
Ddns with Cloudflare DNS #linux

Use case

  1. VPS has dynamic IP which changed few times a week or month.
  2. Self-hosted NAS or homelab which use dynamic IP from ISP.

Setup and config

  1. Download script below and assign excuatable permission
wget && chmod +x
ookangzheng /
Created Jun 14, 2022
Debian setup timezone #linux

Setup Timezone

## Get current time
timedatectl status

## Set new timezone
timedatectl set-timezone Asia/Taipei
ookangzheng /
Created Jun 6, 2022 — forked from nitred/
Wireguard Optimal MTU


  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.


  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file