Skip to content

Instantly share code, notes, and snippets.

View sixty4k's full-sized avatar
🏠
It's hip to be square

Mike Robinson sixty4k

🏠
It's hip to be square
View GitHub Profile
@sixty4k
sixty4k / delete_iam_user.sh
Created May 30, 2017 18:31
Delete IAM user
#!/bin/bash
user_name=$1
echo ${user_name}
echo "Deleting Access Key"
aws iam delete-access-key --access-key-id $(aws iam list-access-keys --user-name ${user_name} \
| jq -r '.AccessKeyMetadata[] | .AccessKeyId' ) --user-name ${user_name}
@sixty4k
sixty4k / facebook.sh
Created January 31, 2017 17:00
Facebook Free February script
#!/bin/bash
case "$1" in
off)
sudo bash -c 'curl https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts | grep facebook.com >> /etc/hosts'
;;
on)
cat /etc/hosts | grep -v facebook.com > hosts.tmp
sudo mv hosts.tmp /etc/hosts
@sixty4k
sixty4k / poller.rb
Created September 16, 2015 21:09
datadogstatsd-ruby issue
#!/usr/bin/ruby
# What do we need!
require 'rubygems'
# ruby 1.8 (what's on the nagios server) needs you to pull in rubygems explicitly, before pulling others in
require 'statsd'
# When do we need it?
#
# metric_base => status page url
@sixty4k
sixty4k / megacli2graphite.sh
Created April 12, 2013 22:29
megacli to graphite
#!/bin/bash
# set my hostname
HOSTNAME=`hostname -s`
# Set Graphite host
GRAPHITE=your.graphite.instance
GRAPHITE_PORT=2003
# Iterate through all the disks (polling live from the raid controller)