Instantly share code, notes, and snippets.

echo '### Setting Hostname ###'
if [[ $OLD_HOSTNAME != "master" || "node" || "etcd" || "ansible" ]]; then
# Change first field here depending on section of UserData for 'master|ectd|node|ansible'
NEW_HOSTNAME=ansible-`hostname | cut -d- -f4,5`
# Set hostname on ec2 instance
hostnamectl set-hostname "$NEW_HOSTNAME"
# Set hostname in /etc/sysconfig/network config
#!/usr/bin/env python
# coded by Brady [r3dact3d]
# set days of week to run alarm in days list
# set song you want to wakeup to in song
# set hour and minute in h, m
# make sure mpg123 is installed on your linux
import time, datetime, os
def alarm(h, m, song):
#!/usr/bin/env python
# written by Brady r3dact3d
import sys, os, time
hostList = sys.argv[1]
action = sys.argv[2]
print("[-] Please pass txt file with hostnames and either enable/disable")
#!/usr/bin/env python
# [r3dact3d]
import requests
url = ''
j = requests.get(url).json()
number = j['number']
people = j['people']
print "=================================="

Keybase proof

I hereby claim:

  • I am r3dact3d on github.
  • I am redacted ( on keybase.
  • I have a public key whose fingerprint is B4C9 533D 8852 05F2 1593 80FC FF2A B018 F08A 69D8

To claim this, I am signing this object: