Skip to content

Instantly share code, notes, and snippets.

View miooochi's full-sized avatar
🧬
Linux DNA.

kev miooochi

🧬
Linux DNA.
  • /dev/null
View GitHub Profile

Fedora Hacks

Configure source

sudo sed -e 's|^metalink=|#metalink=|g' \
         -e 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://mirrors.ustc.edu.cn/fedora|g' \
         -i.bak \
         /etc/yum.repos.d/fedora.repo \
 /etc/yum.repos.d/fedora-updates.repo
@miooochi
miooochi / auto-artifact-export.yml
Last active March 19, 2024 01:20
mosdns-v5 config template
---
- name: Update dat files
hosts: all
become: yes
vars:
- base_path: /etc/mosdns
- restart_daemon: yes
- daemon_service_name: mosdns
- clean_up_after: yes
---
PVE delte local-lvm partition
Reference: https://post.smzdm.com/p/awkv4pq4/
lvremove pve/data
lvextend -l +100%FREE -r pve/root
Datacenter >> remove `local-lvm` partition >> edit `local` >> select all options
@miooochi
miooochi / gpg.sh
Created March 10, 2024 03:58
Script to setup gnupg
#!/bin/sh
KEY_NAME="sa-slchris.asc"
LOCAL_KEYSERVER="http://192.168.56.109:9001"
KEY="5BB4DC20DCA50A499219935036F2D646E2E89820" # Key fingerprint
GPG_DIR="/etc/portage/gnupg"
PASS="$(openssl rand -base64 32)"
@miooochi
miooochi / shadowrocket-dns-leak-config
Created February 25, 2023 02:34
hadowrocket config, deal with DNS leak
# 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
@miooochi
miooochi / pve-trick-sriov-vf-configuration
Last active February 1, 2024 10:46
Enable SR-IOV VF on Proxmox 7+
# 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
@miooochi
miooochi / qnap_emby_nvidia.md
Last active January 30, 2024 15:57
Some hacks around using NVIDIA GPU for Emby Container with QNAP

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"
@miooochi
miooochi / 301-redirect-edge-function.md
Last active January 26, 2024 12:13
A JavaScript program for a 301 redirect with path mapping, suitable for deployment as a Cloud Function on AWS

Proposal

exports.handler = async (event) => {
  const request = event.Records[0].cf.request;
  const requestUri = request.uri;

  // Path mapping logic:
  const pathMappings = {
 "/": "/featuretoggle/uk", // Redirect root path to /featuretoggle/uk
{
"load_type": "linear",
"iteration_count": 10000,
"duration": 10,
"debug": false,
"output": "stdout",
"env": {
"TARGET_ENDPOINT": "http://10.0.0.229/staging/echo"
},
"steps": [