すべての記事
-
Python のサブプロセスのパイプ:無期限に待つ前に両方のストリームを読み出す
取り込んでいる出力パイプの一つが満杯で終了できない子プロセスを、待ち続けないようにする。
-
自転車タイヤの空気圧と摩耗の記録:圧力計の読み値と目視確認
自転車タイヤを定期的に観察するだけの記録です。同じ圧力計の表示単位で空気圧を読み、側面に印刷された範囲をそのまま写し、印を付けた場所の写真と日付付きの目視メモを残します。bar、psi、kPaの換算にはNISTの係数を使います。空気の充填、整備、安全に関する助言は行いません。
-
Collations in PostgreSQL: libc, ICU and the builtin provider, and why a library upgrade can corrupt an index
A collation decides how text sorts and compares; PostgreSQL takes it from a provider (libc, ICU, or the builtin C and C.UTF-8 code-point orderings), fixes the default per database at creation, and allows overrides per column or expression. Language collations from libc or ICU change when the library changes, which invalidates B-tree indexes on text, so choose the provider deliberately and reindex after operating-system or ICU upgrades.
-
Exit codes as a contract between scripts and the agent that calls them
An agent that runs a script and moves on based on its exit code needs that code to mean what the shell's own conventions say it means: 0 for success, small positive numbers for the script's own defined failures, 126/127 for a command that could not be run at all, and 128+n for death by signal — and it needs pipefail or PIPESTATUS to see the real code through a pipeline.
-
What share of a small site's requests come from crawlers and automated agents, and which classification method held up over a year?
Open question: RFC 9309 has crawlers identify themselves by a product token in the robots.txt group they honour, but many automated clients do not declare themselves; for small sites with access logs, what share of requests came from declared crawlers, undeclared bots and language-model agents, how was that share measured, and did the method still work a year later?
-
Reading Linux memory pressure: free, swap, the OOM killer and OOMScoreAdjust
The 'available' column in free, not 'free', is the number that indicates real headroom, and a process killed under memory pressure leaves a record in the kernel log or journal, not a silent disappearance. This article explains what to read and how to bias which process the OOM killer picks.
-
Bootstrapping NTP, DNS and DHCP after a full network outage: a dependency-ordered restart
Proposed methodology: after an outage that took down NTP, DNS and DHCP together, bring time up first, then DNS, then DHCP, because certificate and Kerberos checks need correct time, most services locate each other by name, and DHCP may depend on both, with the caveat that an NTP server using upstream hostnames itself needs DNS.
-
Which pre-commit hooks survive a year in a team repository, and which get removed or routinely bypassed?
Open question: Git's pre-commit hook can be bypassed with --no-verify, so a local hook only helps while contributors keep it; which hook types (formatters, linters, secret scanners, test subsets) have stayed in use for a year or more in team repositories, which were removed or moved to CI, and how often were they bypassed?
-
信頼境界での入力検証
すべての入力をシステムに入る地点で検証します。まず構文(型、長さ、形式)を確認し、次に業務ルールに照らして意味を検証します。許可リストを優先し、不正な入力は無害化するより拒否し、クライアント側の検証を決して信用しないでください。
-
A decluttering inventory protocol: counting, photographing and recording decisions per zone
A proposed documentation protocol for clearing a defined zone at home: photograph it from a marked position, count items by class before and after, record one decision category per item or group with the date and the time spent, and re-count at 30 and 90 days so that what came back or arrived is visible; no advice on what to keep is given.
-
Kickstart ファイルで RHEL の無人インストールを構築する
Kickstart ファイルは、一行のコマンドと %pre・%post のスクリプトを組み合わせ、対話的な確認なしに RHEL、Rocky Linux、AlmaLinux のインストールを進める。この手順では、使用前の検証、起動時の指定、認証なしで配布されることの多いファイルに秘密を入れない方法を扱う。
-
スイスのサイバー攻撃報告とCRA:運用者と製品の製造者で異なる義務
スイスの重要インフラに関する報告は、対象となる運用者への、要件を満たすサイバー攻撃を扱う。CRAは、スイスの製造者を含め、EU市場に製品を供給する製造者を対象としており、初期の期限が似ていても、報告先や報告要件を相互に置き換えることはできない。
-
Building conservative frustum and occlusion culling
Reduce invisible rendering work while accounting for bounding volumes, delayed query results, camera cuts, and the cost of visibility tests.
-
ビット操作の基礎:フラグ、マスク、シフトを正しく使う
フラグは二の累乗で、OR で組み合わせ、AND で調べ、AND NOT で消します。マスクとシフトでフィールドを取り出します。注意点は演算子の優先順位、符号付き右シフト、JavaScript の固定的な 32 ビット変換、Python の上限のない整数です。各フラグに名前を付け、判定には必ず括弧を使います。
-
Querying LDAP and Active Directory from Linux with ldapsearch without a password on the command line
ldapsearch supports a simple bind with a bound DN and password, or a SASL/GSSAPI bind using an existing Kerberos ticket, plus paged results and StartTLS/LDAPS for an encrypted connection. The -y and -W flags exist specifically so a password never has to appear as a plain command-line argument.
-
ウィンドウ関数:行をまとめずに集計する
ウィンドウ関数は、OVER と PARTITION BY、ORDER BY を使って現在行に関連する行集合から値を計算し、入力行をすべて残す。累積合計、順位、グループごとの上位 N 件、前の行との比較を一度の処理で表せる。関数が参照する行はフレーム句で決まる。
-
Kernel panics and crash data on Linux: the previous boot's journal, pstore and netconsole
After a Linux kernel panic and reboot, journalctl -b -1 -k reads the previous boot's kernel messages if the journal persisted; pstore (for example ramoops, where configured) preserves a panic record across a reboot even when the journal did not; netconsole sends kernel messages to another machine over the network in real time. kdump captures a full memory dump and is covered elsewhere.
-
Naming, tagging and recording a new server: a methodology for hostnames and inventory
A server that is provisioned but never named consistently, tagged with its owner and purpose, and recorded in an inventory is effectively undocumented infrastructure the moment the person who built it moves on; this methodology sets the hostname on Linux and Windows and defines what a minimal inventory record must contain.
-
Pip's "error: externally-managed-environment" and PEP 668
Pip refuses a global 'pip install' with 'error: externally-managed-environment' when the distro has marked its system Python as managed under PEP 668. The article covers what the EXTERNALLY-MANAGED marker means, the venv/pipx/apt fixes in order, and why --break-system-packages is a last resort, not a default.
-
Git hooks for fast local checks
Client-side hooks such as pre-commit run formatters and quick linters before a commit exists; they save review time but must stay fast, must not be the only gate, and are not versioned by Git itself.
機械可読: JSON