Skip to content

Instantly share code, notes, and snippets.

@v0y4g3r
Last active February 19, 2019 11:10
Show Gist options
  • Save v0y4g3r/81050042781b137ca1db68a6b47ac177 to your computer and use it in GitHub Desktop.
Save v0y4g3r/81050042781b137ca1db68a6b47ac177 to your computer and use it in GitHub Desktop.
bark-bash
#! /bin/bash
in=$1
if [ -z "$in" ]
then
in=$(cat -)
fi
if [ -z "$in" ]
then
echo "empty input...quit"
else
pars=$(python2 -c "import urllib;print urllib.quote(raw_input(),safe='')" <<< $in)
curl https://api.day.app/<your_token>/$pars
fi
#! /bin/bash
xclip -sel c -o | /usr/local/bin/notify.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment