Skip to content

Instantly share code, notes, and snippets.

@luzpaz
Last active July 30, 2021 14:39
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 luzpaz/58cabcb2eee1ada2889d247823e62273 to your computer and use it in GitHub Desktop.
Save luzpaz/58cabcb2eee1ada2889d247823e62273 to your computer and use it in GitHub Desktop.
Codespell Tips
Find a line that doesn't have '->' in it: ^(.(?!(->)))*$
Find a line with missing commas: ^(?=\w+->(?!\w+$)(?:\w+, )*\w+(?!,)$).+
# Copying commits from other repos
## This will print the diff,
## then grep all lines that start with '+' and a letter or number (needs other conditions as well
## the truncates the '+' of the beginning of the result
## copies everything to the buffer
git show | grep '^+[a-zA-Z0-9]' | cut -c 2- | pbcopy
## append the last 5 commits with the same regex, to some other file
git show -n 5 | grep '^+[a-zA-Z0-9]' | cut -c 2- >>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment