Skip to content

Instantly share code, notes, and snippets.

View nunofgs's full-sized avatar

Nuno Sousa nunofgs

  • Customer.io
  • Braga, Portugal
  • X @nunofgs
View GitHub Profile
@nunofgs
nunofgs / README.md
Created November 1, 2026 11:45
RADV sampled-image residency repro: one pixel, two submissions, direct BO-list checks

RADV sampled-image residency repro

Two source files: repro.c and the five-line sample.comp. The executable creates one 1×1 image and a four-byte output buffer, clears the image in one submission, then samples it in a second submission. Its own ioctl wrapper checks the kernel BO lists. No Python, preload library, gamescope, window system or downloaded test harness.

On Linux with RADV, install a C compiler, pkg-config, Vulkan/libdrm development headers and libraries, and glslangValidator. Save both source files in one directory and run:

glslangValidator -V --vn sample_code sample.comp -o sample.h
cc -std=c11 -O2 -Wall -Wextra -Werror -Wl,--export-dynamic repro.c -o repro $(pkg-config --cflags --libs vulkan libdrm) -ldl
./repro 0
@nunofgs
nunofgs / load.sh
Created June 19, 2024 11:11
unalias sf
unalias sf
@nunofgs
nunofgs / README.md
Last active September 16, 2026 16:20
Use any RTSP camera with Prusa Connect

I use a cheap Tapo C100 webcam to monitor my 3D prints. It supports RTSP.

Screenshot 2023-07-17 at 23 26 34

Instructions

  1. Go to the Cameras section at https://connect.prusa3d.com
  2. Add a new camera.
  3. Click the QR code link
  4. Click "Start Camera"
@nunofgs
nunofgs / npm_chpwd_hook.sh
Last active November 9, 2020 02:09 — forked from puffnfresh/npm_chpwd_hook.sh
Adds node_modules/.bin to the PATH (zsh)
if ((!$+commands[npm])); then
return 1
fi
# Adds node_modules/.bin to the PATH
npm_bin_hook() {
if [ -n "${OLDPATH+x}" ]; then
PATH=$OLDPATH
unset OLDPATH
fi
@nunofgs
nunofgs / gist:11049389
Created April 18, 2014 15:17
keybase.md
### Keybase proof
I hereby claim:
* I am nunofgs on github.
* I am nunofgs (https://keybase.io/nunofgs) on keybase.
* I have a public key whose fingerprint is 70D0 D30B 3CB1 36D5 9957 92F7 9729 28B0 7001 D0AA
To claim this, I am signing this object: