Skip to content

Instantly share code, notes, and snippets.

@cheshire137
Last active April 18, 2024 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cheshire137/fb115faa3daa6ae79a154243b5d66efe to your computer and use it in GitHub Desktop.
Save cheshire137/fb115faa3daa6ae79a154243b5d66efe to your computer and use it in GitHub Desktop.
Handy commands I forget and want to copy-paste periodically
# hot-reload a Go server, ty @zerowidth
# see https://github.com/eradman/entr
find . -name '*.go' | entr -r -c go run . server
# look for files that match two patterns
grep -rl --include \*.rb --exclude-dir=vendor --exclude-dir=test "pattern the first" . | xargs grep "pattern the second"
# generate a Markdown todo list of file paths
some_command_outputting_a_list_of_file_paths | xargs grep -l "some pattern within some of the files" | awk '$0="- [ ] "$0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment