[{"content":"du -xh --max-depth=1 / 2\u0026gt;/dev/null | sort -h | tail -x keeps du on a single filesystem. For an interactive view install ncdu and run ncdu -x /.\nCommon culprits: /var/log, Docker layers in /var/lib/docker, and old kernels in /boot.\n","permalink":"https://luojinotes.com/posts/linux-disk-usage/","summary":"Track down large directories quickly.","title":"Who is eating my disk? du and ncdu"},{"content":"After getting a certificate from Let\u0026rsquo;s Encrypt, a few settings are worth a second look.\nEnable only TLSv1.2 and TLSv1.3. Hide the version with server_tokens off;. Redirect port 80 to HTTPS. Use acme.sh or certbot with automatic renewal and a reload hook. ssl_protocols TLSv1.2 TLSv1.3; server_tokens off; Test the result with openssl s_client -connect example.com:443 -servername example.com.\n","permalink":"https://luojinotes.com/posts/nginx-tls-checklist/","summary":"Settings worth checking after issuing a certificate.","title":"A short TLS checklist for nginx"},{"content":"The classic workflow still works everywhere:\npython3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt uv offers the same steps with much faster installs:\nuv venv uv pip install -r requirements.txt For small projects either is fine. For CI, where install time is paid on every run, the speedup is noticeable.\n","permalink":"https://luojinotes.com/posts/python-venv-uv/","summary":"A quick comparison of the standard venv workflow and uv.","title":"Python environments: venv vs uv"},{"content":"Compilers and build caches do not belong in production images. Multi-stage builds solve this.\nFROM golang:1.23 AS build WORKDIR /src COPY . . RUN CGO_ENABLED=0 go build -o /app ./cmd/app FROM gcr.io/distroless/static COPY --from=build /app /app ENTRYPOINT [\u0026#34;/app\u0026#34;] The final image only contains the static binary, usually a few megabytes instead of nearly a gigabyte.\n","permalink":"https://luojinotes.com/posts/docker-multistage/","summary":"Build in one image, ship in another.","title":"Smaller images with Docker multi-stage builds"},{"content":"When something worked last month and fails today, git bisect finds the guilty commit in O(log n) steps.\ngit bisect start git bisect bad # current commit is broken git bisect good v1.4.0 # last known good tag Git checks out a commit in the middle. Test it, then run git bisect good or git bisect bad. Repeat until git prints the first bad commit.\nYou can automate it with a script: git bisect run ./test.sh. Finish with git bisect reset.\n","permalink":"https://luojinotes.com/posts/git-bisect/","summary":"Binary search your history to find the commit that broke things.","title":"Finding a regression with git bisect"},{"content":"A tidy ~/.ssh/config removes most of the friction of working with many servers.\nHost aliases and keys Host dev HostName 203.0.113.10 User deploy IdentityFile ~/.ssh/dev_ed25519 IdentitiesOnly yes IdentitiesOnly yes stops ssh from offering every key in your agent, which avoids \u0026ldquo;too many authentication failures\u0026rdquo;.\nKeep sessions alive Host * ServerAliveInterval 30 ServerAliveCountMax 3 Jump hosts ProxyJump bastion lets you reach private machines through a bastion without agent forwarding.\n","permalink":"https://luojinotes.com/posts/ssh-config-tips/","summary":"A handful of ~/.ssh/config settings that save time every day.","title":"Practical SSH config tips"},{"content":"I\u0026rsquo;m a developer who keeps a notebook of small technical findings: shell one-liners, debugging stories and tool configuration. This site is generated with Hugo and the PaperMod theme.\n","permalink":"https://luojinotes.com/about/","summary":"\u003cp\u003eI\u0026rsquo;m a developer who keeps a notebook of small technical findings: shell one-liners, debugging stories and tool configuration.\nThis site is generated with \u003ca href=\"https://gohugo.io/\"\u003eHugo\u003c/a\u003e and the PaperMod theme.\u003c/p\u003e","title":"About"}]