Skip to content

Instantly share code, notes, and snippets.

View trinitronx's full-sized avatar
⛩️
Zazen

James Cuzella trinitronx

⛩️
Zazen
View GitHub Profile
@trinitronx
trinitronx / OSX-KVM - Fixing the SSDT-EHCI for working usb-kbd and usb-tablet.md
Last active January 16, 2025 08:12
Diagnosing and fixing mismatched SSDT USB controller PCI addresses in OSX-KVM

Investigating what OSX-KVM's pre-packaged SSDT files contained, I ran into an issue with the default USB controllers' PCI addresses. The USB controllers I was passing to QEMU did not match the [default VM definition][0] & [SSDT][0.1].

To more easily see the XNU kernel debugging output:

  • I added a serial console device to the VM via this libvirt domain XML snippet:
@trinitronx
trinitronx / install-vagrant-libvirt.sh
Created December 30, 2024 22:38
Workaround script to install vagrant-libvirt + vagrant 2.4.3 on Arch Linux & Arch-based distros
#!/bin/bash
export VAGRANT_DEBUG=1
export VAGRANT_DEBUG_LAUNCHER=1
export VAGRANT_LOG=debug
## Setting above debug options reveals vagrant substrate's default environment:
#2024/12/17 09:02:16 launcher: env "CFLAGS" = "-I/opt/vagrant/embedded/include -I/opt/vagrant/embedded/include/libxml2 -lcurl -I/opt/vagrant/embedded/include -I/opt/vagrant/embedded/include/libxml2"
#2024/12/17 09:02:16 launcher: env "CONFIGURE_ARGS" = "with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib with-curl-include=/usr/include/curl with-curl-lib=/usr/lib "
#2024/12/17 09:02:16 launcher: env "CPPFLAGS" = "-I/opt/vagrant/embedded/include -I/opt/vagrant/embedded/include/libxml2"
[2024-09-11T17:48:17-0600] [PACMAN] Running 'pacman -Sy'
[2024-09-11T17:48:17-0600] [PACMAN] synchronizing package lists
[2024-09-11T17:57:56-0600] [PACMAN] Running 'pacman -Syu'
[2024-09-11T17:57:56-0600] [PACMAN] synchronizing package lists
[2024-09-11T17:57:56-0600] [PACMAN] starting full system upgrade
[2024-09-11T17:58:11-0600] [ALPM] transaction started
[2024-09-11T17:58:11-0600] [ALPM] upgraded tzdata (2024b-1 -> 2024b-2)
[2024-09-11T17:58:11-0600] [ALPM] upgraded gcc-libs (14.2.1+r32+geccf707e5ce-1 -> 14.2.1+r134+gab884fffe3fc-1)
[2024-09-11T17:58:11-0600] [ALPM] upgraded systemd-libs (256.5-1 -> 256.6-1)
[2024-09-11T17:58:12-0600] [ALPM] upgraded systemd (256.5-1 -> 256.6-1)
@trinitronx
trinitronx / vscode-app-1720900028611.log
Created July 13, 2024 20:38
Cursor: potential listener LEAK detected
workbench.desktop.main.js:450 [bc9] potential listener LEAK detected, having 202 listeners already. MOST frequent listener (8):
check @ workbench.desktop.main.js:450
q @ workbench.desktop.main.js:452
$ @ workbench.desktop.main.js:1115
K @ workbench.desktop.main.js:1266
L @ workbench.desktop.main.js:1279
createModel @ workbench.desktop.main.js:1280
o @ workbench.desktop.main.js:21992
provideTextContent @ workbench.desktop.main.js:21992
u @ workbench.desktop.main.js:21990
@trinitronx
trinitronx / vscode-app-1720901368332.log
Created July 13, 2024 20:35
Cursor: api2.cursor.sh blocked by CORS policy
workbench.desktop.main.js:1172 Overwriting filename <<.env>> to now point to mime <<text/x-dotenv>>
(anonymous) @ workbench.desktop.main.js:1172
workbench.desktop.main.js:1172 Overwriting filepattern <<.env.*>> to now point to mime <<text/x-dotenv>>
(anonymous) @ workbench.desktop.main.js:1172
workbench.desktop.main.js:1172 Overwriting extension <<.pod>> to now point to mime <<text/x-systemd-conf>>
(anonymous) @ workbench.desktop.main.js:1172
workbench.desktop.main.js:1172 Overwriting extension <<.erb>> to now point to mime <<text/x-erb>>
(anonymous) @ workbench.desktop.main.js:1172
workbench.desktop.main.js:1172 Overwriting extension <<.rhtml>> to now point to mime <<text/x-erb>>
(anonymous) @ workbench.desktop.main.js:1172
@trinitronx
trinitronx / 00-dmesg-xfs_mount_failure.log
Last active April 9, 2024 18:55
XFSv4 corrupted after kernel 6.7.11-3-MANJARO, xfsprogs 6.6.0-1
Mar 31 10:08:38 saturn kernel: XFS (md0): Mounting V4 Filesystem 29af87eb-2c60-4383-8596-079de2033a48
Mar 31 10:08:39 saturn kernel: XFS (md0): Metadata corruption detected at xfs_inobt_verify+0x91/0xb0 [xfs], xfs_inobt block 0xd78
Mar 31 10:08:39 saturn kernel: XFS (md0): Unmount and run xfs_repair
Mar 31 10:08:39 saturn kernel: XFS (md0): First 128 bytes of corrupted metadata buffer:
Mar 31 10:08:39 saturn kernel: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .........
@trinitronx
trinitronx / Output of: yay -Syu projectm-sdl2-git
Last active December 8, 2023 07:12
projectm-sdl2-git CMake Poco build error on Archlinux & Manjaro
==> Making package: projectm-sdl2-git 62.ab46c53-1 (Thu 07 Dec 2023 11:43:01 PM MST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating frontend-sdl2 git repo...
==> Validating source files with sha256sums...
frontend-sdl2 ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Creating working copy of frontend-sdl2 git repo...
@trinitronx
trinitronx / .gitconfig
Last active October 18, 2023 23:58
My version of git-fzf: gls (plus helpful aliases & snippets from my .gitconfig)
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[core]
pager = less -FXRS -x2
[alias]
st = status
@trinitronx
trinitronx / git-fzf.zsh
Created October 18, 2023 23:50
My version of git-fzf: gls
# Source: https://gist.github.com/junegunn/f4fca918e937e6bf5bad?permalink_comment_id=3356674#gistcomment-3356674
alias glNoGraph='git log --color=always --format="%C(auto)%h%d %s %C(brightblack)%C(bold)%cr% C(auto)%an %G?" "$@"'
_gitLogLineToHash="echo {} | grep -o '[a-f0-9]\{7\}' | head -1"
_viewGitLogLine="$_gitLogLineToHash | xargs -I % sh -c 'git show --color=always --show-signature % | delta'"
_viewGitLogLineUnfancy="$_gitLogLineToHash | xargs -I % sh -c 'git show %'"
# ANSI Colors
c_reset='\033[0m'
c_black='\033[0;30m'
@trinitronx
trinitronx / find-output-all-Mach-O.log
Last active January 24, 2022 19:01
Native vagrant + vagrant-libvirt gem binaries
# Vagrant plugin directory
$ find ~/.vagrant.d/gems/2.7.4/ \( -iname '*.gemspec' -o -iname '.DS_Store' -o -iname '*.yaml' -o -iname '*.gz' -o -iname '*.pub' -o -iwholename '*/spec/*' -o -iwholename '*/test/*' \) -prune -o -type f -print0 | xargs -0 file | grep -v 'tar archive\|Ruby script\|ASCII text\|empty\|PNG image\|PEM\|JSON\|SPEC\|Unicode text\|HTML doc\|Git \(index\|pack\|bundle\)\|SVG\|ISO 9660\|Perl script\|JPEG\|CSV text'
~/.vagrant.d/gems/2.7.4//extensions/arm64-darwin-21/2.7.0/ruby-libvirt-0.8.0/_libvirt.bundle: Mach-O 64-bit bundle arm64
~/.vagrant.d/gems/2.7.4//gems/ruby-libvirt-0.8.0/ext/libvirt/nwfilter.o: Mach-O 64-bit object arm64
~/.vagrant.d/gems/2.7.4//gems/ruby-libvirt-0.8.0/ext/libvirt/nodedevice.o: Mach-O 64-bit object arm64
~/.vagrant.d/gems/2.