Software Engineering WikiSE Wiki

Software Engineering Wiki

Command references, one-liners, scripts and troubleshooting guides for infrastructure and platform engineering.

Start from the symptom

All topics

Linux

  • BashWrite Bash scripts that survive spaces, empty values and failures: quoting, strict mode, parameter expansion, arrays, traps and debugging.
  • systemdInspect and debug services, query the journal, write and override units, schedule timers and apply cgroup resource limits with systemd.
  • jqSelect, filter, reshape and aggregate JSON with jq, pass shell values in safely and emit output that other shell tools can consume.
  • PerformanceFind whether CPU, memory, disk or network is the bottleneck on a Linux host with a first-minute checklist, the USE method and per-resource tools.
  • NetworkingDiagnose and configure Linux links, addresses, routes, policy routing, namespaces, tunnels, bridges and sockets with ip, ss, bridge and tc.
  • tmuxKeep shells alive across SSH drops, split a terminal into panes, copy text without a mouse and script sessions from Bash.
  • VimEdit with operators, motions and text objects, run substitutions over ranges, record macros, manage buffers and windows, and fix paste, swap and startup problems.
  • grep, sed and awkFilter, edit and summarise text from the shell with grep, sed, awk, sort, uniq, cut, tr, paste, column and xargs, and build log-analysis pipelines that hold up.
  • Regular expressionsWrite patterns that match what you mean across grep, PCRE, Go, Python and JavaScript, avoid catastrophic backtracking and test them from the shell.
  • Files and directoriesFind, copy, sync, archive and watch files on Linux with find, fd, rsync, tar, zstd, du, lsof and inotifywait, and handle permissions and hostile filenames safely.
  • Disks and storagePartition, format, mount, encrypt and grow Linux block storage with lsblk, parted, LVM, ext4, XFS, Btrfs, mdadm and cryptsetup, and diagnose full or slow disks.
  • Users, permissions and SELinuxManage accounts, groups and sudo rules, read and fix file modes, ACLs and capabilities, and decode SELinux denials on Fedora and RHEL.
  • FirewallsOpen, forward, NAT, rate-limit and log traffic on Linux with firewalld zones and rich rules, native nftables rulesets, and iptables translation, without breaking containers.
  • tcpdump and WiresharkCapture the right packets with BPF filters, read tcpdump output, capture in containers and over SSH, script with tshark, and diagnose retransmissions, MTU, TLS and DNS faults in Wireshark.

Kubernetes

  • KubernetesInspect workloads with kubectl, understand the object model behind them and find why a pod is not running, ready or reachable.
  • HelmRender, install, upgrade and roll back Helm releases, and understand the template and values behaviour behind most chart surprises.
  • Argo CDDiagnose Argo CD Applications that will not sync or stay healthy, and control drift, sync order, pruning and multi-tenant access.
  • Gateway APIConfigure GatewayClass, Gateway and Route objects, know which team owns each, and find why a route receives no traffic.
  • CiliumUnderstand Cilium's identity-based policy and eBPF datapath, then trace dropped or misrouted flows with cilium-dbg and Hubble.

Containers and IaC

  • DockerRun, build, inspect and clean up containers, images, volumes and networks on a single Docker daemon, and diagnose containers that exit or cannot connect.
  • Docker ComposeRun and debug multi-container stacks with Compose v2: commands, the compose.yaml keys that matter, and how recreation, dependencies and overrides behave.
  • TerraformPlan and apply safely, structure modules and variables, refactor and repair state, and recover from drift, lock and provider errors in Terraform.
  • AnsibleWrite idempotent Ansible playbooks, resolve inventory and variable precedence, dry-run with check mode, and debug plays that fail or change the wrong thing.
  • AWSResolve AWS CLI v2 credentials and profiles, filter output, and run and debug common EC2, S3, IAM, logs, RDS, Lambda and EKS operations.
  • PodmanRun rootless containers and pods with Podman, mount volumes past SELinux, and manage them as systemd services with Quadlet and auto-update.
  • GitHub ActionsWrite GitHub Actions workflows that are fast, least-privilege and hard to exploit: triggers, matrices, caching, reusable workflows, OIDC and debugging failed runs with gh.
  • Make and justWrite Makefiles that rebuild only what changed and justfiles that run project commands: rules, variables, pattern rules, parallel builds and the tab bugs.

Observability

  • PrometheusWrite PromQL for incidents, read counters and histograms correctly, write alerting and recording rules, and keep series cardinality under control.
  • OpenTelemetryConfigure OpenTelemetry SDKs and Collector pipelines, propagate trace context, choose a sampling strategy and find where telemetry is lost.
  • Grafana and LokiProvision Grafana datasources, dashboards and alerts as code, drive it through the HTTP API, and ship, query and tune logs in Loki with LogQL and logcli.

Networking

  • DNSResolve and trace names with dig and resolvectl, read the answer, reason about TTLs and caching, and debug search domains and Kubernetes DNS.
  • HTTP and curlUse curl to test HTTP endpoints, break request time into DNS, TCP, TLS and server phases, script calls safely, and read what status codes mean.
  • SSHConfigure OpenSSH clients and servers, manage keys and agents, forward ports through bastions and read the debug output that names the real failure.
  • SCPCopy files over SSH with scp, understand its SFTP-based transfer since OpenSSH 9.0, and know when rsync, sftp or tar is the better tool.
  • Cisco IOSDiagnose and configure Cisco IOS and IOS XE devices: show commands, interfaces, VLANs, OSPF, BGP, ACLs and changes that roll back if they lock you out.
  • Network automationCollect device state, parse CLI output into data and push configuration changes safely with Netmiko, NAPALM, Nornir and Ansible.

Proxies and routing

  • TraefikConfigure Traefik v3 entrypoints, routers, middlewares and services from Docker, Kubernetes or files, and debug a route that does not match.
  • SquidRun and debug a Squid forward proxy: http_access rule order, ACLs, caching, authentication, parent proxies and access.log analysis.
  • NginxConfigure Nginx as a reverse proxy, TLS terminator and static file server, understand which server and location handle a request, and read the logs when it returns 502.
  • CaddyWrite a Caddyfile that proxies, serves files and issues its own certificates, run Caddy in a container, drive it through the admin API and fix ACME and upstream failures.

Data

  • PostgreSQLDiagnose a slow or blocked PostgreSQL database: psql, query plans, indexes, locks, vacuum and bloat, pooling, replication and backups.
  • RedisInspect and fix a slow or full Redis: data structure costs, eviction, persistence, keyspace scans, locks, replication and cluster checks.
  • ElasticsearchCheck cluster health, fix unassigned shards, write mappings, queries and aggregations, and tune slow search or indexing in Elasticsearch.
  • SQLWrite correct SQL across PostgreSQL, MySQL and SQLite: joins, window functions, CTEs, upserts, indexes, isolation levels, NULL rules and reusable queries.
  • SQLiteUse SQLite well: the sqlite3 shell, type affinity, WAL mode and pragmas, locking, JSON and FTS5, backups, tuning, and safe access from Go and Python.
  • MySQL and MariaDBOperate MySQL 8.4 and MariaDB 11.4: client, users and grants, InnoDB, EXPLAIN, slow log, indexes, dumps and mariadb-backup, replication, my.cnf and lock diagnosis.
  • KafkaOperate Apache Kafka: topics, partitions and consumer groups, the shell tools, offset resets, lag, retention, compaction, producer and consumer tuning, and what to check when it misbehaves.

Security and identity

  • TLSInspect and verify certificate chains with OpenSSL, issue keys and CSRs, install trust anchors, configure servers and diagnose failed TLS handshakes.
  • VaultOperate HashiCorp Vault: seal state, tokens, auth methods, policies, KV, dynamic credentials, PKI and transit, and why a request is denied.
  • Identity managementIdentity, Kerberos, host enrolment, DNS and certificates in one domain, with the commands for enrolment, RBAC and replication problems.
  • Red teamTechnique notes for authorised offensive testing, arranged by ATT&CK phase, with the tooling and the telemetry each step leaves behind.

Virtualisation

  • Proxmox VERun VMs and containers on Proxmox VE from the shell: qm, pct, pvesm, pvecm, vzdump, cloud-init templates, SDN and the API, plus fixes for locked guests and lost quorum.
  • libvirt and KVMRun KVM guests with virsh and virt-install: cloud-image builds with cloud-init, snapshots, storage, NAT and bridged networking, PCI passthrough, live migration and the usual failures.

Languages

  • Go languageIdioms for errors, concurrency and interfaces, the toolchain commands worth memorising, and the traps that survive code review.
  • PythonWrite operational Python scripts that fail safely: subprocess, paths, logging, HTTP, configuration, concurrency, uv packaging and troubleshooting.
  • RustOwnership and borrowing in practice, error handling, async, and the cargo commands that matter day to day.
  • TypeScriptType-check TypeScript with tsc 7, narrow and validate untrusted data, pick tsconfig flags that catch real bugs, and fix common compiler errors.

Practice

  • GitInspect history, undo changes safely, rebase and resolve conflicts, recover lost work, and understand the object model behind each Git command.
  • Software designLatency and capacity numbers, scaling, caching, load balancing, resilience, data and API decisions, and the failure mode each one introduces.
  • TestingChoose the right test layer, write fast deterministic tests, use fakes and fixtures, and run, isolate and de-flake tests in pytest, Go and Vitest.
  • LLM APIsCall the Anthropic and OpenAI APIs: models, streaming, tool use, structured output, caching, rate limits, errors and key handling.

Scripts

  • Shell one-linersCopy-pasteable one-line commands for files, processes, disk, network, DNS, systemd, Git, containers, Kubernetes, SSH, TLS, JSON and archives on a Linux host.
  • Operations scriptsComplete Bash and Python scripts for disk alerts, certificate expiry, health checks, backups, cleanup, audits, metrics export and parallel SSH, ready to drop into cron or a timer.

Snippets

  • Go snippetsSmall Go functions for slices, strings and maths, each with a short explanation and an example call.
  • Python snippetsSmall Python functions for lists, dictionaries, strings, maths and dates, each with a short explanation and an example call.
  • JavaScript snippetsSmall JavaScript functions for arrays, objects, strings, dates and the browser DOM, each with a short explanation and an example call.
  • React snippetsReact components such as accordions, modals and data tables, and hooks for state, events and browser APIs, each with an example use.
  • C# snippetsSmall C# methods for collections, strings, maths and dates, each with a short explanation and an example call.

For agents and scripts

Every page has a Markdown twin at <page>/index.md. /llms.txt lists them, /llms-full.txt holds every guide in one file, and /pages.json gives titles, descriptions and heading anchors. In browsers that support WebMCP the site also registers read-only tools for searching and reading pages.