Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@zoonderkins
zoonderkins / gist:213d6c3a23f855150eb67eee74d49ae2
Created June 21, 2022 19:20 — forked from clyang/gist:4f3e9f4098469cf53715ed64bede3932
10GB以上的測速檔案 (IPv4及IPv6) - 10GB+ Speedtest file urls (IPv4 & IPv6)
http://download.xs4all.nl/test/10GB.bin
http://ftp.iinet.net.au/test500MB.dat
http://lg-tor.fdcservers.net/10GBtest.zip
http://lg.ams2-c.fdcservers.net/10GBtest.zip
http://lg.chi2-c.fdcservers.net/10GBtest.zip
http://lg.den2-c.fdcservers.net/10GBtest.zip
http://lg.fra2-c.fdcservers.net/10GBtest.zip
http://lg.la2-c.fdcservers.net/10GBtest.zip
http://lg.lon-c.fdcservers.net/10GBtest.zip
http://lg.mad-c.fdcservers.net/10GBtest.zip
@zoonderkins
zoonderkins / ddns-with-cloudflare-dns.md
Last active June 14, 2022 06:00
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 https://gist.githubusercontent.com/ookangzheng/321a02aba98c5863b3f95ae3beeb0c45/raw/update-cloudflare.sh && chmod +x update-cloudflare.sh
@zoonderkins
zoonderkins / Debian-setup-timezone.md
Created June 14, 2022 05:29
Debian setup timezone #linux

Setup Timezone

## Get current time
timedatectl status

## Set new timezone
timedatectl set-timezone Asia/Taipei
@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
@zoonderkins
zoonderkins / iperf3-speedtest-with-wireguard-server-client.md
Created June 6, 2022 08:38
iperf3 speedtest via wireguard between server and client

Start with iperf3

apt install iperf3

Start the server

iperf3 --server
@zoonderkins
zoonderkins / debian11-error-gpg-is-not-signed-while-install-docker.md
Created June 3, 2022 16:39
Debian 11 gpg error is not signed while install docker

Solution

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg


echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
@zoonderkins
zoonderkins / install-umami-with-docker-compose.md
Created May 4, 2022 20:08
Install umami with Docker-compose

Install

mkdir umami
cd umami
wget https://cdn.jsdelivr.net/gh/mikecao/umami@master/sql/schema.postgresql.sql
wget https://cdn.jsdelivr.net/gh/mikecao/umami@master/docker-compose.yml
docker-compose up -d
docker exec -i umami-db-1 psql -U umami -d umami < schema.postgresql.sql
@zoonderkins
zoonderkins / fix-mac-osx-app-damanged-move-to-trash.md
Created May 4, 2022 04:18
Fix Mac OSX app damaged and move to trash
@zoonderkins
zoonderkins / wireguard-fix.md
Last active March 30, 2022 06:12
Wireguard 疑難雜症

Wireguard packet dropped

Method 1

iptables -t mangle -I FORWARD -o wg0 -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1372

Method 2

@zoonderkins
zoonderkins / Rclone-mount-with-librephoto.md
Last active August 17, 2022 11:49
Librephoto docker compose host with Rclone

Librephoto mount with rclone

Rclone mount

apt-get -y install s3fs

rclone mount de1-storage: /mnt/de1-storage --daemon --daemon-timeout=5m --buffer-size=64M --dir-cache-time=64h --vfs-cache-mode=full --vfs-read-chunk-size 100M --vfs-read-chunk-size-limit 0 --vfs-cache-max-age=6h  --allow-non-empty --allow-other