Skip to content

Instantly share code, notes, and snippets.

View bczhc's full-sized avatar
🌴

Zhai Can bczhc

🌴
  • Jiangsu, China
  • 13:14 (UTC +08:00)
View GitHub Profile
@bczhc
bczhc / a.txt
Created February 12, 2026 13:32
linux source merge commits by parent number, as of 12 Feb 2026
66 2cde51fbd0f310c8a2c5f977e665c0ac3945b46d
32 eea86b637a15bc4d4bd518b11330ac96baa6b73d
30 fa623d1b0222adbe8f822e53c08003b9679a410c
27 9b25d604182169a08b206306b312d2df26b5f502
24 6924d1ab8b7bbe5ab416713f5701b3316b2df85b
21 e496e3d645c93206faf61ff6005995ebd08cc39c
20 acee709cab689ec7703770e8b8cb5cc3a4abcb31
19 701caa51a2ce74182d39380ca11defeb163d98c1
18 fbe8cddd2d85979d273d7937a2b8a47498694d91
18 57b8b1b4351dafe94de09a2aab5eba885b6705f0
@bczhc
bczhc / vsbm.html
Created February 10, 2026 15:09
vsbm带帧率版本
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="user-scalable=no">
<title>volumeshader_bm</title>
<style>
#fps-span {
position: fixed;
right: 10px;
color: white;
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>WebGPU SHA256 Miner Simulator</title>
<style>
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #121212; color: #e0e0e0; padding: 20px; }
.container { max-width: 1000px; margin: 0 auto; background: #1e1e1e; padding: 30px; border-radius: 12px; border: 1px solid #333; }
h2 { color: #00f2ff; margin-top: 0; font-weight: 300; letter-spacing: 1px; }
@bczhc
bczhc / a.md
Created February 10, 2026 05:35
Android手机上运行WebGPU

目前Android手机上只有Chrome/Android WebView支持WebGPU。但实际发现,WebGPU只对 https://webgpu.github.io/webgpu-samples/sample/helloTriangle 官方示例有用,访问其他地址的网页时,navigator.gpuundefined

注意到上面的官方示例中有这几行:

<!-- WebGPUCompatibilityMode origin token for https://webgpu.github.io expiring April 21, 2026 -->
    <meta
      http-equiv="origin-trial"
      content="Aktu7041jFm00ls336/bRinubASRzg1tPs4wxXOZkF1uP0LaIURinGC7ti0Vf352Q9OKFL1siRfpptLjNIKpKQcAAABheyJvcmlnaW4iOiJodHRwczovL3dlYmdwdS5naXRodWIuaW86NDQzIiwiZmVhdHVyZSI6IldlYkdQVUNvbXBhdGliaWxpdHlNb2RlIiwiZXhwaXJ5IjoxNzc2NzI5NjAwfQ=="
 /&gt;
@bczhc
bczhc / a.log
Last active February 8, 2026 04:02
Rust try_blocks now becomes homogenous. https://github.com/rust-lang/rust/issues/149025
~/code/untitled9 master ?14 ❯ cargo bisect-rustc --start 2025-11-14 --end 2025-11-15 11:11:41
checking the start range to find a passing nightly
installing nightly-2025-11-14
rust-std-nightly-x86_64-unknown-linux-gnu: 28.02 MB / 28.02 MB [===========================================================================================] 100.00 % 6.98 MB/s testing...
RESULT: nightly-2025-11-14, ===> Successfully compiled
uninstalling nightly-2025-11-14
checking the end range to verify it does not pass
installing nightly-2025-11-15
rust-std-nightly-x86_64-unknown-linux-gnu: 28.01 MB / 28.01 MB [===========================================================================================] 100.00 % 7.72 MB/s testing...
@bczhc
bczhc / a.md
Created February 7, 2026 15:25
一个40b长度前缀为零的sha256
printf 311d4a4083010000000000000000000000000000000000000000000000000000 | xxd -r -p - | sha256sum
0000000000a181a06c625f457ce452fa926707c53d3c6883ce344ef1262d1e03  -

NVIDIA GeForce RTX 3060 Mobile显卡,使用sha256-miner.rs,在Windows 10上使用DX12后端运行,计算时间为刚好1024s。

@bczhc
bczhc / a.html
Created February 6, 2026 10:01
LSHW 硬件树查看器 Gemini写
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>LSHW 硬件信息查看器</title>
<style>
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; padding: 20px; background: #f4f4f9; }
.container { max-width: 1000px; margin: auto; background: white; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
h1 { color: #333; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.file-input { margin-bottom: 20px; padding: 10px; border: 2px dashed #ccc; width: 100%; box-sizing: border-box; text-align: center; }
@bczhc
bczhc / classnames.txt
Created February 5, 2026 11:05
android-35 源码中的逆天长符号
ChangeCurrentByOneFromLongPressCommand
RemoveAdCounterHistogramOverrideRequest
InputMethodPrivilegedOperationsRegistry
SuggestionConnectionStatusListenerProxy
IAccessibilityInputMethodSessionInvoker
ImsEmergencyRegistrationCallbackAdapter
ResourceBasedPeriodFormatterDataService
FormattedValueFieldPositionIteratorImpl
EapSimAkaAuthenticationFailureException
SdkSandboxClientImportanceListenerProxy
@bczhc
bczhc / cute yellow blob.svg
Created February 4, 2026 13:07
Greggman avatar tracing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bczhc
bczhc / a.md
Created January 29, 2026 07:26
Linux创建桥接网卡 #network
# 1. 创建网桥设备
sudo ip link add name br0 type bridge
sudo ip link set br0 up

# 2. 将物理网卡 enp47s0 的 IP 清除(此时会断网)
sudo ip addr flush dev enp47s0

# 3. 将物理网卡挂载到网桥上
sudo ip link set enp47s0 master br0