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 / vimdiff.md
Last active September 7, 2025 20:47 — forked from zertrin/vimdiff.md

vimdiff cheat sheet

vimdiff commands

  • ]c - next difference
  • [c - previous difference
  • Ctrl+w+w - switch windows
  • do - diff obtain
  • dp - diff put
  • zo - open folded text
@aravindanve
aravindanve / bypass-disable-devtool.md
Last active October 23, 2025 00:36
Bypass disable-devtool

(Working as of 2025-02-09)

There are websites that use disable-devtool to prevent you from opening or using devtools. They typically prevent you from right clicking or using the keyboard shortcut to open devtools. Even if you successfully do so, they detect it and redirect you elsewhere. You can bypass this by using one of the following ways.

Opening devtools

If the shortcut F12 on Windows or Option + ⌘ + I on Mac do not work. Press the three vertically aligned dots in the top right corner of your Google Chrome or Microsoft Edge window. Under the section "More Tools", you'll see the option to select "Developer Tools" which opens the toolkit in your window.

@trinitronx
trinitronx / OSX-KVM - Fixing the SSDT-EHCI for working usb-kbd and usb-tablet.md
Last active May 21, 2025 12:08
Diagnosing and fixing mismatched SSDT USB controller PCI addresses in OSX-KVM

Problem

When adding and removing devices to a QEMU VM created from OSX-KVM, I encountered some device problems.

While tinkering and fiddling with adding and removing different QEMU devices to the VM, the order of -device flags passed caused PCI addresses to keep changing. This, in turn caused keyboard and mouse support to stop working for me, until I found out what the problem was.

@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"
@peppergrayxyz
peppergrayxyz / qemu-vulkan-virtio.md
Last active October 14, 2025 18:01
QEMU with VirtIO GPU Vulkan Support

QEMU with VirtIO GPU Vulkan Support

With its latest reales qemu added the Venus patches so that virtio-gpu now support venus encapsulation for vulkan. This is one more piece to the puzzle towards full Vulkan support.

An outdated blog post on clollabora described in 2021 how to enable 3D acceleration of Vulkan applications in QEMU through the Venus experimental Vulkan driver for VirtIO-GPU with a local development environment. Following up on the outdated write up, this is how its done today.

Definitions

Let's start with the brief description of the projects mentioned in the post & extend them:

@starkdmi
starkdmi / ROCm Installation on AMD Ryzen 7 PRO 8700GE.md
Created November 2, 2024 09:41
Installing and verifying ROCm 6.2 and PyTorch 2.6 on AMD Ryzen 7 PRO 8700GE running Ubuntu
@NoXPhasma
NoXPhasma / installation.md
Last active June 21, 2024 16:51
Install stable-diffusion-webui with ROCm support on Linux

Install stable-diffusion-webui with ROCm support on Arch Linux

First time installation:

  1. Clone and switch to the stable-diffusion-webui folder
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
  1. Create a new python environment and switch to it
@damico
damico / test-rocm.py
Created April 10, 2023 18:54
Script for testing PyTorch support with AMD GPUs using ROCM
import torch, grp, pwd, os, subprocess
devices = []
try:
print("\n\nChecking ROCM support...")
result = subprocess.run(['rocminfo'], stdout=subprocess.PIPE)
cmd_str = result.stdout.decode('utf-8')
cmd_split = cmd_str.split('Agent ')
for part in cmd_split:
item_single = part[0:1]
item_double = part[0:2]
@visualblind
visualblind / sysctl-tunables
Created April 5, 2021 23:54 — forked from mizhka/sysctl-tunables
FreeBSD 13-GENERIC-CURRENT tunables
kern.maxproc: Maximum number of processes
kern.ngroups: Maximum number of supplemental groups a user can belong to
kern.ipc.shm_allow_removed: Enable/Disable attachment to attached segments marked for removal
kern.ipc.shm_use_phys: Enable/Disable locking of shared memory pages in core
kern.ipc.shmall: Maximum number of pages available for shared memory
kern.ipc.shmseg: Number of segments per process
kern.ipc.shmmni: Number of shared memory identifiers
kern.ipc.shmmin: Minimum shared memory segment size
kern.ipc.shmmax: Maximum shared memory segment size
kern.ipc.semaem: Adjust on exit max value
@sindresorhus
sindresorhus / esm-package.md
Last active October 21, 2025 13:33
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.