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 \" \
ookangzheng /
Created October 3, 2022 06:15 — 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 / gist:213d6c3a23f855150eb67eee74d49ae2
Created June 21, 2022 19:20 — forked from clyang/gist:4f3e9f4098469cf53715ed64bede3932
10GB以上的測速檔案 (IPv4及IPv6) - 10GB+ Speedtest file urls (IPv4 & IPv6)
View gist:213d6c3a23f855150eb67eee74d49ae2
ookangzheng /
Created June 6, 2022 09:02 — 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
View alacritty.yaml
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
ookangzheng /
Last active May 7, 2021 03:08 — forked from KittyGiraudel/npm-audit.js
const { exec } = require('child_process')
const { promisify } = require('util')
const chalk = require('chalk')

// See:
const SEVERITY_LEVELS = ['low', 'moderate', 'high', 'critical']
const SEVERITY_THRESHOLD = 'critical'
const run = promisify(exec)
ookangzheng /
Created May 5, 2021 03:12 — forked from aravindkumarsvg/
Generates npm audit report for multiple directories and searching for multiple package.json inside those given directories
# Global variable declarations
# usage
ookangzheng /
Created May 3, 2021 09:27 — forked from afragen/
Installing Gitea on Raspberry Pi 3 b+ with nginx and automatic backups

Setup Gitea on Raspberry Pi (3b+)

These instructions are based on this article:

Setup Raspberry Pi with minimal Raspbian image. You need to connect to the HDMI port and set the following:

Use Noobs to install Raspian.

Open menu Preferences > Raspberry Pi Settings

ookangzheng / aria2
Created April 6, 2021 09:44 — forked from wigging/aria2
command line download of torrent magnet link using aria2
View aria2
# Command to download file via bittorrent magnet link using aria2.
# See website and documentation at
# -d specifies the directory to store the downloaded file
# --seed-time=0 disables seeding after download has completed
aria2c -d ~/Downloads --seed-time=0 "magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C"

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats