This file contains hidden or 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/perl | |
# | |
# coll.pl - This script queries asterisk for the members of the | |
# Collections Queue, finds the Agents' names from agents.conf, | |
# then mails the output. | |
# | |
my $TITLE = "Members of Collections Queue"; | |
my $RECIPIENTS = "operations\@example.com,user\@example.com"; | |
my $numberOfElements = 0; | |
my @agentlist = (); |
This file contains hidden or 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 | |
# esearch-update - Updates elasticsearch with various sanity checks | |
# blame: [email protected] | |
VERSION=0.18.6 | |
NEWVERSION=0.19.0 | |
CONFIG=/opt/elasticsearch/config/elasticsearch.yml | |
MONIT=/usr/bin/monit | |
LIMIT=20 |
This file contains hidden or 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/env ruby | |
require 'rubygems' | |
require 'RMagick' | |
captcha = "9277f49ecee" | |
#10.times { captcha << (rand(26)+65).chr } | |
canvas = Magick::Image.new(1280,800, Magick::HatchFill.new('#ffffff','#4169e1')) | |
text = Magick::Draw.new |
This file contains hidden or 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 | |
#--- | |
# zap-pass.sh - reset user's password to random string | |
# move user to the disabled branch | |
#--- | |
if [ r$1 = r ]; then | |
echo "usage: `basename $0` <username>" | |
exit 1 | |
fi |
This file contains hidden or 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/env ruby | |
require 'pp' | |
require 'rubygems' | |
require 'rest-client' | |
require 'json' | |
require 'optparse' | |
require 'ostruct' | |
class ParseOpts | |
def self.parse(args) |
This file contains hidden or 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
nginx -V 2>&1 | sed 's/ --/\n --/g' |
This file contains hidden or 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
King & Peasant (is also known by other games) is a game of castes. | |
Required for the game: | |
* 5 or more participants (5-7 is about ideal) | |
* 1 or 2 decks of cards | |
* 1 or 2 dice (optional) | |
* Munchies in the middle of the table (important but not necessary) | |
*Ranks | |
o King |
This file contains hidden or 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/sh │ | |
# │ | |
# usage: retrieve-cert.sh remote.host.name [port] │ | |
# │ | |
REMHOST=$1 │ | |
REMPORT=${2:-443} │ | |
│ | |
echo |\ │ | |
openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |
This file contains hidden or 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/env ruby | |
# | |
# Check Endpoint Plugin | |
# === | |
require 'rubygems' if RUBY_VERSION < '1.9.0' | |
require 'sensu-plugin/check/cli' | |
require 'open-uri' | |
require 'openssl' | |
require 'json' |
This file contains hidden or 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 | |
EXPIRATION=$( echo |\ | |
openssl s_client -connect $1:443 2>/dev/null |\ | |
openssl x509 -noout -dates |\ | |
tail -1 |\ | |
sed 's/notAfter=\(.*\)/\1/' ) | |
EXP_EPOCH=$(gdate --date="$EXPIRATION" +%s) | |
TODAY=$(gdate +%s) | |
# Days until expiration | |
echo $(( ($EXP_EPOCH - $TODAY )/(60*60*24) )) |