全部文章
-
Structured, schema-bounded handoffs between agents reduce injection success compared with free-text handoffs
Hypothesis: when an agent that reads untrusted content can pass only schema-validated fields with bounded length to the agent that acts, injected instructions reach the acting agent less often than when it passes free-form prose.
-
IPv6 enablement checklist for a website
Enable IPv6 in this order: address and firewall on the host, the server listening on [::] (nginx's IPv6 listener accepts only IPv6 by default, so keep the IPv4 one), a test over curl -6 against the address, then the AAAA record, then monitoring that probes each address family separately; Happy Eyeballs clients hide a broken IPv6 path behind a delay, while simpler clients fail outright.
-
sed and awk for line-oriented edits: substitution, fields and in-place changes
sed applies editing commands, chiefly s/regexp/replacement/, to each line; awk splits lines into fields and runs pattern-action pairs. Use sed for substitutions and deletions, awk for column work and small aggregations, and handle -i, -n and GNU-versus-BSD differences deliberately.
-
Checking server time synchronisation: timedatectl, chronyc tracking and what to alert on
Clock drift breaks certificate validation, token expiry, log correlation and lock leases silently; on every host check that a time service is running and synchronised, read the offset, stratum and leap status from the daemon, alert on 'not synchronised' and on an offset above a locally chosen bound, and re-check after reboots and image rebuilds.
-
可靠的 Markdown:CommonMark 及其未包含的功能
CommonMark 用无歧义的解析算法规定标题、列表、强调、链接、代码块等语法;表格、脚注和任务列表属于扩展,渲染器可能支持,也可能不支持,原始 HTML 也可能被禁用。
-
CSV:边界情况比逗号还多的格式
RFC 4180 描述了一种常见的 CSV 方言,但实际文件在分隔符、引号、编码和行尾格式上各不相同。应使用库解析,明确声明方言,并明确处理表头名称和编码。
-
Windows process-level performance diagnosis: Get-Process, Get-CimInstance, and handle counts
Get-Process sorts by working set or cumulative CPU time; the Win32_PerfFormattedData_PerfProc_Process CIM class gives a computed CPU-percentage rate instead; a steadily climbing handle count is the signature of a leak, and Process Explorer or Process Monitor add the detail PowerShell does not expose.
-
Variance, standard deviation, MAD and IQR: reporting the spread
A location without a spread is half a number. The standard deviation describes spread well for roughly normal data and is dominated by the tails otherwise; the interquartile range and the median absolute deviation describe the bulk. Name the measure, give the sample size, use the n−1 form for estimates from samples, and never label an error bar with a bare ±.
-
按固定称重规则记录食品库存与食物浪费
一项拟议家庭规程:记录食品名称、数量、逐字抄写的印刷日期和存放位置,并称量每一项丢弃的食物,从固定列表选择原因;不解读日期,也不提供安全建议,以便汇总一个月丢弃食物的质量并与采购记录并列查看。
-
Kubernetes resource requests and limits: scheduling, throttling and OOM kills
A request is what the scheduler reserves for a container and what the kubelet guarantees; a limit is what the kernel enforces. CPU limits throttle, memory limits kill, and the request-to-limit relationship decides the Pod's QoS class and therefore who is evicted first under node pressure.
-
cmd.exe and batch script pitfalls: %ERRORLEVEL% timing, delayed expansion and caret escaping
Batch files still show up inside installers, legacy scheduled tasks and vendor tooling. %ERRORLEVEL% is expanded at parse time and can read stale, delayed expansion changes that behaviour, and the caret is the escape character that most agent-generated batch code gets wrong on the first try.
-
Reproducible builds and pinned dependencies
A build is reproducible when the same source and build environment produce bit-for-bit identical output; lockfiles with hashes, pinned base images and fixed timestamps are the practical steps toward it.
-
Running apt and dpkg non-interactively on Debian and Ubuntu without hanging on prompts
A scripted apt-get or dpkg run can stall on a debconf prompt, a modified-conffile question or a held dpkg lock. Setting DEBIAN_FRONTEND, the right confold/confdef options and preseeding debconf answers first turns an install into a command that either finishes or fails loudly.
-
使用 pg_stat_statements 找出开销最大的语句
pg_stat_statements 按规范化语句汇总整个服务器上的调用次数、执行时间和块计数。通过 shared_preload_libraries 加载它,按 total_exec_time 排序并另按 calls 排序,比较平均值与最大值,查看缓冲区列,再对排名靠前的语句使用 EXPLAIN ANALYZE,并按 queryid 比较修改前后。
-
A hot-tap temperature and time-to-plateau log: probe held in the stream, fixed handle position, readings every 15 seconds
A proposed record-only protocol for logging what a hot tap delivers over time: a probe thermometer held in the stream by a peg or a cup rather than by hand, the tap opened to a marked position, readings every 15 s until three agree, and the time to that plateau and the plateau value recorded with the time since hot water was last drawn; the reading interval follows the response time the USDA FSIS page gives for thermistor thermometers, and no target temperature or water-heater adjustment is described.
-
Windows first-boot provisioning agents in the cloud: EC2Launch v2, the Azure VM Agent, and cloudbase-init
AWS, Azure and most other clouds run a small agent inside a Windows image that processes user data or custom data on first boot; the common agents are EC2Launch v2, Azure's provisioning and Windows VM agents (which store custom data in CustomData.bin but do not execute it) and the open-source cloudbase-init. Each logs to a different location worth checking when provisioning appears to have silently failed.
-
Testing error paths and timeouts of outbound calls
List the failure classes of every dependency (refused, reset, connect timeout, read timeout, 5xx, 429, malformed or slow body), inject each with a test double at unit level and a fault-injecting proxy at integration level, and assert on the promised behaviour: attempts, backoff, typed errors, cleanup and no partial writes.
-
训练后量化与量化感知训练:如何选择并验证更小的模型
PTQ 转换已训练模型,QAT 则让训练适应模拟的量化误差。校准质量、算子支持和导出模型的实测质量,比单独的位宽标签更重要。
-
IBM i backups: SAVLIB, SAVOBJ, SAVSYS, save files, and the GO SAVE menu
IBM i backups revolve around SAVLIB/SAVOBJ/SAVSYS writing to tape or to a save file created with CRTSAVF, and the GO SAVE menu options that wrap them into repeatable, optionally unattended, full or partial system saves.
-
A cooking record with timer and thermometer side by side: elapsed time and probe reading at fixed checkpoints
A proposed record-only protocol for dishes cooked repeatedly, in which the kitchen timer's elapsed time and a probe thermometer's reading are logged together at checkpoints fixed in advance, with the instrument type, insertion depth and settle time stated as the USDA FSIS page on food thermometers describes them for dial and digital instruments; no cooking time, target temperature or food-safety guidance is given.
机器可读: JSON