Instantly share code, notes, and snippets.

View setHostname.sh
#!/bin/bash
echo '### Setting Hostname ###'
OLD_HOSTNAME=`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
View alarmClock.py
#!/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):
View nagiosNotifs.py
#!/usr/bin/env python
# written by Brady r3dact3d
#
import sys, os, time
try:
hostList = sys.argv[1]
action = sys.argv[2]
except:
print("[-] Please pass txt file with hostnames and either enable/disable")
View space.py
#!/usr/bin/env python
# [r3dact3d]
import requests
url = 'http://api.open-notify.org/astros.json'
j = requests.get(url).json()
number = j['number']
people = j['people']
print "=================================="
View keybase.md

Keybase proof

I hereby claim:

  • I am r3dact3d on github.
  • I am redacted (https://keybase.io/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: