Skip to content

Instantly share code, notes, and snippets.

View rhaleblian's full-sized avatar
🏄
not surfing, don't let the avatar fool you.

Ray Haleblian rhaleblian

🏄
not surfing, don't let the avatar fool you.
View GitHub Profile
@rhaleblian
rhaleblian / gist:ba80d8ef07905ce7774c0a4b40f565c3
Created October 30, 2026 19:47
steam-999220-1-backtrace.txt
Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0000000000000000).
Register dump:
rip:0000000000000000 rsp:000000000010f768 rbp:000000000010f8d9 eflags:00000246 ( - -- I Z- -P- )
rax:0000000079be6f20 rbx:0000000011b4d020 rcx:0000000000000000 rdx:0000000000000002
rsi:0000000000000002 rdi:00000000ffffffff r8:0000000000000000 r9:00000000ffffffff r10:000000014086a338
r11:000000000010f820 r12:00000000004642a0 r13:0000000000000000 r14:0000000011b4d020 r15:000000000054bff0
Stack dump:
0x0000000010f768: 00000001405da572 0000000000000000
0x0000000010f778: 0000000000000000 0000000011b4d020
0x0000000010f788: 000000000010f948 0000000011b3b640
@rhaleblian
rhaleblian / uv-sync-cuda.sh
Last active June 9, 2026 16:57
ComfyUI: Assuring a CUDA-enabled pytorch
# Problem: ComfyUI doesn't see your NVIDIA hardware.
# Say you are using `uv`:
uv pip install -r requirements --extra-index-url https://download.pytorch.org/whl/cu132
# where you match the suffixed number with your CUDA version:
nvidia-smi
# A flavor of this will work in non-uv cases (conda, venv) too.
@rhaleblian
rhaleblian / balance.sh
Last active June 9, 2026 16:59
Fetches OpenRouter balance.
#!/usr/bin/env bash
# Get your OpenRouter balance in your TUI.
curl https://openrouter.ai/api/v1/credits \
-H "Authorization: Bearer $OPENROUTER_API_KEY"
@rhaleblian
rhaleblian / build-sc3-plugins-pi.sh
Created March 12, 2026 02:59 — forked from madskjeldgaard/build-sc3-plugins-pi.sh
Install SuperCollider and SC3-plugins headless on Raspberry Pi
#!/bin/sh
# Taken from: https://github.com/lvm/build-supercollider
###
#
# Variables
#
INSTALL_DIR=/tmp
SUPERCOLLIDER_VER=main
SC3PLUGINS_DIR=$INSTALL_DIR/sc3-plugins
@rhaleblian
rhaleblian / lickit.sh
Last active February 20, 2026 19:51
Build zeroclaw on desktop for Bela Classic
# ref: https://doc.rust-lang.org/nightly/rustc/platform-support.html
# this may change for Bela Gem
TARGET=armv7-unknown-linux-gnueabihf
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# select (1)
. "$HOME/.cargo/env"
cargo install cross

There are two approaches: cross-compiling and direct use. Everybody does the first but Ray is trying the second because the cross-compiler barfs on some HAL libraries and dammit if we were not going to use the OS we would just have a microcontroller.

Approach B: Direct Use

Have more than a GB of free space. I put /root on an SD.

Install Rust using https://rustup.rs .

Create a crate:

[General]
vid_renderer = qt_opengl3
video_fullscreen_scale = 3
[Machine]
machine = tc430hx
cpu_family = pentium_p54c
cpu_speed = 166666666
cpu_multi = 2.5
cpu_use_dynarec = 1
@rhaleblian
rhaleblian / gist:5f490047a983f01188b717b2049e40ad
Created April 10, 2022 15:27
86box-apple-silicon-build.sh
cmake -B build -S . --toolchain "./cmake/llvm-macos-aarch64.cmake" \
-D VNC=OFF -D NEW_DYNAREC=ON -D QT=ON -D USE_QT6=ON \
-D Qt6QCocoaIntegrationPlugin_DIR=/opt/homebrew/Cellar/qt/6.2.3_1/lib/cmake/Qt6Gui \
-D Qt6QMacStylePlugin_DIR=/opt/homebrew/Cellar/qt/6.2.3_1/lib/cmake/Qt6Widgets \
-D Qt6QICOPlugin_DIR=/opt/homebrew/Cellar/qt/6.2.3_1/lib/cmake/Qt6Gui \
-D Qt6QICNSPlugin_DIR=/opt/homebrew/Cellar/qt/6.2.3_1/lib/cmake/Qt6Gui \
--install-prefix /Users/$USER/Developer/86Box/build/src/ -DCMAKE_BUILD_TYPE=Release -G Ninja -DFAUDIO=ON
cmake --build build --target install && codesign --force --deep -s - ./build/src/86Box.app
@rhaleblian
rhaleblian / vmware-fusion-tech-preview-bad-kernel-week-install.md
Last active December 18, 2023 23:26
Installing Ubuntu Server in VMware Fusion Tech Preview during Bad Kernel Week
@rhaleblian
rhaleblian / rtl8188eu.sh
Last active March 8, 2022 12:41
install wifi kernel module for Edimax 7392:b811
# the Edimax WiFi dongle.
cd /usr/src
git clone https://github.com/lwfinger/rtl8188eu
mv rtl8188eu rtl8188eu-4.1.4
dkms add rtl8188eu/4.1.4
dkms build rtl8188eu/4.1.4
dkms install rtl8188eu/4.1.4
dkms status