Skip to content

Instantly share code, notes, and snippets.

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.

@n0p
n0p / mysql-backup.sh
Created November 15, 2022 09:26
Q&D mysql/mariadb backup script
#!/bin/bash
/usr/bin/mysqldump -u root -p=asdf --all-databases | bzip2 > /var/backups/mariadb/dump-$(date +%Y%m%d-%H%M).sql.bz2
chmod 600 /var/backups/mariadb/*
find /var/backups/mariadb/ -type f -mtime +7 -name '*.bz2' -execdir rm -- '{}' \;
@n0p
n0p / ffmpeg.md
Created April 27, 2021 14:34 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@n0p
n0p / Makefile
Created November 19, 2019 16:49 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
@n0p
n0p / gist:15e6a356344d453840bdabeaa64d05f8
Created June 26, 2019 15:38
Debian automatic updates - DONT DO THIS :D
apt install -y unattended-upgrades apt-listchanges
echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections
dpkg-reconfigure -f noninteractive unattended-upgrades
@n0p
n0p / client.c
Created August 14, 2018 18:04 — forked from inaz2/client.c
IPv6 server & client in C
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
void ping(int s, char *message)
{
char buf[8192];
64QAM CR 2/3 GI 1/32 - 24128342.245989
ffmpeg -video_size 1366x768 -f x11grab -i :0.0 -vf scale=720x576 -aspect 16:9 -vcodec mpeg2video -s 720x576 -r 30 -b:v 16000k -muxrate 24128342 -mpegts_transport_stream_id 0xfea -mpegts_service_id 0xaf -mpegts_pmt_start_pid 0x4b0 -mpegts_start_pid 1201 -f mpegts -metadata provider_name="TBC final" -metadata service_name="TBC final work demo" -y /tmp/ffmpeg.fifo
ffmpeg -video_size 1366x768 -f x11grab -i :0.0 -vf scale=1280x720 -aspect 16:9 -pix_fmt yuv420p -c:v libx264 -x264-params keyint=20:min-keyint=30 -profile:v high -level 4.0 -preset ultrafast -s 1280x720 -r 24 -x264opts bitrate=4000:vbv-maxrate=4000:vbv-bufsize=166 -threads 2 -muxrate 24128342 -mpegts_transport_stream_id 0xfeb -mpegts_service_id 0xb0 -mpegts_pmt_start_pid 0x4b0 -mpegts_start_pid 1201 -f mpegts -metadata provider_name="TBC final HD" -metadata service_name="TBC final work demo HD" -y /tmp/ffmpeg.fifo
QPSK CR 2/3 GI 1/32 - 8042780.748
ffmpeg -video_size 1366x768 -f x11grab -i :0.0 -vf scale=720x5
@n0p
n0p / gitlab_stats.sh
Last active June 7, 2017 10:39 — forked from npotier/gitlab_stats.sh
Gitlab stats
# Dirty command line used to scan each gitlab repository and extract some stats
# in this case : foreach commit > 2014-01-01 get the number of commmits, number of line added, deleted grouped by users
rm /tmp/stats2014.csv; find ~git/git-data/repositories -name .git -prune -o -name '*.git' -print | while read directory; do cd $directory; git log --after="2014-01-01" --format='%aN' |sort -u | while read name; do echo -en "Project\t$directory\t" >> /tmp/stats2014.csv; echo -en "Author\t$name\t" >> /tmp/stats2014.csv; git log --after="2014-01-01" --after="2014-01-01" --author="$name" --pretty=format:%ae | gawk -- '{ ++c; } END { printf "Number of commits\t%s\t",c; }' >> /tmp/stats2014.csv; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "Added lines\t%s\tRemoved lines\t%s\tTotal lines\t%s\n", add, subs, loc }' >> /tmp/stats2014.csv; done; done;
tcpdump -A -s 0 'tcp dst port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
#con respuestas
tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
#POST
sudo tcpdump -s 0 -A 'tcp dst port 80 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)'
config wifi-device 'radio0'
option type 'mac80211'
option channel '4'
option hwmode '11ng'
option path 'soc/soc:pcie-controller/pci0000:00/0000:00:02.0/0000:02:00.0'
option htmode 'HT40+'
option country '00'
option bursting '1'
option ff '1'
option compression '1'