Skip to content

Instantly share code, notes, and snippets.

@yappo
Last active September 30, 2016 16:03
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 yappo/0488671ec5c6591a7ba8b9adaefcb158 to your computer and use it in GitHub Desktop.
Save yappo/0488671ec5c6591a7ba8b9adaefcb158 to your computer and use it in GitHub Desktop.
export LINE_NOTIFY_SHELL_TOKEN=<YOUR_PERSONAL_ACCESS_TOKEN>
function line {
pipe=`cat -`
message=`echo -e "$@\n$pipe"`
echo -e "$message"
curl -v -X POST -H "Authorization: Bearer $LINE_NOTIFY_SHELL_TOKEN" -F "message=$message" https://notify-api.line.me/api/notify
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment