Last active
August 29, 2015 14:02
-
-
Save eraserewind/b98736ab211342ebe84b to your computer and use it in GitHub Desktop.
Send SMS to yourself using Free Mobile's SMS notifications API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FREE_MOBILE_SMS_USER="..." | |
FREE_MOBILE_SMS_PASS="..." | |
function self-sms { | |
setopt extendedglob | |
encoded="${${(j: :)@}//(#b)(?)/%$[[##16]##${match[1]}]}" | |
curl -q https://smsapi.free-mobile.fr/sendmsg\?user\=${FREE_MOBILE_SMS_USER}\&pass\=${FREE_MOBILE_SMS_PASS}\&msg\=${encoded} | |
} | |
# self-sms hello my friend how are you\? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment