Skip to content

Instantly share code, notes, and snippets.

@camdez
Created August 24, 2016 18:20
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 camdez/e3dcedf77405c352e504601fd09ef5b5 to your computer and use it in GitHub Desktop.
Save camdez/e3dcedf77405c352e504601fd09ef5b5 to your computer and use it in GitHub Desktop.
Small Business App Showdown Leaderboard
#!/bin/bash
# leaderboard.sh - Small Business App Showdown leaderboard
#
# Author: Cameron Desautels <cameron@collbox.co>
# Date: 2016-08-24 13:09:48
DATA_URL='https://intuit.promo.eprize.com/v1/developer/contest/gallery.json?count=1000'
HIGHLIGHT='collbox'
curl $DATA_URL \
| jq -r '.result.entry | sort_by(-(.votes | tonumber)) | map([.title, .votes] | join(", ")) | join("\n")' \
| nl \
| egrep --color=always "${HIGHLIGHT}|$" \
| less -r
@camdez
Copy link
Author

camdez commented Aug 24, 2016

Make sure you have jq(1) installed. Available via Homebrew (brew install jq).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment