Skip to content

Instantly share code, notes, and snippets.

@tompedals
Created August 26, 2015 20:16
Show Gist options
  • Save tompedals/cc2f440e0c647a1c29da to your computer and use it in GitHub Desktop.
Save tompedals/cc2f440e0c647a1c29da to your computer and use it in GitHub Desktop.
A simple command line interface for HeyUpdate
#!/bin/bash
# You can generate a new personal API token in your user settings (/user/tokens).
TOKEN="";
# Send the input as an update
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"message\": \"$*\"}" \
https://api.heyupdate.com/updates > /dev/null 2>&1;
echo "Update sent";
@tompedals
Copy link
Author

cp heyupdate.sh /usr/local/bin/heyupdate

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