Skip to content

Instantly share code, notes, and snippets.

View CrazyCoder's full-sized avatar

Serge Baranov CrazyCoder

View GitHub Profile
@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 December 10, 2025 20:18
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)
@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 November 18, 2025 05:38 — forked from cdleveille/Install⁄Update Xone
Install or update xone driver for Steam Deck (desktop shortcut and bash script)
@CrazyCoder
CrazyCoder / zigbee2mqtt_hue_dimmer_v2.yaml
Last active October 24, 2025 10:37
Philips Hue Dimmer switch v2 (Zigbee2MQTT)
blueprint:
name: Philips Hue Dimmer switch v2 (Zigbee2MQTT)
description:
"Tested with Philips Hue Smart Wireless Dimmer Switch V2 (929002398602).
\n\n
To have different actions on short press and on hold (long press), use 'button release' (`*_press_release`) and 'button hold once' (`*_hold_once`) commands,
as 'press' (`*_press`) will always trigger before 'button hold' (`*_hold`).
\n\n
When you hold a button, 'button hold' (`*_hold`) command is repeated roughly once per second. This may not work as desired with actions like toggling light/switch.
If you want an action to run only once when the button hold action is registered, use 'button hold once' (`*_hold_once`). It's better than using 'button hold release'
@CrazyCoder
CrazyCoder / zigbee2mqtt_aqara_wireless_switch.yaml
Last active December 9, 2022 19:14 — forked from rhl2401/zigbee2mqtt_aqara_wireless_switch.yaml
Aqara Wireless Switch (single, double, hold, release)
blueprint:
name: Aqara Wireless Switch (single, double, hold, release)
description: 'Control anything using Aqara Wireless Switch.
Customizable actions for each press.
This version of the blueprint is for buttons supporting single, double, hold and
release actions. '
domain: automation
@Blackshome
Blackshome / sensor-light.yaml
Last active December 11, 2025 05:14
Home Assistant Sensor Light that can be used in Blueprints
blueprint:
name: Sensor Light
description: >
# 💡 Sensor Light
**Version: 8.5**
Your lighting experience, your way - take control and customize it to perfection! 💡✨
@markstos
markstos / md-renderer.html
Last active August 2, 2024 14:20 — forked from vietor/md-renderer.html
Nginx render markdown by browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/milligram/1.4.1/milligram.min.css">
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.1.2/styles/github.min.css">
<script type="application/javascript" src="https://cdn.bootcdn.net/ajax/libs/marked/1.1.1/marked.min.js"></script>
<script type="application/javascript" src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script>
<style rel="stylesheet">
body {