Skip to content

Instantly share code, notes, and snippets.

View muink's full-sized avatar
🍭
🍭 🍭

Anya Lin muink

🍭
🍭 🍭
  • Azeroth land
View GitHub Profile
@muink
muink / SolidWorks_Spoof.sh
Created December 3, 2024 14:36 — forked from tamnil/SolidWorks_Spoof.sh
Simple script to make a Virtualbox VM hidden enough to install SolidWorks
#!/bin/bash
__get_random_string () {
openssl rand -hex "${1}" | cut -c "1-${1}"
}
__my_vm='W10'
@muink
muink / youtube-node.md
Created July 24, 2024 12:32
Youtube 节点地区分配
@muink
muink / the-secret-of-google-domains.md
Created July 24, 2024 12:28
Google 域名的秘密

Google 域名的秘密

哈哈,我也标题党一回。
其实也不算是秘密,只能说是我在制作 https://github.com/lennylxx/ipv6-hosts 时总结的规律。
Google 是世界上最大的互联网公司,其庞大的规模体现在[各个方面][]。其中一面即是其规模宏大的全球网络,以及难以计数的服务器。有人估计 Google 在 2013 年初的时候大概有 238 万台服务器。
Google 在全球建造了 13 个[数据中心][],通过其自己组建的多层内容分发网络(CDN),为全球超过 100 多个国家的用户提供免费内容及服务。
data_center
本文主要简要介绍一下 Google IPv6 地址与相关的域名。

Google ([AS15169][]) IPv6 地址分配

@muink
muink / parallel.sh
Last active February 15, 2024 16:10
bash parallel execution
#!/bin/bash
pause() { read -p "Press any key to continue..." -n1 -r; }
# func <min> <max>
randnum() {
local min=$1
local max=$[ $2 - $min + 1 ]
local num=$(cat /dev/urandom 2>/dev/null | head -n 8 | cksum | cut -f1 -d' ')
echo $[ $num % $max + $min ]
def urldecode:
def hex2dec:
{"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,"A":10,"B":11,"C":12,"D":13,"E":14,"F":15} as $hexTable
| [1,16,256,4096,65536,1048576,16777216,268435456] as $pow16
| def str2dec:
split("") | reverse as $arr
| last( foreach range(length) as $i (0; . + $hexTable[($arr[$i]|ascii_upcase)] * $pow16[$i]) );
if type == "string" then
str2dec
elif type == "array" then
@muink
muink / urid.jq
Last active February 15, 2024 12:52 — forked from jcracknell/urldecode.jq
def urid:
def uni2num:
if 48 <= . and . <= 57 then . - 48 elif 65 <= . and . <= 70 then . - 55 else . - 87 end;
# ^ ^ ^ ^ ^
# | | | | 97 | 102
# uni0 ---------- uni9 -48=0-9 uniA ----------- uniF -55=10-15 unia - unif -87=10-15
# de pct-encoded
def decode:
def loop($i):

Enable & Using vGPU Passthrough

This gist is almost entirely not unlike Derek Seaman's awesome blog:

Proxmox VE 8: Windows 11 vGPU (VT-d) Passthrough with Intel Alder Lake

As such please refer to that for pictures, here i will capture the command lines I used as i sequence the commands a little differently so it makes more logic to me.

This gists assumes you are not running ZFS and are not passing any other PCIE devices (as both of these can require addtional steps - see Derek's blog for more info)

Note:i made no changes to the BIOS defaults on the Intel Nuc 13th Gen. This just worked as-is.

@muink
muink / PCI_HW_passthrough.sh
Last active March 10, 2025 09:09
Proxmox VE install tools
#!/bin/bash
# Constants
DEFGRUB="/etc/default/grub"
KLCMDL="/etc/kernel/cmdline"
MODULES_CONF="/etc/modules"
I915_SRIOV_DIR="$HOME/i915-sriov-dkms"
pause() {
read -s -n1 -p "Press any key to continue ... "
@muink
muink / format_subnet.sh
Last active January 27, 2024 08:25
Network address processing code snippet
# format_subnet <destination variable> <subnet>
# <subnet> format: 192.168.1.1/24
format_subnet() {
[ "$#" -ge 2 ] || return 1
local insubnet="$2"
local address=${insubnet%/*}
local mlen=${insubnet#*/}
local FULL_MASK_INT=$((0xFFFFFFFF))
local MASK_LEN=$mlen
@muink
muink / nginx.conf
Created April 30, 2023 04:08 — forked from unixcharles/nginx.conf
nginx config for http/https proxy to localhost:3000
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;