Skip to content

Instantly share code, notes, and snippets.

@JagCesar JagCesar/pushMe.sh
Created May 16, 2017

Embed
What would you like to do?
Push Me bash script
#!/bin/sh
message="$1"
curl -so \
- --data "title=$message&token=[token-here]" \
https://pushmeapi.jagcesar.se
@JagCesar

This comment has been minimized.

Copy link
Owner Author

JagCesar commented May 16, 2017

Save this to a .sh file, and don't forget to make it executable using the command chmod +x pushMe.sh.

Then you execute it by writing ./pushMe.sh Hello!

@malinnikov

This comment has been minimized.

Copy link

malinnikov commented Oct 16, 2017

Hello there, thanks for the cool service! I have a question: should parameter be "token" or "identifier", as mentioned in the iOS app? I managed to send notifications before but now I can't see pushes on device with either parameter name.

@malinnikov

This comment has been minimized.

Copy link

malinnikov commented Oct 16, 2017

Ah, never mind, both do work. I just had to change the script to make it work on macOS Sierra:

message="$1"

curl -d "title=$message&token=my_token" -X POST https://pushmeapi.jagcesar.se
@gdzien

This comment has been minimized.

Copy link

gdzien commented Feb 25, 2019

I think this gist should be updated to:

#!/usr/bin/env
message="$1"

curl "title=$message&identifier=my_token" https://pushmeapi.jagcesar.se
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.