secret
Created

Quick hack to send a datapoint to Metricfire when the enter key is pressed

  • Download Gist
pg-um.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12
#!/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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.