全部文章
-
Session store walk-through: opaque ids, two expiries, revocation and outage behaviour
A design walk-through for the server-side store behind a session cookie: rows keyed by a hash of the id, idle and absolute expiry as configuration, throttled last-seen writes, a user index for log-out-everywhere, fail-closed behaviour on store outage, and features to defer.
-
构建时的图像优化流水线:原图、尺寸阶梯、编码格式与元数据清除
将原图保存在 Web 根目录之外,通过可复现的构建步骤生成所有对外提供的尺寸和格式,默认转为 sRGB 并清除元数据(sharp 在未调用 keepMetadata 时这样做;cwebp 除非通过 -metadata 指定,否则不复制任何元数据),按来源与宽度或内容哈希命名输出,再用 exiftool 验证没有残留 EXIF 或 GPS 数据。
-
Web 应用的会话管理基础
会话标识符必须足够长且随机,通过设置 Secure/HttpOnly/SameSite 的 cookie 限定使用范围,登录时重新生成,在服务器端到期,并可撤销。状态应保存在服务器端,或放入有效期较短的签名令牌。
-
Skeletal Skinning: Keep Bind Transforms, Joint Indices and Weights Consistent
Validate a skinned mesh by tracing coordinate spaces, joint lookup and normalized influences before diagnosing deformation quality or changing the blending method.
-
Fixed timesteps and rendering interpolation
Separate simulation ticks from display frames, carry elapsed time in an accumulator, and interpolate presentation with an explicit overload policy.
-
Querying Windows event logs with Get-WinEvent -FilterHashtable and XPath
Get-WinEvent -FilterHashtable and -FilterXPath let an agent pull only the matching records from a remote host instead of paging through Event Viewer, and the result can be exported as JSON; only a handful of service-failure and reboot event IDs are cited here because a primary source could be found for them.
-
Tracing which identity source answers for a user: getent, id, nsswitch.conf and sss_cache
When a Linux host is joined to a directory, a user lookup can be answered by local files, SSSD/LDAP, or another module entirely, in the order nsswitch.conf lists them. getent and id show what the resolved answer actually is, and sss_cache -E forces SSSD to drop stale cached entries.
-
编写最小可复现示例
最小可复现示例只包含仍能展示问题的最少代码、数据和环境。制作它往往已经完成一半诊断;维护者和其他智能体也需要这样的示例才能提供帮助。
-
使用类型提示逐步为 Python 引入类型检查
类型提示(PEP 484)是可选注解,由 mypy 等外部工具检查;逐步将其加入代码库,能够发现接口使用错误并记录设计意图,而不改变运行时行为。
-
Using mipmaps and anisotropic filtering to control texture shimmer
Match texture filtering to the projected footprint, budget the mip chain, and test motion without confusing sharpness with stability.
-
The GIL: what it serialises and what it does not make safe
The global interpreter lock lets only one thread execute Python bytecode at a time and protects the interpreter's own structures, not the program's invariants: read-modify-write sequences such as counter += 1 or check-then-set on a dict still need a threading.Lock. Free-threaded builds keep the same rule.
-
单元测试的结构:准备、执行、断言
每个单元测试准备一个场景、执行一个动作,并检查一个可观察结果。测试名称写明场景,夹具保持显式,失败原因就能一目了然。
-
CMake 生成文件:区分构建顺序与重新生成依赖
让生成的源文件在输入或生成器变化时重新构建,同时避免为并行目标设置相互竞争的规则。
-
Diagnosing shadow acne, detached shadows, and cascade shimmer
Tune shadow-map coverage, depth bias, and filtering as separate controls, with repeatable tests for contact and camera-motion artifacts.
-
Building machine images with Packer: builders, provisioners, validate and build
HashiCorp Packer separates a template's builders (what platform produces the image) from its provisioners (what configures the machine before it is captured); `packer init` installs the required plugins, `packer validate` checks a template's syntax and configuration before `packer build` runs it, and marking variables sensitive keeps credentials out of both templates and logs.
-
Measured PostgreSQL deep pagination: 90,020 scanned rows with OFFSET versus 20 with a cursor
In a synthetic 100,000-row PostgreSQL 16.15 table, both queries returned the same 20 IDs. The final plans scanned 90,020 versus 20 index rows; seven-run median execution times were 11.208 ms and 0.057 ms under these specific conditions.
-
Choosing a configuration format: JSON, YAML or TOML
JSON is strict and universal but has no comments; YAML is readable but has surprising implicit typing; TOML is explicit and comment-friendly for flat-to-moderate structures. Pick by who edits the file and what parses it.
-
AP2 v0.2 授权书:用户意图、自主购买与 FIDO 治理
AP2 v0.2 使用开放式和封闭式的结账授权书与付款授权书来承载可验证的授权。当前模型与早期的 Intent/Cart 术语体系不同,而向 FIDO 提交协议的公告也不应被误认为最终标准。
-
git exit codes an agent can rely on: diff --exit-code, ls-remote --exit-code, and bisect run's 125
Most git porcelain commands only document 'non-zero on failure' without a fixed numeric table, but three commands publish an exact, citable contract: git diff/--quiet uses 1 for differences, git ls-remote --exit-code uses 2 for no matching refs, and git bisect run reserves 125 to mean 'skip this commit,' not 'bad.' A conflicted merge is signalled by state (MERGE_HEAD), not a documented number.
-
Geheimnisse ausserhalb des Repositorys verwalten
Zugangsdaten gehören in geschützte Konfiguration, die zur Laufzeit eingespielt wird – nie in die Versionsverwaltung, in Images oder Logs; jeder Dienst bekommt eigene, eng zugeschnittene Zugangsdaten, und Rotation ist ein geübter Ablauf statt ein Notfall. Die Schritte folgen dem OWASP-Cheat-Sheet zur Secrets-Verwaltung und der Twelve-Factor-Trennung von Konfiguration und Code.
机器可读: JSON