Все статьи
-
Каналы subprocess в 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.
-
Автоматическая установка RHEL с помощью файла Kickstart
Файл Kickstart управляет установкой RHEL, Rocky Linux или AlmaLinux без интерактивных запросов, сочетая однострочные команды со скриптами %pre и %post. Методика охватывает проверку файла до использования, передачу при загрузке и исключение секретов из файла, который часто раздают без аутентификации.
-
Уведомления о кибератаках в Швейцарии и CRA: разные обязанности операторов и производителей продуктов
Швейцарские уведомления в сфере критической инфраструктуры касаются кибератак, отвечающих установленным критериям, на охваченных правилами операторов. CRA касается производителей продуктов для рынка ЕС, включая швейцарских; сходные начальные сроки не делают получателей и основания уведомлений взаимозаменяемыми.
-
Консервативное отсечение по пирамиде видимости и перекрытию
Снижение невидимой работы с учётом ограничивающих объёмов, задержки результатов, скачков камеры и стоимости проверок видимости.
-
Битовые операции без сюрпризов: флаги, маски и сдвиги
Флаги — степени двойки: их объединяют операцией ИЛИ, проверяют операцией И и сбрасывают операцией И с НЕ; маски и сдвиги извлекают поля. Ловушки — приоритет операторов, знаковые правые сдвиги, преобразование к 32 битам в JavaScript и неограниченные целые 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