# Country Code
curl -s https://www.youtube.com/red | sed 's/,/\n/g' | grep countryCode
# Airport Code
curl -s https://redirector.googlevideo.com/report_mapping | grep "=>"
#!/bin/bash | |
__get_random_string () { | |
openssl rand -hex "${1}" | cut -c "1-${1}" | |
} | |
__my_vm='W10' |
哈哈,我也标题党一回。
其实也不算是秘密,只能说是我在制作 https://github.com/lennylxx/ipv6-hosts 时总结的规律。
Google 是世界上最大的互联网公司,其庞大的规模体现在[各个方面][]。其中一面即是其规模宏大的全球网络,以及难以计数的服务器。有人估计 Google 在 2013 年初的时候大概有 238 万台服务器。
Google 在全球建造了 13 个[数据中心][],通过其自己组建的多层内容分发网络(CDN),为全球超过 100 多个国家的用户提供免费内容及服务。
本文主要简要介绍一下 Google IPv6 地址与相关的域名。
#!/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 |
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): |
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.
#!/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 ... " |
# 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 |
#user nobody; | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; |