Tag: bash
-
Subverting AI Agent Logging with a Git Post-Commit Hook
I keep hearing from developer friends who are 'expected' by their employer to demonstrate that they're using AI, even for tasks at which the AI is demonstrably a suboptimal choice. So - as a joke - I came up with a git post-commit hook that makes it look like they're doing so, even when they're not.
-
Note to future self: when you want git to tell you all the files you've modified, but not those you've deleted (e.g. to pipe through xargs and feed to your linter for bulk-linting), the command you're looking for is -
git diff --name-only --diff-filter=M
-
Bash+Batch In One File
A single file that can be executed in Bash, Zsh, Windows Command Prompt, and MS-DOS? Yup, and it's disgusting.
-
**
Despite the fact that it's existed for 11 years, TIL about globstar in Bash. Set shopt -s globstar and ** globs become fully recursive, making that bulk transcode operation much simpler. ๐คฏ

