Skip to content

Instantly share code, notes, and snippets.

@thatarchguy
thatarchguy / rds_to_mysql.py
Created August 15, 2017 18:06
Convert AWS RDS Parameter Group to mysqld.conf
# You should edit this script to your liking. In its current form,
# it will take an original mysqld.cnf and merge the rds parameters with it.
# Comment out that stuff and you can easily just print the rds config as "param = value".
import json
from ConfigParser import SafeConfigParser
# aws rds describe-db-parameters --db-parameter-group-name my-param-group > rds.json
with open('rds.json', 'r') as json_file:
@thatarchguy
thatarchguy / sp
Created November 17, 2016 21:56 — forked from streetturtle/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@thatarchguy
thatarchguy / autoexec.cfg
Last active October 8, 2016 02:59
CS:GO configs
bind "TAB" "+ng";
alias "+ng" "+showscores; net_graph 1";
alias "-ng" "-showscores; net_graph 0";
alias "+ujumpthrow" "+jump;-attack"
alias "-ujumpthrow" "-jump"
rate "128000"
cl_cmdrate "128"
cl_updaterate "128"
@thatarchguy
thatarchguy / what.js
Last active October 3, 2015 02:56
whatcd scripts
#! /usr/local/bin/node
var fs = require('fs'),
request = require('request'),
readline = require('readline');
var request = request.defaults({jar: true}),
rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
@thatarchguy
thatarchguy / keybase.md
Created June 12, 2015 04:10
keybase.md

Keybase proof

I hereby claim:

  • I am thatarchguy on github.
  • I am thatarchguy (https://keybase.io/thatarchguy) on keybase.
  • I have a public key whose fingerprint is CF4D B237 9F55 4EFA A524 3DE8 DCB3 3F2E 36B3 16F3

To claim this, I am signing this object:

@thatarchguy
thatarchguy / loginscript.sh
Last active August 29, 2015 14:14
Raspberry Pi Firewall/IPS/DNS-RPZ
#!/bin/bash
# Kevin Law
# prepare iptables and start snort based on wlan0 address
# Used for portable raspi firewall/ips
# Get ip in CIDR notation for wlan0 interface
LOCALIP=`ip addr show |grep -w inet |grep -v 127.0.0.1|grep -v 10.11.12.13|awk '{ print $2}'`
# Edit the snort conf to have that ip
sed -i '/DEBIAN_SNORT_HOME_NET/d' /etc/snort/snort.debian.conf
@thatarchguy
thatarchguy / gitgrab.sh
Created January 19, 2015 16:45
GitGrab
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
Find yara rules in github repositories
OPTIONS:
github repo url
ex. gitgrab.sh https://github.com/someguy/reponame.git
@thatarchguy
thatarchguy / vpnwidget.lua
Created October 21, 2014 23:58
Awesomewm vpn widget
-- add this to your rc.lua, or include it as a dependency
-- Don't forget to add this to the layout section:
-- right_layout:add(vpnwidget)
vpnwidget = wibox.widget.textbox()
vpnwidget:set_text(" VPN: N/A ")
@thatarchguy
thatarchguy / whitelist.sh
Created August 11, 2014 20:06
iptables whitelist
#!/bin/bash
#
# iptables whitelist
# Very basic. Meant to be a starting point
# For Example: modify to allow whitelist on certain ports
# Specify where whitelist file is
WHITELIST=/usr/local/etc/whitelist.txt
wget http://firewall.sekretclub/whitelist.txt -O $WHITELIST
'' =================================================================================================
''
'' File....... dc22_badge_human_full.spin
''
'' Authors.... Jon "JonnyMac" McPhalen and Ryan "1o57" Clarke
'' Unpublished portions reverse-engineered by Aaron "P120ph37" Meriwether
'' MIT License
'' -- see below for terms of use
''
'' E-mail..... jon@jonmcphalen.com