Skip to content

Instantly share code, notes, and snippets.

@jonchretien
Last active June 5, 2020 15:42
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 jonchretien/48be524dbe43c62dd4c91ae5a32fdb22 to your computer and use it in GitHub Desktop.
Save jonchretien/48be524dbe43c62dd4c91ae5a32fdb22 to your computer and use it in GitHub Desktop.
# find all files w/extension
find path/to/files -type f -name "*.scss"
# look for string in files
ack --js --ts "enzyme" -l
# Printing a leaderboard of authors based on number of commits in a git repo
# So uniq prints out repeated lines, but only those that appear adjacent to eachother. That is why we had to pass the output first to sort. The -c flag prefixes each line by the number of occurrences.
# You can see the output is still sorted alphabetically. So now all that is remaining is sort it numerically. There’s a flag for that in sort, the -n flag. It considers the numbers based on their numerical value.
git log --format='%an' | sort | uniq -c | sort -nr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment