Open source projects
6-
Mini-Kanban
Login, user / department / project / task CRUD, a four-column drag & drop board, attachments, a recycle bin (soft delete) and an audit log with snapshots of purged data. A release is one executable plus a `web-dist/` directory, served by the same process on the same port — no Node or nginx on the target machine; the PostgreSQL database must be created beforehand, and Redis is optional (leave the host empty to disable caching).
-
Panda Port Manager
A single-file WinForms (.NET 10) desktop tool: it lists every TCP / UDP port alongside the process behind it, with live filtering, sorting and batch process termination — and it detects winnat system-reserved ports (the ownerless ones kept by Hyper-V / WSL / Docker) and releases them with one click. Light/dark themes and a trilingual UI included.
-
Mini-IM
Realtime WebSocket messaging, offline-message replay, friend requests and blocking, read/unread cursors and async persistence. The frontend is a build-free Vue2 + Axios static app served by the same backend, with one responsive layout for desktop and mobile. The default port is 8280; the repository ships only the `config.example.yaml` template (`config.yaml` is a local, untracked file), and with none present a setup wizard (`/setup`) collects the database and Redis settings first, after which the service takes over the same port. A demo-account switch writes seven mutually-friended accounts idempotently, with the list editable under `seed.accounts` in `config.yaml`.
-
Go-WebSocket
Connect with a uid and the server delivers each message only to the named receiver — no broadcast. The sender is stamped by the server from the connection, so it cannot be forged. Pages, static assets and config templates are embedded via //go:embed, so a clone plus `go run .` just works with no external files at runtime.
-
Y-HTTP-Bench
One binary, ready to run. Drive a fixed number of requests or a fixed duration, throttle with a global QPS limit, and set custom methods, headers and bodies. The report gives latency percentiles, a status-code breakdown and grouped errors — and raw per-request latencies can be streamed to CSV for your own charts.
-
Golocaldownload
A local file-download service written in Go + Gin. Templates and static assets are embedded into the binary, so a release is a single executable with built-in defaults — unzip and run. A convenient way to put build artifacts, asset bundles or internal files behind one simple URL.
App downloads
2-
Panda Port Manager
A single-file WinForms (.NET 10) desktop tool: it lists every TCP / UDP port alongside the process behind it, with live filtering, sorting, batch process termination (child trees included) and auto refresh — and it detects winnat system-reserved ports (the ownerless ones kept by Hyper-V / WSL / Docker) and releases them with one click. Light/dark themes, a trilingual UI and high-DPI multi-monitor support come built in.
-
Panda Storage Tool
A desktop app built on Avalonia UI (.NET 10): drop files or whole folders onto the window to upload them, then browse level by level, download, rename and delete in batches like a file manager — copying shareable links (raw / jsDelivr) as you go. Runs on Windows, macOS and Linux with a bilingual UI and light/dark themes; every release is a self-contained single file, so no .NET runtime is needed.
Notes
10-
目录穿越防护,以及容器里怎么还原宿主机路径
一个文件下载服务要回答两个「路径」问题:请求里那个路径不能越界,而页面上要显示的是宿主机上那个目录 —— 后者藏在 /proc/self/mountinfo 的第 4 个字段里。
-
把 GitHub 仓库当网盘:Contents API 的乐观并发与空目录
覆盖与删除都要带当前 SHA,所以写操作必须串行;而 Git 不存目录这件事,得靠每一级放一个 .gitkeep 来补。
-
PerMonitorV2 之后才是开始:跨屏 DPI 与 WinForms 暗色标题栏
打开 PerMonitorV2 只是拿到通知。真正的坑是框架会重复缩放:字号 10 → 5 → 2.5。解法是所有尺寸以 96 DPI 为基准做绝对重算。
-
端口被占用却查不到进程:winnat 保留端口与进程树终止
`netstat -ano` 给的 PID 可能是 0,也可能是一整棵进程树的父节点。前者要去问 netsh 的排除端口范围,后者要按进程树强杀。
-
固定内存算分位数:手写一个对数线性直方图
留全量样本算 P99,亿级请求内存就爆了。对数线性分桶把内存压到一个与请求量无关的常数(256KB),相对误差上限 0.1%。
-
压测工具的限速器不能用 time.Ticker
Windows 的系统定时器分辨率约 15.6ms,ticker 把吞吐死死卡在 60~90 req/s —— 设 5000 QPS 只跑出 88。改成「绝对时间表」后实测 4982。
-
别用「关闭 channel」通知退出:close(done) 的时序安全性
关掉 send 通道来通知出口,任何一次迟到的投递都会 panic —— 而投递方可能来自 Hub 也可能来自读循环,时序根本无法保证。
-
WebSocket 连接中心的两种并发模型:一把锁 vs 一个 goroutine
同样是「uid → 连接」的一张表,一个用 sync.RWMutex 保护以支持多端在线,另一个用单 goroutine + channel 让 map 完全无锁。两种都能跑,代价不同。
-
IM 的已读为什么用游标,而不是逐条标记
消息是异步落库的,逐条打已读标记会出现「标记先到、消息后到」的假未读。游标天然规避,代价是要处理「对方还没说过话」这一种回退。
-
一个系统里两种主键:雪花 ID 与 UUID v7 的分工边界
消息表换 UUID v7、用户表留雪花 ID,不是选型摇摆 —— 前者换掉了「多实例要协调节点号」这个运维负担,后者留在需要短主键的地方。