Skip to content

Instantly share code, notes, and snippets.

Avatar
🌎
contribute projects globally

Kevin Yu yqlbu

🌎
contribute projects globally
View GitHub Profile
@yqlbu
yqlbu / bootstrap.md
Last active February 28, 2023 16:34
Steps to bootstrap a k0s cluster with Cilium as the CNI solution
View bootstrap.md
@yqlbu
yqlbu / k0s-bootstrap.sh
Last active February 28, 2023 15:11
k0s-bootstrap.sh
View k0s-bootstrap.sh
#!/bin/sh
set -e
if [ -n "${DEBUG}" ]; then
set -x
fi
_k0s_latest() {
curl -sSLf "https://docs.k0sproject.io/stable.txt"
@yqlbu
yqlbu / shadowrocket-dns-leak-config
Created February 25, 2023 02:34
hadowrocket config, deal with DNS leak
View shadowrocket-dns-leak-config
# Shadowrocket配置文件,解决DNS泄露
[General]
bypass-system = true
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, captive.apple.com
tun-excluded-routes = 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.88.99.0/24, 192.168.0.0/16, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 255.255.255.255/32, 239.255.255.250/32
dns-server = system
ipv6 = false
prefer-ipv6 = false
dns-fallback-system = false
@yqlbu
yqlbu / auto-artifact-export.yml
Last active March 19, 2023 08:38
mosdns-v5 config template
View auto-artifact-export.yml
---
- name: Update dat files
hosts: all
become: yes
vars:
- base_path: /etc/mosdns
- restart_daemon: yes
- daemon_service_name: mosdns
- clean_up_after: yes
@yqlbu
yqlbu / qnap_emby_nvidia.md
Last active February 21, 2023 15:07
Some hacks around using NVIDIA GPU for Emby Container with QNAP
View qnap_emby_nvidia.md

Hacks

Some hacks around using NVIDIA GPU for Emby Container with QNAP

Make sure you have NVIDIA driver installed already

Check NVIDIA Driver Path

find /share/ -name "NVIDIA_GPU_DRV"
@yqlbu
yqlbu / Dockerfile
Last active February 11, 2023 13:48
AWS Lambda + Serverless Framework Demo
View Dockerfile
ARG FUNCTION_DIR="/function"
### Production Stage ###
FROM python:slim-bullseye as staging-image
# Include global args in this stage of the build
ARG FUNCTION_DIR
# Set working directory to function root
WORKDIR ${FUNCTION_DIR}
@yqlbu
yqlbu / pve-trick-sriov-vf-configuration
Last active February 26, 2023 14:24
Enable SR-IOV VF on Proxmox 7+
View pve-trick-sriov-vf-configuration
# The following is a step-by-step example for enabling SR-IOV VF on Promxox 7+ with BCM57810 10G NIC
---
References
https://forum.proxmox.com/threads/enabling-sr-iov-for-intel-nic-x550-t2-on-proxmox-6.56677/
https://zhuanlan.zhihu.com/p/91197211
https://zhuanlan.zhihu.com/p/356437308
https://zhiliao.h3c.com/Theme/details/24770
https://blog.csdn.net/Jackykxy/article/details/120585563
View ros-commands.md

RouterOS

SSH Configuration

$ ssh admin@router
[user@router] > /file print file=mykey;
[user@router] > /file set mykey contents="copy and paste contents of ~/.ssh/id_rsa.pub here";
[user@router] > /user ssh-keys import public-key-file=mykey.txt
[user@router] > /ip ssh set always-allow-password-login=yes"
@yqlbu
yqlbu / cilium_writeup.md
Created October 3, 2022 02:03
Cilium Writeup