Skip to content

Instantly share code, notes, and snippets.

View CodeZombie's full-sized avatar
🌵

Jeremy Clark CodeZombie

🌵
View GitHub Profile
@CodeZombie
CodeZombie / guide.md
Last active September 4, 2025 16:40
The Cheap-Ass Ipod 5h gen SD Card Mod

TL;DR: You can use a very cheap ZIF to Micro SD adapter on a 5th (and probably others) gen iPod, and with some thin paper/tape and some good timing, you too can have a budget solid state storage upgrade.

Preamble

I only ever buy pretty out of date phones. My latest purchase, the Google Pixel 6, has introduced me to the wonderful world of not having 3.5mm headphone jacks on anything, and I have to say:

I hate it.

I realize I'm late to the party here, but I don't know how you fucking people have been suffering like this for so long.

@CodeZombie
CodeZombie / uid_conflict_fix.py
Last active September 14, 2025 16:11
Godot UID conflict fixer
import os
import re
import argparse
import random
import string
def generate_new_uid(all_known_uids_set):
"""
Generates a new unique Godot-like UID (uid:// followed by 12 lowercase alphanumeric chars).
@CodeZombie
CodeZombie / comfy_prompt_extractor.py
Created April 18, 2025 22:07
ComfyUI Image prompt extractor
import sys
import json
from PIL import Image
# qt
from PyQt5.QtWidgets import QApplication, QMessageBox, QWidget, QTextEdit, QVBoxLayout, QLabel
from PyQt5.QtGui import QIcon, QFont
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QSizePolicy
@CodeZombie
CodeZombie / main.gd
Created February 24, 2025 05:54
Self deleting lambda signals in Godot
extends Node
signal sig
class SigTest:
var x: int = 0
func on_signal(sig: Signal, callable: Callable):
var this_object_weakref: WeakRef = weakref(self)
var wrapped_callable: Callable = func(f: Callable):
if this_object_weakref.get_ref() == null:
@CodeZombie
CodeZombie / profit_calc.py
Last active October 14, 2024 15:29
runescape ge profit calculator
import math
from collections import namedtuple
ProductVolPrice = namedtuple("ProductVolPrice", "volume price")
### INPUTS ZONE #################
materials = {
"Loop Half": {
"contribution_rate": 0.5,
@CodeZombie
CodeZombie / mipmap_based_blur.gdshader
Created June 19, 2024 04:52
mipmap-based blurry shadow for godot 4 canvas items
// The canvas item applied to this has two requirements before this will work:
// 1. The texture must have mipmaps generated at Import
// 2. The CanvasItem this shader is applied to must have Texture Filtering set to something with "mipmap" in the name.
shader_type canvas_item;
uniform float lod: hint_range(0.0, 8.0) = 0.0;
uniform float intensity : hint_range(0.0, 4.0) = 1.0;
uniform vec4 blur_color : source_color = vec4(1.0,1.0,1.0,1.0);
@CodeZombie
CodeZombie / blurry_drop_shadow.gdshader
Created June 19, 2024 03:55
Blurry drop shadow, godot canvas shader
shader_type canvas_item;
uniform float blur_radius : hint_range(0.0, 1.0) = 0.25;
uniform vec4 shadow_color : source_color = vec4(0.0, 0.0, 0.0, 1.0);
void fragment() {
vec4 original_texture_color = texture(TEXTURE, UV);
float shadow_alpha = 0.0;
if (original_texture_color.a < 1.0) {
@CodeZombie
CodeZombie / instructions.md
Last active April 27, 2025 07:36
CozyLife Smart Bulb with Home Assistant

How To: Set Up your Stupid Fucking 4 Dollar "Cozy-Life" Wi-Fi Smart Bulb with Home Assistant with Minimal Hair-Pulling

Installing Home Assistant with Docker Compose

This parts simple enough, but requires some adjusting of the official instructions to get working. Most instructions online tell you that your docker-compose.yml file needs to have a network_mode: host in there. I dunno about that! Works fine for me without that, so we're going to not.

version: '3'
services:
 homeassistant:
@CodeZombie
CodeZombie / m8_headless_gpio_audio_out
Created December 12, 2023 05:02
M8 headless GPIO Audio Out
The M8 Headless is so cool!
Except that it wants to send audio over USB! That shit sucks! Especially on android where it doesn't work at all!
Solution: Hook a PCM5102 up to the Teensy 4.1 running m8 headless! It actually works!
Pins:
PCM5012 -> TEENSY
SCK -> 23
BCK -> 21
DIN -> 7
@CodeZombie
CodeZombie / supersearch.py
Created December 1, 2023 18:00
Given a huge directory a files, this script will search the content of each file, and copy it to a new directory if it contains a substring. Threaded.
import os
import threading
import shutil
from collections import namedtuple
ThreadWithData = namedtuple('thread', 'thread, filecount')
# Constants
MAX_THREADS = 12
FILES_PER_THREAD = 500