Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am csawall on github.
  • I am sawall (https://keybase.io/sawall) on keybase.
  • I have a public key ASBmVR6QNEM2mVaEjprooYo6W48tXqrTde_OXxsvZuDzago

To claim this, I am signing this object:

@csawall
csawall / checkextip.sh
Created April 30, 2017 14:49
Check external IP and alert on change
#!/bin/bash
#set debug value to "true" to output debug code
debug=false
SlackURL_key="https://hooks.slack.com/services/KEYDATA01/KEYDATA02/KEYDATA03"
SlackUsername="icanhazip"
#obtain current IP from icanhazip
myip=`curl -4 -s icanhazip.com`
if [ $debug == "true" ]; then echo "current IP = " $myip; fi
@csawall
csawall / sendtoslack.sh
Last active October 22, 2016 02:55
Simple Slack Webhook to Post
#!/usr/bin/env bash
SlackURL_key="https://hooks.slack.com/services/KEYDATA01/KEYDATA02/KEYDATA03"
Slackjson="{\"text\":\"This is a test\nIf you see this, it worked!\"}"
curl --silent --request POST --header "Content-Type: application/json" --data "${Slackjson}" ${SlackURL_key}