Skip to content

Instantly share code, notes, and snippets.

View Masadow's full-sized avatar

Jimmy Delas Masadow

  • CTO at Medami
  • Dublin, Ireland
View GitHub Profile
@Masadow
Masadow / madam.sh
Created July 7, 2016 13:35
Bonjour Madame into slack
SLACK_HOOK_URL="YOUR SECRET HOOK GIVEN BY SLACK"
CHANNEL="#bonjourmadame"
FEEDURL="http://dites.bonjourmadame.fr"
URL=`wget $FEEDURL -q -O - | grep -o 'src="http[^"]*"'| cut -d\" -f2 | head -n7 | tail -n1`
curl -X POST --data-urlencode 'payload={"channel": "$CHANNEL", "username": "Madame", "text": "Bonjour !", "attachments": [{"fallback": "Pas de madame les coquins", "image_url": "'$URL'"}]}' $SLACK_HOOK_URL