Skip to content

Instantly share code, notes, and snippets.

@derpston
Created March 12, 2012 06:49
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save derpston/2db8a6ebd212145d6062 to your computer and use it in GitHub Desktop.
Quick hack to send a datapoint to Metricfire when the enter key is pressed
#!/bin/bash
key=redacted
while read line
do
# Send Metricfire an event that happened once ('1') and file it under a metric
# called 'um' in the application 'pg-um'
curl -s https://$key@api.metricfire.com/v1/metric/pg-um/um --data-binary 1
echo $?
echo $(date +%s) >> pg-um.log
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment