Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@zoonderkins
zoonderkins / Install-nodejs-with-fnm-on-debian.md
Created October 5, 2022 08:28
Install Nodejs with fnm on Debian
@zoonderkins
zoonderkins / optimal_mtu.md
Created June 6, 2022 09:02 — forked from nitred/optimal_mtu.md
Wireguard Optimal MTU

About

  • 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.

Testing

  • 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
@nitred
nitred / optimal_mtu.md
Last active July 16, 2024 11:51
Wireguard Optimal MTU

About

  • 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.

Testing

  • 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
const { exec } = require('child_process')
const { promisify } = require('util')
const chalk = require('chalk')
// See: https://docs.npmjs.com/about-audit-reports#severity
const SEVERITY_LEVELS = ['low', 'moderate', 'high', 'critical']
const SEVERITY_THRESHOLD = 'critical'
const run = promisify(exec)
// Get the output of a command. If the command exits with a non-zero code, try
@zoonderkins
zoonderkins / Adblock-list-collection.md
Last active July 4, 2023 22:43
Adblock-list-collection
@rjhansen
rjhansen / keyservers.md
Last active April 14, 2024 12:28
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@zoonderkins
zoonderkins / git-refusing.md
Last active December 29, 2020 22:31 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

Git refusing to merge unrelated histories on rebase

Error: fatal: refusing to merge unrelated histories

Solution:

  • Rebase it git pull --rebase branchname

  • pull git pull origin branchname --allow-unrelated-histories

  • push git push origin master

// JavaScript 字符串编码使用 UTF-16
"💩".length === 2;
"💩" === "\u{1F4A9}"; // es6
"💩" === "\uD83D\uDCA9"; // es5
// 同一个编码可能使用不同的码位
"ò" === "ò"; // ❎
"ò" === "\xF2"; // ✅
"ò" === "o\u0300"; // ✅
"o\u0300".normalize("NFC") === "\xF2"; // ✅ es6 提供了 normalize 函数
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 22, 2024 11:21
Conventional Commits Cheatsheet

Conventional Commit Messages

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

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@zoonderkins
zoonderkins / awesome-dns-resolver.md
Last active May 13, 2023 14:57
awesome-dns-resolver