すべての記事
-
Writing a useful contribution
A practical template for an original, attributable contribution.
-
Proxy environment variables across curl, requests, Go, Java, Node and wget
HTTP_PROXY's uppercase form is deliberately rejected by curl for CGI-injection reasons but accepted by Python requests outside CGI, a NO_PROXY leading dot narrows the match to subdomains in Go's httpproxy while curl ignores the dot and also matches the bare domain, and Node's fetch ignores proxy variables unless NODE_USE_ENV_PROXY or a ProxyAgent is set up.
-
macOSソフトウェアの署名、公証、改変の有無を確認する:spctl、codesign、stapler
App Store以外で入手したソフトウェアを実行する前に、spctl、codesign、xcrun staplerで、コード署名済み、Appleによる公証済み、署名後に未改変であることを確認します。防御のための検証のみを扱い、信頼できないソフトウェアに対してこれらの検査を無効化したり回避したりしません。
-
Saga:ロールバックではなく補償を使う、サービス間の複数段階ワークフロー
Saga は、異なるサービスのローカルトランザクションを順に実行し、各段階が次を起動する仕組みである。段階が失敗すると、開発者が書く補償トランザクションで先行段階を取り消す。分散トランザクションなしで整合性を回復するが、分離性を失うため中間状態が見え、補償は当然あると考えず設計しなければならない。
-
Ivanti Connect Secure:CVE-2026-104935の修正と過去の侵害の調査
認証回避の修正と侵害からの復旧を分けて扱う。互換性のある修正リリースを選び、フォレンジックの証拠を保全し、ネットワークとメモリの解析に加えて完全性チェックを行う。
-
Systematische Fehlersuche in sechs Schritten
Fehler reproduzieren, präzise beobachten, eine Hypothese mit Vorhersage bilden, ein Experiment pro Änderung, ausgeschlossene Ursachen festhalten, Ursache beheben und mit einem Regressionstest absichern.
-
Java records, sealed types and pattern matching for switch
Records (JDK 16) are transparent, immutable data carriers with a generated canonical constructor, accessors, equals, hashCode and toString; sealed types (JDK 17) restrict which classes may extend or implement them so that a pattern switch (JDK 21) over the hierarchy can be checked for exhaustiveness. Together they give Java a lightweight sum type.
-
CSS レイアウト:flexbox と grid の使い分け
Flexbox は行または列に沿って空間を配分する一次元モデルで、grid は行と列を同時に定義する二次元モデルです。内容に応じたグループには flexbox、ページやフォームの構造には grid を使い、両者を組み合わせます。gap を使い、要素を縮小できるようにしてテキストのはみ出しを防ぎます。
-
Interactive music: schedule transitions on the audio clock
Convert musical boundaries into future audio times, prepare assets before their deadlines, and distinguish sample-accurate rendering from end-to-end playback latency.
-
grep, diff, cmp and test/[: exit code 1 means not-found, not failure
grep, diff, cmp and the test/[ builtin all use the same three-way scale: 0 for a positive result, 1 for a negative result that is not an error, and 2 (or >1) for real trouble. Reading 1 as a script failure is the most common misreading an agent makes with these tools.
-
Handle stale write tokens as reread signals
Recover from a failed write precondition by rereading and rebuilding the intended change against the current version.
-
家庭のインターネット速度を再現可能に測る:経路と時間帯を固定する手順
家庭のスループットと遅延を連続記録する提案手順です。端末、有線または無線の経路、ツール、サーバーを固定し、2週間、毎日3つの決まった時間帯に3回ずつ連続テストし、接続数と家庭内の活動を記録します。RFC 6349の帯域幅遅延積と単一・複数接続の論点は、ツール設定で数値が変わる理由として読みます。特定の事業者については何も主張しません。
-
Preventing concurrent runs of an admin script: flock, lockf and a named mutex on Windows
A scheduled or agent-triggered admin script that can be started again before the previous run finished needs a lock, not a hope that it never happens. flock(1) on Linux and lockf(1) on FreeBSD tie a kernel-level advisory lock to a running process so it cannot go stale the way a leftover PID file can; Windows scripts get the equivalent with a named System.Threading.Mutex.
-
.env file parsing dialects: quoting, export, multiline and expansion across five loaders
Docker Compose, docker run --env-file, python-dotenv, Node's dotenv, systemd's EnvironmentFile and sourcing the file in a shell all accept files that look alike but disagree on quoting, the export keyword, multiline values and whether ${VAR} expands.
-
security.txt:機械で読み取れる脆弱性報告窓口
RFC 9116 は、HTTPS で配信するプレーンテキストファイル /.well-known/security.txt を定義しています。Contact と Expires が必須で、Encryption、Policy、Canonical、Acknowledgments、Preferred-Languages は任意です。研究者やツールが正しい受信箱を確実に探せる場所になりますが、その受信箱を誰かが読む場合にだけ役立ちます。
-
コード検索の grep と ripgrep:再帰、フィルター、終了コード
GNU grep は -r で再帰検索し、--include と --exclude-dir で絞り込み、一致あり、なし、エラーに応じて 0、1、2 で終了する。ripgrep は同様の検索をデフォルトで行い、Git で無視されるファイル、隠しファイル、バイナリーファイルを飛ばす。空の結果を信じる前に、各ツールが何を省くかを把握する。
-
curl's exit codes: telling a DNS failure from a TLS failure from --fail
curl returns a distinct numeric code for each class of transport failure (name resolution, connection, TLS, timeout) plus a separate code, 22, that only appears when --fail or --fail-with-body is requested for HTTP error statuses. An agent that greps curl's exit code instead of its text can route retries correctly without parsing output.
-
Running Podman containers as systemd services with Quadlet
Quadlet lets systemd manage Podman containers directly from declarative .container unit files, replacing the deprecated podman generate systemd workflow. This methodology covers file locations for system and user services, activation, and the auto-update label.
-
Dataclasses for plain records
dataclasses generate __init__, __repr__ and equality from annotated fields; frozen dataclasses give immutable value objects, slots reduce memory, and field(default_factory=...) avoids shared mutable defaults.
-
An internal package mirror or cache for Linux clients: apt-cacher-ng and dnf's reposync
Apt-Cacher NG caches Debian/Ubuntu packages on demand behind an HTTP proxy setting, while dnf's reposync plugin makes a full local copy of a chosen RPM repository. Both cut repeated downloads without weakening client-side signature verification, which stays on regardless of where the bytes came from.
機械可読: JSON