Skip to content

Instantly share code, notes, and snippets.

View CrazyCoder's full-sized avatar

Serge Baranov CrazyCoder

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
@Haleclipse
Haleclipse / apply-claude-code-ink2-ghost-chars-fix.ps1
Last active January 26, 2026 17:34
Claude Code ink2/render_v2 ANSI Ghost Characters Fix (Issue #19820)
<#
.SYNOPSIS
Claude Code ink2/render_v2 ANSI Ghost Characters Fix Script (Windows Version)
.DESCRIPTION
Fixes GitHub issue: anthropics/claude-code#19820 (duplicate of #17519)
THE BUG:
When statusLine contains ANSI escapes + Nerd Font icons under ink2/render_v2,
"ghost characters" appear - symbols leak into the message area and persist.
@CrazyCoder
CrazyCoder / XTH-generator.html
Last active December 10, 2025 21:36
Batch XTH file generator for Xteink X4
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>批量XTH文件生成器</title>
<style>
* {
box-sizing: border-box;
margin: 0;
@CrazyCoder
CrazyCoder / XTC-XTG-XTH-XTCH.md
Last active February 13, 2026 00:35
XTC/XTG/XTH/XTCH Format Technical Specification (for Xteink X4)

This document is generated by AI, and there may be issues with the specific details.

XTC/XTG/XTH/XTCH Format Technical Specification

Document Information

  • Version: 1.0
  • Date: 2025-01-XX
  • Purpose: Public technical specification for format conversion
  • Target Platform: ESP32 E-Paper Display Devices
@evsar3
evsar3 / hexdump.ts
Created October 4, 2023 17:03
HexDump for TypeScript/Javascript
function hexdump (data: Uint8Array, bytesPerLine = 16): string {
const result: string[] = []
for (let i = 0; i < data.length; i += bytesPerLine) {
const chunk = data.slice(i, i + bytesPerLine)
const address = i.toString(16)
.padStart(8, '0')
const hex = Array.from(chunk, byte => byte.toString(16)
@mdeweerd
mdeweerd / !README.md
Last active March 4, 2026 22:31
Monitor OPNsense internet connection

Monitor OPNsense internet connection

OPNsense sometimes "loses" the WAN facing connection when that is "reinitialised" (modem reboot/WAN restart).

Monitoring the WAN facing connection and taking corrective action is the solution proposed by this script.

opnsense_ping_check.sh will ping IP addresses to determine if the WAN connection is still working, and try to restore the WAN if needed by

@jorisvervuurt
jorisvervuurt / opnsense-i226-nic-tunables.txt
Last active November 25, 2025 21:33
OPNsense - Intel i226 NIC tunables
<item>
<tunable>net.inet.icmp.drop_redirect</tunable>
<value>1</value>
<descr/>
</item>
<item>
<tunable>net.isr.bindthreads</tunable>
<value>1</value>
<descr/>
</item>
@SavageCore
SavageCore / 1-readme.md
Last active January 22, 2026 18:16 — forked from cdleveille/Install⁄Update Xone
Install or update xone driver for Steam Deck (desktop shortcut and bash script)