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 / 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
@rhaleblian
rhaleblian / 2021-high-sierra-gotchas.md
Last active August 17, 2021 00:06
High Sierra gotchas, now that it's 2021

Homebrew no longer supports macFUSE

"... because it is no longer open source, as a result, it seems all formulae that depend on macFUSE are being disabled." You can still install sshfs via the homebrew-fuse tap:

brew install gromgit/fuse/sshfs

"Allow" button not working when System Software is blocked from loading

https://discussions.apple.com/thread/8229455