Skip to content

Instantly share code, notes, and snippets.

View nweddle's full-sized avatar
:octocat:

Nathan Weddle nweddle

:octocat:
View GitHub Profile
@CrazyCoder
CrazyCoder / X3-EPD.md
Last active March 3, 2026 00:21
Xteink X3 EPD display analysis

Xteink X3 EPD Display Driver Analysis

Display Hardware

Property Value Evidence
Controller SSD1677 Command set, LUT format (5x42 bytes), register layout
Diagonal 3.68" Alibaba listing + mechanical drawing; sqrt(51.84² + 77.76²) = 93.5mm = 3.68"
Buffer resolution 792 x 528 Constructor param, buffer size = 52,272 bytes (99 bytes/row x 528 rows)
Hardware resolution 792 x 600 CMD 0x61 data: [0x03, 0x18, 0x02, 0x58] → (0x0318=792) x (0x0258=600)
@CrazyCoder
CrazyCoder / X3-GPIO.md
Last active March 3, 2026 00:21
Xteink X3 GPIO (based on 5.0.3 firmware analysis)

Xteink X3 GPIO Pin Mapping

Complete GPIO Map

GPIO Function Direction Evidence
0 I2C SCL Bidir (OD) Wire.begin(sda=20, scl=0, freq=400000) in sub_42004146
1 Button ADC (primary) Analog In analogRead(1) in sub_42006294 — 4-button resistor ladder
2 Button ADC (secondary) Analog In analogRead(2) fallback in sub_42006294 — 2 buttons
3 Power/Wake input Digital In digitalRead(3) in sub_4200D0B6, triggers power-on sequence
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@pythoninthegrass
pythoninthegrass / hello
Last active March 5, 2026 04:47
Demo for uv's PEP 723 script support with various dependencies.
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "httpx>=0.28.1",
# "python-decouple>=3.8",
# "sh>=2.2.2",
# ]
# [tool.uv]
@jag-k
jag-k / README.md
Last active April 10, 2025 23:36
Convert your MacOS apps icons to FlexBar Icon Pack!

MacOS Icon Extractor and Converter

This script extracts icons from MacOS applications and system resources, then converts them to a specific JSON format with Base64-encoded images.

Usage:

# Just run a script with default settings
uv run flexbar_macos_icon_extractor.py
@marph91
marph91 / fix_creation_date.py
Created October 28, 2024 17:37
fix the creation date of some documents in paperless-ngx
"""fix the creation date of some documents in paperless-ngx"""
import datetime as dt
from urllib.parse import urljoin
import requests
class Session(requests.Session):
"""https://stackoverflow.com/a/51026159/7410886"""
@usrbinkat
usrbinkat / README.md
Created June 13, 2024 18:53
Delete Stuck Namespace

Delete Stuck Namespace

Here be dragons. Use with extreme caution.

About

This script is designed to accept namespaces as a list of arguments and will perform a namespace child resource delete loop before terminating the namespace and any finalizers.

Motivation

@iamdanre
iamdanre / mac_cli.md
Created July 12, 2022 19:58
dank mac defaults

Awesome macOS Command Line

A curated list of shell commands and tools specific to macOS.

“You don’t have to know everything. You simply need to know where to find it when necessary.” (John Brunner)

Awesome

If you want to contribute, you are highly encouraged to do so. Please read the

@acarril
acarril / global-protect.md
Last active February 13, 2026 09:26
GlobalProtect toggle (start/quit)

Regain control over the annoying GlobalProtect macOS install

I need to use GlobalProtect because it's becoming the only VPN to access resources in my school. The VPN client is simple enough, but it does two annoying things:

  1. Registers itself to autostart on login
  2. Doesn't provide you with a simple 'quit' action

Here I'll show you how I fixed both issues in macOS 12.2 (Monterey).

image