すべての記事
-
SSH known_hosts and host key verification for automation: ssh-keyscan plus an out-of-band check
Automation that connects over SSH still needs to verify the server's host key; ssh-keyscan alone only harvests a key without proving it is genuine. StrictHostKeyChecking=accept-new, HashKnownHosts and SSHFP records each address a different part of doing this safely without an interactive prompt.
-
Checking configuration profiles and MDM enrollment status from Terminal with profiles
profiles lists installed configuration profiles and reports MDM enrollment status; some settings, such as bootstrap token escrow or enforced update deferral, can only be set by a device management service in the first place, not from a local Terminal session.
-
ssh and scp exit codes: 255 is ssh's own failure, anything else is the remote command's
ssh passes through the exit status of the remote command it ran, reserving 255 for a failure of ssh itself (connection refused, authentication failure, host key mismatch) and for a remote command killed by a signal. scp documents only a plain 0-success/nonzero-failure split, so distinguishing local transport trouble from a remote error requires ssh's stderr text, not scp's own code.
-
Exporting host metrics with Prometheus node_exporter: collectors, the textfile collector, and firewalling the port
node_exporter turns kernel and OS-level counters into Prometheus metrics on port 9100, with most collectors enabled by default and a Textfile Collector for feeding in numbers a script computed. Run it as an unprivileged systemd service and restrict the port to Prometheus's address, since /metrics is unauthenticated by default.
-
Handling class imbalance: metrics first, then weights, thresholds and resampling inside the pipeline
When one class is rare, accuracy is uninformative and a model can ignore the minority entirely; fix evaluation first (stratified splits, per-class metrics, balanced accuracy), then use class weights or a tuned threshold, and apply resampling such as SMOTE only to the training fold inside the cross-validated pipeline.
-
gRPC の基礎:protobuf の契約、ストリーミング、適した用途
gRPC は .proto ファイルで定義したメソッドを呼び出し、Protocol Buffers をインターフェース定義と通信形式に使います。HTTP/2 上で単項・ストリーミング呼び出し、期限、メタデータ、固定のステータスコード群を提供します。サービス間やモバイルのバックエンドに適し、ブラウザーには gRPC-Web、公開 API の連携先には通常 HTTP 上の JSON が求められます。
-
耐量子署名と公開 TLS 証明書:実用化の準備状況を個別に確認する
ML-DSA と SLH-DSA は標準化された署名アルゴリズムだが、公開 TLS 証明書の発行には、証明書プロファイル、プロトコルへの統合、信頼ポリシー上の受け入れも必要である。
-
Zero-downtime schema changes with expand and contract
Change a schema in three deployable steps: expand (add the new column or table, keep the old), migrate (dual-write and backfill in batches), contract (remove the old after all code uses the new); avoid long locks by not rewriting tables in one statement.
-
Triaging a full Linux disk: df, du, deleted-but-open files and the journal
A full filesystem can be full on space or on inodes, and space held by a deleted-but-still-open file will not show up in du. This methodology walks the checks in order — df -h, df -i, du -x, lsof +L1, and journald vacuuming — before anything is deleted.
-
MCP 2026-07-28:ステートレスなコアと互換性の境界
7月の改訂では、初期化ハンドシェイクとトランスポートセッションが削除され、リクエストごとのメタデータと複数往復のやり取りが追加されるとともに、拡張機能と非推奨化の仕組みが正式に定義された。ディスカバリーはサーバーには実装が必須だが、クライアントによる呼び出しは任意である。
-
At what point do teams replace a PostgreSQL queue table with a message broker, and what triggered the move?
Open question: the PostgreSQL documentation sanctions SKIP LOCKED for multiple consumers on a queue-like table, and design walk-throughs recommend starting there; which triggers (queue age, lock contention, table bloat, fan-out needs, operational load) have actually caused a switch to a broker, at what volumes, and how many systems never switched?
-
Installing macOS updates unattended from the command line with softwareupdate
softwareupdate lists, installs and restarts for updates without the graphical System Settings pane, but --fetch-full-installer needs volume-owner authentication on Apple silicon and a managed deferral policy can hide updates from --list entirely. This methodology covers both.
-
Qualifying a negative repository search before declaring code absent
Audit the scope of a search that returned no matches before concluding that a symbol, configuration, or behavior does not exist in the project.
-
Collision broad phase and narrow phase: candidates versus contacts
Build a collision pipeline that distinguishes conservative spatial candidates from geometric contacts, with clear filtering, ownership, and profiling boundaries.
-
Mass versus volume in cooking: which cup is meant, and how to record the conversion actually used
A cup, tablespoon or teaspoon is a volume whose definition differs between the US customary units listed by NIST and the rounded values used on US nutrition labels, and the mass it holds depends on the ingredient and how it was filled; a household that converts between mass and volume records the definition it used and its own weighed values so that a recipe can be reproduced.
-
作業項目ごとにテストへ変換できる受け入れ基準を書く
各作業項目の受け入れ基準を、開始状態、操作、観測可能な結果を含む具体例として書きます。Gherkin の Given/When/Then または同等の構造を使い、境界条件を明記します。作成者以外が実行も確認もできないものは、基準とはいえません。
-
コンパイルデータベース:ヘッダーを変える前に失敗した翻訳単位を再現する
実際のコンパイルコマンドと作業ディレクトリを使い、ソースの不具合とエディター設定の誤りを区別します。
-
Deprecating a function in a library: warn, document the replacement, remove on schedule
A library deprecation has four parts: a replacement that exists first, a runtime warning plus a documentation note naming the version and the replacement, a changelog entry, and a removal release fixed in advance by policy. PEP 387 requires a deprecation period of at least two years under Python's annual cadence and describes a documentation-only soft deprecation; Django removes shims no earlier than two feature releases after the warning.
-
Latency percentiles: why the average describes no real request
Latency distributions are skewed, so the mean sits between a fast majority and a slow tail and matches no actual request; p50, p99 and the maximum describe what users meet. Record histograms rather than pre-computed quantiles so percentiles can be aggregated across instances and recomputed for any window.
-
GitHub Actionsのワークフローを強化する:SHA固定のアクション、最小権限トークン、信頼できない入力
サードパーティーのアクションを完全なコミットSHAに固定し、GITHUB_TOKENは既定で読み取り専用にしてジョブ単位で権限を広げます。信頼できないイベントのフィールドをrunスクリプトに直接展開せず、pull_request_targetとworkflow_runを特権トリガーとして扱います。
機械可読: JSON