Skip to content

Instantly share code, notes, and snippets.

View zoonderkins's full-sized avatar
🏠
Working 👍

Quack~ zoonderkins

🏠
Working 👍
View GitHub Profile
@zoonderkins
zoonderkins / nodejs-generate-uuid.md
Last active February 8, 2023 03:23
Nodejs generate UUID
  • 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 https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@zoonderkins
zoonderkins / knot-resolver-http-module-not-found.md
Created November 1, 2022 04:44
knot-resolver http module not found

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'
@zoonderkins
zoonderkins / remove-node-modules-on-linux-mac-cli.md
Created October 11, 2022 08:13
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 '{}' \;
@zoonderkins
zoonderkins / Install-nodejs-with-fnm-on-debian.md
Created October 5, 2022 08:28
Install Nodejs with fnm on Debian
@zoonderkins
zoonderkins / README.md
Created October 3, 2022 06:15 — forked from sutlxwhx/README.md
Synchronize folders between two servers using rclone and ssh-agent with ssh based authorisation

Introduction

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.

Installation

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

apt-get update -y
@zoonderkins
zoonderkins / hetzenr-ddns-update.md
Last active June 26, 2022 06:29
Hetzner DDNS update script

Auto check latest VPS IP and update DDNS record on Hetzner

Last updated on: 2022/06/26

cd /root/

wget https://gist.githubusercontent.com/ookangzheng/c1f6894470d362c4356911691c24f67d/raw/update-hetzner-dns.sh
@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