Skip to content

Instantly share code, notes, and snippets.

View ParinLL's full-sized avatar

Parin Lai ParinLL

  • Taiwan
View GitHub Profile
@kode54
kode54 / zsync2.patch
Created May 17, 2024 00:38
Patch to get zsync2 building with GCC14, likely no less functional than it was before, considering it doesn't try to use off64_t instead of off_t
diff --git a/lib/libzsync/zsync.c b/lib/libzsync/zsync.c
index b425db9..02c47ad 100644
--- a/lib/libzsync/zsync.c
+++ b/lib/libzsync/zsync.c
@@ -40,6 +40,8 @@
#include <unistd.h>
#include <string.h>
#include <ctype.h>
+
+#define __USE_XOPEN 1

1. 如何確認自己是使用Wayland工作階段

使用echo $XDG_SESSION_TYPE即可得知是x11還是wayland

KDE登入畫面SDDM左下角點選Plasama (Wayland)工作階段

GNOME 42後已預設使用GNOME,登入時GDM右下角齒輪會有GNOMEGNOME on Xorg的選項。

2. 強制瀏覽器使用純Wayland工作階段

@xmlking
xmlking / curl-with-http3-macos.md
Created December 4, 2021 20:09
Installing curl with http3 on MacOS

Work-in-pogress

Ref: cloudflare/homebrew-cloudflare#21

 # Clean up any old version of curl you may have already tried to install
brew remove -f curl

# Download the curl ruby install script provided by cloudflare
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active July 21, 2024 05:14
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active July 16, 2024 18:43
Docker Container Logging using Promtail
@sergiks
sergiks / README.md
Last active June 26, 2024 19:06
Let's Encrypt wildcard certificates in docker

NGINX and Certbot example with CloudFlare API in Docker

Sample config files to demonstrate seup that creates and updates free SSL certificates from Let's Encrypt given that the domains are maintained at CloudFlare service.

How it works

Certbot verifies domains ownership by accessing CloudFlare API that adds temporary TXT DNS records. To enable it You must provide your CloudFlare API token. More details in documentation for dns-cloudflare Certbot plugin.

Certbot saves created certificates in Docker volume certbot_etc. Pay attention to output of the certbot run - it mentions path to the created certificates.

@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active July 22, 2024 20:12
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@SmileyMan
SmileyMan / update_Cloudflare_DNS.sh
Last active July 8, 2023 00:05
Update Cloudflare DNS for both IPv4 and IPv6 Bash Script
#!/bin/bash
## Account details
auth_email='fred@blogs.com'
auth_key='00000000000000000000000000000000'
## Record to update
zone_name='domain.com'
record_name='domain.com'
@marwein
marwein / Microsoft Office 2019 RTM GVLK Keys
Created January 7, 2019 09:30
Microsoft Office 2019 RTM default #GVLK (Generic Volume License Key)
GVLKs for KMS and Active Directory-based activation of Office 2019 and Office 2016
Applies to: Volume licensed versions of Office 2019 and Office 2016, including Project and Visio
By default, volume licensed versions of Office 2019 and Office 2016 are installed with a Generic Volume License Key (GVLK).
The GVLK enables Office to automatically discover and activate against your KMS host computer or Active Directory infrastructure.
Important
These license keys can't be used to activate your personal copy of Office.
@darencard
darencard / entware_synology.md
Last active June 25, 2024 15:12
Setting up and using Entware on Synology device