Snippets / Tags
shell
7 shell code snippets across 2 languages. Copy-paste solutions from production code.
7
snippets
aws cli
3 snippetsFetch and Parse a Secret from AWS Secrets Manager
Use aws secretsmanager get-secret-value with jq to fetch a JSON secret and pipe individual fields into shell variables.
Generate a Presigned URL for an S3 Object
Use aws s3 presign to generate a time-limited download URL for a private S3 object. Share files without making the bucket public.
Sync a Folder to S3 with Include and Exclude Filters
Use aws s3 sync with --exclude, --include, --dryrun, and --delete to deploy a directory to an S3 bucket safely.
git
4 snippetsFind the Bad Commit with git bisect
Use git bisect to binary-search through commits and find the exact one that introduced a bug or test failure.
Squash the Last N Commits with Interactive Rebase
Use git rebase -i to squash, reorder, edit, or drop the last N commits before pushing or opening a pull request.
Undo the Last Git Commit (Keep or Discard Changes)
How to undo the most recent git commit using git reset, with --soft, --mixed, and --hard explained side by side.
Useful git stash Patterns Beyond stash and pop
Stash with a message, stash untracked files, list stashes, apply a specific stash, and stash a single file. The full git stash workflow.