Skip to content

Instantly share code, notes, and snippets.

View dword4's full-sized avatar

Drew Hynes dword4

View GitHub Profile
@dword4
dword4 / keybase.md
Created December 30, 2017 17:07
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@dword4
dword4 / deploy-salt.sh
Created November 5, 2017 01:01
simple script to deploy salt-minion on a vm, requires ssh key be copied over first
#!/bin/bash
HOST=$1
echo "deploying salt -> $HOST"
ssh root@$HOST "yum -y install epel-release && yum -y install salt-minion"
ssh root@$HOST "sed -i 's/#master: salt/master: 192.168.1.50/g' /etc/salt/minion"
ssh root@$HOST "systemctl start salt-minion && systemctl enable salt-minion"
ssh root@$HOST "systemctl stop firewalld && systemctl disable firewalld"
echo "salt successfully deployed
set t_Co=256
if has("syntax")
syntax on
endif
set novisualbell
set hlsearch
"colorscheme apprentice
"colorscheme slate
"colorscheme dword2
#@module.commands('lasttopic')
def last_topic(bot, trigger):
channel_list = []
conn_channels = bot.privileges
for channel in conn_channels:
if channel not in channel_list:
channel_list.append(channel)
for chan in channel_list:
if chan == '#t3st':
@dword4
dword4 / system_help.sh
Created January 15, 2016 05:10
collect some basic system data for troubleshooting
#!/bin/bash
SCRIPT_VERSION="0.1"
# things to check
# internal ip, external ip, dns server, connectivity to google
# filesystem usage, current system load, memory usage
> log.log
date >> log.log
IP=`ip addr | grep -P -o '\d{1,3}.\d{1,3}\.\d{1,3}\.\d{1,3}\/24'`
@dword4
dword4 / nextdays.py
Created February 9, 2015 05:50
simple script to build URLs for the next few days
#!/usr/bin/python
import datetime
import calendar
day = datetime.date.today().strftime("%d")
month = datetime.date.today().strftime("%m")
year = datetime.date.today().strftime("%Y")
strip_month = datetime.date.today().strftime("%-m")
@dword4
dword4 / imgur2pdf.py
Last active January 22, 2024 19:17
Convert imgur album to a pdf file
#!/usr/bin/python
from imgurpython import ImgurClient
from PIL import Image
from creds import *
import PIL
from reportlab.pdfgen import canvas
from reportlab.platypus import SimpleDocTemplate, Paragraph, Image, Spacer, PageBreak
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.pagesizes import letter
from reportlab.lib.units import inch