Skip to content

Instantly share code, notes, and snippets.

@larryli
larryli / SKILL.md
Created September 9, 2026 08:40
Web Front-End Asset Change Detection (web-asset-reload)
name web-asset-reload
description Use this skill when working on the ESP-IDF firmware (or any ESP-IDF web UI) and questions arise about how already-open browser pages detect front-end (HTML/JS/CSS) changes and decide whether to reload after an OTA or reflash. It covers both deployment models (assets embedded in the firmware binary vs published on a flash filesystem), the build-time or runtime asset content hash, the assets field in /api/state and /api/stream, the bootAssets comparison in the web UI, why reload keys on the asset hash rather than version/build, how to add or change a served asset, and the test-1 / test-2 validation procedure.

Web Front-End Asset Change Detection (web-asset-reload)

中文说明(简)

本 skill 说明 ESP-IDF 设备如何让其已打开的网页在前端资源(HTML/JS/CSS/ICO)

@larryli
larryli / WenQuanYiBitmapSong.md
Last active November 5, 2025 06:39
WenQuanYiBitmapSong.otf
@larryli
larryli / ntc.h
Created March 26, 2024 01:33
NTC 100K
#include <math.h>
/**
* 3v3 --- [10K] -+- [NTC] --- GND
* |
* +-- ADC
*/
#define NTC_V 3300
#define NTC_R_PULLUP 10000
#define NTC_R(v) (NTC_R_PULLUP * (v) / (NTC_V - (v)))
@larryli
larryli / Vagrantfile
Last active April 28, 2019 09:36
ESP-IDF Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
class VagrantPlugins::ProviderVirtualBox::Config < Vagrant.plugin("2", :config)
def update_customizations(customizations)
@customizations = customizations
end
end
class VagrantPlugins::ProviderVirtualBox::Action::Customize
@larryli
larryli / .profile
Created December 27, 2018 03:13
set zh LANG for ssh
#!/bin/bash
if tty | fgrep -q pts ; then
export LANG=zh_CN.UTF-8
fi
@larryli
larryli / openpgp.txt
Created September 7, 2018 10:01
OpenKeychain 关联用户标识
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:b4448800f2129cd9e136bfffb64fdf3b2d8b022c]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@larryli
larryli / .gitlab-ci.yml
Created May 17, 2018 09:39
Gitlab CI build for go project
stages:
- build
compile:
stage: build
script:
- go build -ldflags "-s -w -X main.Version=$CI_COMMIT_TAG"
artifacts:
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"
paths:
@larryli
larryli / buttons.go
Last active August 16, 2017 08:53
Orange Pi Zero TTP224
package main
import (
"fmt"
"github.com/davecheney/gpio"
"os"
"os/signal"
"time"
)
@larryli
larryli / trans_china_districts.php
Last active December 8, 2016 10:48
转换 http://www.mca.gov.cn/article/sj/tjbz/a/ 的文本数据为 PHP 数据和 SQL
<?php
$directly = ['11', '12', '31', '50', '81', '82'];
$names = [
'拉祜族佤族布朗族傣族自治县', '保安族东乡族撒拉族自治县', '彝族哈尼族拉祜族自治县', '傣族拉祜族佤族自治县',
'哈尼族彝族傣族自治县', '彝族回族苗族自治县', '布依族苗族自治县', '布依族苗族自治州', '白族普米族自治县',
'苗族瑶族傣族自治县', '傣族景颇族自治州', '独龙族怒族自治县', '哈尼族彝族自治县', '哈尼族彝族自治县', '哈尼族彝族自治州',
'满族蒙古族自治县', '蒙古族藏族自治州', '苗族布依族自治县', '苗族土家族自治县', '土家族苗族自治县', '壮族苗族自治州',
'土家族苗族自治州', '仡佬族苗族自治县', '藏族羌族自治州', '傣族佤族自治县', '傣族彝族自治县', '哈萨克族自治县',
'回族土族自治县', '回族彝族自治县', '柯尔克孜自治州', '黎族苗族自治县', '苗族侗族自治县', '苗族侗族自治州',