Skip to content

Instantly share code, notes, and snippets.

@brianjlandau
Last active November 10, 2019 02:58
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 brianjlandau/ebd3b9bb7b699022d1cb8ad6d04695d6 to your computer and use it in GitHub Desktop.
Save brianjlandau/ebd3b9bb7b699022d1cb8ad6d04695d6 to your computer and use it in GitHub Desktop.
Get the top 500 homebrew formula and browse
curl "https://formulae.brew.sh/api/analytics/install-on-request/homebrew-core/90d.json" | \
jq ".formulae |
to_entries |
sort_by([(.value[].count | gsub(\",\"; \"\") | tonumber)] | add) |
reverse |
map({key: .key, value: ([(.value[].count | gsub(\",\"; \"\") | tonumber)] | add)})[0:500] |
from_entries" | \
less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment