Knowledge Base
Notes & Cheatsheets
Curated reference snippets, command recipes, and architecture notes gathered across software engineering and system administration.
Git
Reference Cheatsheet
Git Essential Rebase & Hygiene Recipes
Key commands for keeping commit history clean, recovering accidentally dropped commits, and safely updating feature branches without noisy merge commits.
# Safely update branch on top of main
git fetch origin
git rebase origin/main
# Interactive rebase for the last 4 commits (squash/fixup)
git rebase -i HEAD~4
# Safe push that refuses overwrite if remote has changed
git push --force-with-lease
# Recover lost commits or discarded stash
git reflog
Linux & Shell
Tooling
Modern CLI Utilities & Replacements
Modern Rust and Go based CLI utilities that provide syntax highlighting, faster parallel disk crawling, and sensible defaults over legacy coreutils.
# Modern grep: ripgrep (rg) ignores .gitignore and hidden files by default
rg "pattern" src/ --type rust
# Modern find: fd
fd -e md -x wc -w
# Modern cat: bat (with syntax highlighting and git diff margins)
bat README.md
# Modern ls: eza
eza -lah --icons --git
Containers
DevOps
Docker Resource Pruning & Container Forensics
Quick one-liners for keeping local Docker host storage trimmed and inspecting network namespaces in failing containers.
# Reclaim space from dangling build caches and untagged images
docker system prune -a --volumes -f
# Inspect container resource usage stream
docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}"
# Spawn temporary debug container inside an existing container's network
docker run --rm -it --net=container:<target_container> nicolaka/netshoot
Security
Systems
SSH Hardening & Ed25519 Key Generation
Standard best practices for generating modern elliptic-curve keys, protecting keys with secure KDF rounds, and configuring safe client defaults.
# Generate high-security Ed25519 key with 100 KDF rounds
ssh-keygen -t ed25519 -a 100 -C "user@device-label"
# Recommended ~/.ssh/config snippet
Host *
AddKeysToAgent yes
IdentitiesOnly yes
StrictHostKeyChecking accept-new