Skip to content

Instantly share code, notes, and snippets.

View r3dact3d's full-sized avatar
🏠
Working from home

Brady Thompson r3dact3d

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python3
# brady [r3dact3d]
import codecs
from sys import argv
myText = ''
argv.pop(0)
for i in argv:
myText = myText +" "+ i
print(myText)
print("Encoding String: " + codecs.encode(myText, 'rot13'))
#!/usr/bin/env python
# brady [r3dact3d]
from sys import argv
myText = ''
argv.pop(0)
for i in argv:
myText = myText +" "+ i
print(myText)
print("Encoding String: " + myText.encode('rot13'))
@r3dact3d
r3dact3d / setHostname.sh
Last active May 19, 2019 05:32
Shell script to set friendly hostnames for AWS ec2instances
#!/bin/bash
# brady [r3dact3d]
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
@r3dact3d
r3dact3d / alarmClock.py
Created March 1, 2017 14:21
Simple Python Alarm Clock
#!/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):
@r3dact3d
r3dact3d / nagiosNotifs.py
Last active February 27, 2017 20:03
Python script to enable or disable Nagios Host and Host Services
#!/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")
@r3dact3d
r3dact3d / space.py
Created October 20, 2016 19:49
Will provide current number of humans in space and names along with the space craft.
#!/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 "=================================="

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: