Skip to content

Instantly share code, notes, and snippets.

View richardnbanks's full-sized avatar
👨‍💻
Coding up a storm

Richard Banks richardnbanks

👨‍💻
Coding up a storm
View GitHub Profile
@richardnbanks
richardnbanks / notify_slack.py
Created October 15, 2017 22:31
AWS Lambda function to send notifications from CodeDeploy to Slack
from __future__ import print_function
import json, urllib, urllib2
def send_slack(message):
"""
Send Slack Message to Deployments Channel
"""
slack_token = ''
slack_channel = ''
slack_user = 'Deployment Bot'

Keybase proof

I hereby claim:

  • I am richardnbanks on github.
  • I am richardnbanks (https://keybase.io/richardnbanks) on keybase.
  • I have a public key ASAFPXqz6mQAdRpz1GCr8VQiXJTAmc8h9g86op0n6JPciQo

To claim this, I am signing this object:

@richardnbanks
richardnbanks / cf_sketch
Created September 15, 2013 21:58
A simple wrapper around cf_sketch to make working with a git based workflow easier. See: https://github.com/cfengine/design-center/issues/340
#!/bin/bash
# Get working dir
WORKING_DIR="${PWD}"
while [[ $WORKING_DIR != / && $WORKING_DIR != "" ]] ; do
if [ -e "$WORKING_DIR/.cf-sketch" ] ; then
DC_ROOT=$WORKING_DIR
break
else
@richardnbanks
richardnbanks / route53DynDNS.bash
Created August 18, 2012 10:20 — forked from simonmcc/route53DynDNS.bash
Amazon Route 53 Dynamic DNS (CNAME) Updater Script
#!/bin/bash
#
# This script requires xpath to parse part of the dnscurl.pl output
# on CentOS/RedHat/Amazon Linux:
#
# sudo yum install perl-XML-XPath
#
# also, dnscurl.pl (from http://aws.amazon.com/code/Amazon-Route-53/9706686376855511)
# expects your secrets to be in ~/.aws-secrets
# using a file format like this (from http://dmz.us/wp/wp-content/uploads/r53/aws-secrets.txt)