This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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} |