Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@Koratsuki
Koratsuki / Ubuntu-24.04-fresh-install.md
Last active September 7, 2024 04:46
Ubuntu 24.04 fresh install

First of all, I must say that I'am not a fan or user of Ubuntu. This is just a guide for newcomers, and colleagues that are struggling after the new release with the system changes.

Repositories configurations and system upgrade

Right after fresh install, you must do a system update. Don't delay it, but first, let's configure repositories. Delete the new config for repositories, this can cause problems or new users can get lost configuring it, have friends reporting me that:

sudo rm /etc/apt/sources.list.d/ubuntu.sources
@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 September 20, 2024 14:23
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 September 7, 2024 18:56
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 September 23, 2024 14:35
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