yum install http://static.tmtowtdi.se/pub/rpm/rubygem-ruby-pcap/rubygem-ruby-pcap-0.7.8-1.el6.x86_64.rpm \
http://static.tmtowtdi.se/pub/rpm/rubygem-mctop/rubygem-mctop-0.0.4-2.el6.noarch.rpm
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 | |
docker rm -f ecs-agent | |
docker pull 540111577831.dkr.ecr.eu-west-1.amazonaws.com/amazon-ecs-agent:ecs | |
docker run --name ecs-agent --detach=false --restart=on-failure:10 --volume=/var/run/docker.sock:/var/run/docker.sock --volume=/var/log/ecs:/log --volume=/var/lib/ecs/data:/data --net=host --env-file=/etc/ecs/ecs.config --env=ECS_LOGFILE=/log/ecs-agent.log --env=ECS_DATADIR=/data/ --env=ECS_ENABLE_TASK_IAM_ROLE=true --env=ECS_ENABLE_TASK_IAM_ROLE_NETWORK_HOST=true 540111577831.dkr.ecr.eu-west-1.amazonaws.com/amazon-ecs-agent:ecs |
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/env ruby | |
#^syntax detection | |
# I wanted Puppetfiles from git to be specified just as simple as the Forge sourced modules... but without creating a separate method for it such as 'gitmod' | |
# (C) 2016 Fulhack Industries | |
method(:mod).owner.class_eval do | |
alias_method :upstream_mod, :mod | |
def mod(name, **args) | |
if name.include? "/" |
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
import redis | |
r = redis.Redis() | |
base = 0 # Smallest allowed key in samples | |
jump = 50 # Key size bins | |
top = 1300 # Largest allowed key in sample | |
samples = 1000 # Numbers of samples | |
bins = [] | |
for i in xrange(1+(top-base)/jump): |
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
''' | |
@author Bommarito Consulting, LLC; http://bommaritollc.com/ | |
@date 20131029 | |
This script monitors and logs to CSV the status of all tunnels for all VPNs for a single EC2 region. | |
''' | |
# Imports | |
import boto | |
import boto.ec2 | |
import boto.vpc |
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
default full { rw *; } | |
# 2 Dell examples: | |
default ipmi-sol-dell { | |
type exec; | |
execsubst h=cs; | |
exec ipmitool -I lanplus -U root -P calvin -H h.lom.domain.net sol activate; | |
} |
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/sh | |
### BEGIN INIT INFO | |
# Provides: logstash | |
### END INIT INFO | |
# Author: your name here <change email> | |
# | |
# Do NOT "set -e" |
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/env ruby | |
submods = Hash.new | |
%x{git config -f .gitmodules --get-regexp '^submodule\..*\.(path|url)$'}.lines.each do |l| | |
submodule, key, value = l.match(/^submodule\.(.*)\.(path|url)\s+(.*)$/)[1..3] | |
submods[submodule] = Hash.new unless submods[submodule].is_a?(Hash) | |
submods[submodule][key] = value | |
end |
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
class user::root { | |
# Whitelist means we DON'T manage the passwords. | |
# For the old fashioned people who don't know what an ENC is. | |
$whitelist_fqdn_array = ['funkyserver1.domain.int'] | |
# valid password regexes | |
$valid_password_array = ['^\$1\$.{25,}', '^\$foreman\$.{15,}'] | |
if $::root_pw and !member($whitelist_fqdn_array, $::fqdn) { |
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/env ruby | |
USAGE=<<EOS | |
Delete files in specified folders that are older than a given number of days. | |
Options: | |
-v - verbose. Will list folders and files. | |
-d - dry run. Like verbose, but does not delete files. | |
-h - Show this usage help. | |
Arguments: |