Skip to content

Instantly share code, notes, and snippets.

View conoro's full-sized avatar

Conor O'Neill conoro

View GitHub Profile
@conoro
conoro / qwen_image_21_dual_gpu_bf16.py
Created September 21, 2026 07:36
Qwen-Image-2.1 running in BF16 on 2× RTX 3060 12GB
#!/usr/bin/env python3
"""Unquantized Qwen-Image-2.1 for two 12GB CUDA GPUs and 32GB system RAM.
Run in the SAME environment as the working 4-bit script; no new packages:
python test02_bf16_staged.py --width 512 --height 512 --steps 10
python test02_bf16_staged.py
Default: 768x768, 40 steps, seed 42; saves t2i_bf16.png and a timings JSON.
Stages: BF16 prompt encoder on both GPUs -> unload -> BF16 transformer on
both GPUs -> unload -> tiled BF16 VAE decoding on GPU 0. Only small embeddings
@conoro
conoro / qwen_image_21_dual_gpu.py
Created September 21, 2026 06:30
Run Qwen-Image-2.1 on 2x RTX3060 12GB with 4-bit quantization
#!/usr/bin/env python3
"""Qwen-Image-2.1: NF4 text encoder on GPU 0, NF4 generator + BF16 VAE on GPU 1.
Run inside the existing Qwen virtual environment:
python -m pip install bitsandbytes
python test01_dual_gpu.py
python test01_dual_gpu.py --width 512 --height 512 --steps 10
For a uv environment without pip, use: uv pip install bitsandbytes
@conoro
conoro / app.js
Last active February 24, 2026 08:34
BTHome/Home Assistant compatible Temperature Sensor using Espruino on NodeConfEU 2018 Badge (Pixl.js)
// NodeConf EU 2018 Badge - BTHome Temperature + Clock Display
// ============================================================
// Broadcasts temperature + button events to Home Assistant
// via BTHome v2 over BLE advertisements.
//
// Time sync: At boot and hourly, the badge scans for a nearby
// ESP32 beacon named "badge-time-sync" that broadcasts the
// current Unix timestamp in BLE manufacturer data. No BLE
// connections needed - purely passive scanning.
//
@conoro
conoro / George_Foreman_Timer_02.ino
Created December 20, 2023 09:32
Arduino Franken-Timer for George Foreman Grill. ESP32-S2 with Hardware SPI to OLED screen. Tune on simple speaker.
#include "pitches.h"
#include "CountDown.h"
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789
#include <Fonts/FreeSans24pt7b.h>
#include <SPI.h>
#define TFT_CS 10
#define TFT_RST 7
#define TFT_DC 5
@conoro
conoro / build_sqlitestudio_raspi.sh
Created February 18, 2022 04:24
Build SQLiteStudio 3 on Raspberry Pi 4 64-bit OS
sudo apt-get install qt5-default qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools tcl tcl-dev libreadline-dev qtscript5-dev libsqlite3-dev qttools5-dev libqt5svg5-dev
curl -o sqlitestudio-3.3.zip https://codeload.github.com/pawelsalawa/sqlitestudio/zip/refs/heads/3.3
unzip sqlitestudio-3.3.zip
cd sqlitestudio-3.3
mkdir -p output/build
cd output/build
qmake "CONFIG += portable" ../../SQLiteStudio3
make
cd ../SQLiteStudio/
./sqlitestudio
@conoro
conoro / exampledb.json
Last active August 5, 2021 16:08
Using GIST as a simple JSON DB
[
{
"color": "red",
"value": "#f00"
},
{
"color": "green",
"value": "#0f0"
},
{
@conoro
conoro / brella_attendees.js
Created May 13, 2021 16:20
Extract the list of attendees at a Brella-powered conference from the local saved HTML to CSV
var fs = require('fs');
const cheerio = require('cheerio');
const data = fs.readFileSync('Brella_Page1.html');
var $ = cheerio.load(data);
$('.e1h0e2yk3').each(function (i, elem) {
const name = $(this).find(".e1h0e2yk6").text();
const title = $(this).find(".e1h0e2yk7").text();
const desc = $(this).find(".e1h0e2yk9").text();
@conoro
conoro / picoris.cpp
Last active February 21, 2021 10:47
Tetris on Raspberry Pi Pico from Reddit post
// Just a copy of the code referenced here: https://www.reddit.com/r/raspberry_pi/comments/l6flip/a_very_tiny_game_of_tetris_my_first_test_of_the/
// With minor changes to make it compile
#include <string.h>
#include <math.h>
#include <vector>
#include <cstdlib>
#include "pico_display.hpp"
//#include "pico/multicore.h"
@conoro
conoro / kaios_windows_2020.md
Created August 10, 2020 11:31
Setting up a KaiOS Dev Environment on Windows in August 2020

Horrendous list of deprecated, missing or old tools/files that you have to use to develop on KaiOS in 2020. This is how I got it working.

  • Install Firefox 59 from here: https://ftp.mozilla.org/pub/firefox/releases/59.0/win64/ in a non-standard location
  • Immediately go into Firefox Settings and disable automatic-updates or it'll get rid of version 59 after it restarts (you may have to do this several times)
  • Unzip ADB Tools to c:\platform-tools and add that to the Windows Path
  • Enable Developer mode on your phone "Device > Developer > Debugger > ADB and DevTools" if that menu is visible.
  • If Developer menu not visible, type the following on your phone: *#*#0574#*#*
  • And then go into the ADB setting that appears on the screen and enable it
  • Then type the following on your phone: *#*#33284#*#* to enable developer mode
  • Plug your phone into your PC with a USB cable and unlock the screen
@conoro
conoro / stop_chromium_check.sh
Created July 2, 2020 04:41
Stop Chromium on RPi saying it's out of date
sudo touch /etc/chromium-browser/customizations/01-disable-update-check;echo CHROMIUM_FLAGS=\"\$\{CHROMIUM_FLAGS\} --check-for-update-interval=31536000\" | sudo tee /etc/chromium-browser/customizations/01-disable-update-check