Skip to content

Instantly share code, notes, and snippets.

View muink's full-sized avatar
:octocat:

Anya Lin muink

:octocat:
  • Azeroth land
View GitHub Profile
@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 / 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;
@muink
muink / dns_ttl.sh
Created July 25, 2020 06:42 — forked from weisi/dns_ttl.sh
尝试利用 IP.TTL 确定 DNS 污染发生的位置
#!/bin/bash
# Weisi Dai <weisi@cmu.edu>
#
# Usage: bash dns_ttl.sh 8.8.8.8
#
# Dependencies: mtr dig iptables bc
DOMAIN=twitter.com
DNS=$1
@muink
muink / pcap-dnsproxy-watchdog.sh
Created December 6, 2019 11:15 — forked from HackingGate/pcap-dnsproxy-watchdog.sh
A watchdog for Pcap-DNSProxy on OpenWrt
PROG=/usr/sbin/Pcap_DNSProxy
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S")
if [ $(ps|grep ${PROG}|grep -v grep|wc -l) -ge 1 ]; then
echo "['$LOGTIME'] Pcap_DNSProxy is running, PID is $(pidof ${PROG##*/})"
else
echo "['$LOGTIME'] Pcap_DNSProxy is not running."
/etc/init.d/pcap-dnsproxy start
fi
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@muink
muink / get_latest_release.sh
Created October 14, 2019 12:33 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@muink
muink / make_windows10_great_again.bat
Created April 13, 2019 09:36 — forked from IntergalacticApps/make_windows10_great_again.bat
Make Windows 10 Great Again - stop Windows 10 spying!
@echo off
setlocal EnableDelayedExpansion
ver | find "10." > nul
if errorlevel 1 (
echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
pause
exit
)
@muink
muink / Disable Windows Annoyances.md
Created April 9, 2019 15:31 — forked from Zenexer/Disable Windows Annoyances.md
Permanently disable Windows Defender and other annoyances in Windows.

Instructions

  • To disable a service, download Disable<Service>.reg and double-click to import. (Replace <Service> with the name of the service you want to disable.)
  • To re-enable a service, download Enable<Service>.reg and double-click to import. (Replace <Service> with the name of the service you want to enable.)

Note that if you save the files by copying them into a text editor, they may need to be saved with Windows-style line endings (\r\n).

Services

@muink
muink / osu_on_linux_overhaul.md
Created February 22, 2019 13:54 — forked from Francesco149/osu_on_linux_overhaul.md
Ultimate guide to low-latency osu on linux