Skip to content

Instantly share code, notes, and snippets.

View xeoncross's full-sized avatar

David Pennington xeoncross

View GitHub Profile
@xeoncross
xeoncross / draw_things_notes.md
Last active September 15, 2026 22:04
Draw Things - Image generation on MacOS

Draw Things

https://drawthings.ai/ provides a closed-source binary that works well with a nice UI as well as a HTTP server you can enable to call different models from other programs/apps.

If you want to manually create images this is the best free choice I've seen so far. It's also pretty low-memory compared to others I've tried. 10GB for their flux.2 [klein] 4b model.

Once you start the Draw Things app pick some models to download, then go to "all settings" and enable the HTTP server. Then call it with CURL:

curl -sS --max-time 600 \
@xeoncross
xeoncross / linkedin_more_job.js
Created September 10, 2026 19:52
Automatically clicks the "…more" link on LinkedIn job descriptions so the full text is always shown
// ==UserScript==
// @name LinkedIn Job Description Auto-Expander
// @namespace https://tampermonkey.net/
// @version 1.0.0
// @description Automatically clicks the "…more" link on LinkedIn job descriptions so the full text is always shown
// @author xeoncross
// @match https://www.linkedin.com/jobs/*
// @run-at document-idle
// @grant none
// ==/UserScript==
@xeoncross
xeoncross / latency.txt
Created August 10, 2026 21:16 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@xeoncross
xeoncross / qwen_m1_macbook.md
Last active August 18, 2026 19:09
Qwen performance on M1 Max 64GB Macbook

Prompt: "Please review the home.nix configuration and note anything that can be done to simplify the nix configuration"

All the prompts review 2-3 .nix files and recommend 6-10 improvements on them.

The following are raw notes about how each model performs.

Hardware: M1 Max (10 CPU) 64GB RAM Macbook (Tahoe 26.5)

Notes:

@xeoncross
xeoncross / qwen3.6-27b-cline-vscode.md
Last active June 29, 2026 20:49
Best local LLM model for VSCode and general programming / coding on a macbook

https://quesma.com/blog/qwen-36-is-awesome/

It comes in two variants, a mixture-of-experts model Qwen 3.6 35B A3B, and a dense Qwen 3.6 27B - slower, but more powerful. The one I recommend!

Note: I've found the 35B-A3B model to run at least 2x fast which is nice when you just need quick results for focused tasks. For larger or multi-step processes the 27B model is worth the wait. Here is the local setup guide to get it working with VSCode via Cline extension.

1. Install llama on MacOS

brew install llama.cpp

@xeoncross
xeoncross / zed_overrides.json
Created April 29, 2026 16:12
https://zed.dev/theme-builder overrides of one-light theme to make it mostly black-and-white
{
"theme_overrides": {
"One Light": {
"syntax": {
"attribute": {
"color": "#000000FF"
},
"constructor": {
"color": "#000000FF"
},
@xeoncross
xeoncross / Makefile
Created January 25, 2025 17:41 — forked from eleniums/Makefile
Sample Go Makefile to build binaries for Windows, Mac, and Linux.
EXECUTABLE=executable-name
WINDOWS=$(EXECUTABLE)_windows_amd64.exe
LINUX=$(EXECUTABLE)_linux_amd64
DARWIN=$(EXECUTABLE)_darwin_amd64
VERSION=$(shell git describe --tags --always --long --dirty)
.PHONY: all test clean
all: test build ## Build and run tests
@xeoncross
xeoncross / checksum-collider.go
Created November 11, 2024 16:34 — forked from ross-spencer/checksum-collider.go
Checksum Collider Example
//Simulation of the Birthday Paradox
//Find no. files needed for chance of a single collision
package main
import "fmt"
import "math"
func main() {
var BITS float64 = 512
@xeoncross
xeoncross / splitByStrings.go
Created March 20, 2024 20:08
Split code into chunks (processing args, coloring syntax, etc..) based on if strings exist while taking escape characters into account. Golang rune parsing supports UTF8.
// Run at: https://go.dev/play/p/oFUYPNRZiBp
package main
import "fmt"
// Suppose you have a piece of code you want to split into chunks based on if you're in a string or not.
// You also want to respect escape characters.
var input = `fmt.Println("Hello, \"世界\"")`
@xeoncross
xeoncross / gencert.go
Created January 27, 2024 17:14
Generate a self-signed certificate in Go
package main
import (
"bytes"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"