Skip to content

Instantly share code, notes, and snippets.

@Cabeda
Last active July 6, 2021 14:14
Show Gist options
  • Save Cabeda/c6a7c3237b85d518d641f62bd7268389 to your computer and use it in GitHub Desktop.
Save Cabeda/c6a7c3237b85d518d641f62bd7268389 to your computer and use it in GitHub Desktop.
Script to notify when one can schedule COVID-19 vacination in Portugal
#bin/bash
day=$1
month=$2
year=$3
while true;
do
status_code=$(curl -s -o /dev/null -w "%{http_code}" 'https://covid19.min-saude.pt/pedido-de-agendamento/' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-raw 'f_dia='$day'&f_mes='$month'&f_ano='$year)
if [ $status_code = 302 ]
then
osascript -e 'display notification "Vai-te vacinar seu lunático!!!"'
say -v Joana "Vai-te vacinar seu lunático!!!"
fi
sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment