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 | |
# chkconfig: 2345 90 90 | |
# description: process-sqs | |
### BEGIN INIT INFO | |
# Provides: myapplication | |
# Required-Start: network | |
# Required-Stop: network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: Start the program |
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 | |
Dir.entries("/var/log/tomcat6").each do |filename| | |
if filename != "." && filename != ".." | |
filename = "/var/log/tomcat6/#{filename}" | |
File.truncate(filename,0) | |
end | |
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
#!/usr/bin/env ruby | |
require 'aws-sdk' | |
require 'yaml' | |
# Check args | |
if ARGV[0].nil? || ARGV[1].nil? | |
puts "Usage: securey-s3-bucket.rb bucket_name path-to-config-file.yml dryrun(optional)" | |
puts " Where the config file is a YAML formatted file with the following data:" | |
puts " access_key_id: xxx" | |
puts " secret_access_key: yyy" |
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
{ | |
"Version": "2008-10-17", | |
"Id": "Policy1357935677554", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1357935647218", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::123123123123:root" | |
}, |
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 -x | |
yum install nfs-utils rpcbind -y | |
service rpcbind start | |
service nfslock start | |
chkconfig rpcbind on | |
chkconfig nfslock on |
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
require 'json' | |
JSON.pretty_generate(string) |
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 | |
# Simple yazproxy init script | |
# chkconfig: 345 20 80 | |
# description: yazproxy | |
# processname: yazproxy | |
# Variables | |
PORT=9001 | |
LOGDEST=/var/log/yazproxy.log |
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
IyEgL2Jpbi9zaAoKIyBwYXJ0eCAtIHRlbXBvcmFyeSB3cmFwcGVyIHNjcmlwdCBmb3IgLmxpYnMvcGFydHgKIyBHZW5lcmF0ZWQgYnkgbGlidG9vbCAoR05VIGxpYnRvb2wpIDIuNC4yCiMKIyBUaGUgcGFydHggcHJvZ3JhbSBjYW5ub3QgYmUgZGlyZWN0bHkgZXhlY3V0ZWQgdW50aWwgYWxsIHRoZSBsaWJ0b29sCiMgbGlicmFyaWVzIHRoYXQgaXQgZGVwZW5kcyBvbiBhcmUgaW5zdGFsbGVkLgojCiMgVGhpcyB3cmFwcGVyIHNjcmlwdCBzaG91bGQgbmV2ZXIgYmUgbW92ZWQgb3V0IG9mIHRoZSBidWlsZCBkaXJlY3RvcnkuCiMgSWYgaXQgaXMsIGl0IHdpbGwgbm90IG9wZXJhdGUgY29ycmVjdGx5LgoKIyBTZWQgc3Vic3RpdHV0aW9uIHRoYXQgaGVscHMgdXMgZG8gcm9idXN0IHF1b3RpbmcuICBJdCBiYWNrc2xhc2hpZmllcwojIG1ldGFjaGFyYWN0ZXJzIHRoYXQgYXJlIHN0aWxsIGFjdGl2ZSB3aXRoaW4gZG91YmxlLXF1b3RlZCBzdHJpbmdzLgpzZWRfcXVvdGVfc3Vic3Q9J3MvXChbYCIkXFxdXCkvXFxcMS9nJwoKIyBCZSBCb3VybmUgY29tcGF0aWJsZQppZiB0ZXN0IC1uICIke1pTSF9WRVJTSU9OK3NldH0iICYmIChlbXVsYXRlIHNoKSA+L2Rldi9udWxsIDI+JjE7IHRoZW4KICBlbXVsYXRlIHNoCiAgTlVMTENNRD06CiAgIyBac2ggMy54IGFuZCA0LnggcGVyZm9ybXMgd29yZCBzcGxpdHRpbmcgb24gJHsxKyIkQCJ9LCB3aGljaAogICMgaXMgY29udHJhcnkgdG8gb3VyIHVzYWdlLiAgRGlzYWJsZSB0aGlzIGZlYXR1cmUuCiAgYWxpYXMgLWcg |
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 | |
# Install prerequisites | |
yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel ruby-devel gcc-c++ jq git | |
# Import key | |
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - | |
# Install RVM | |
curl -sSL https://get.rvm.io | bash -s stable --ruby |
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 | |
TMPFILE="/tmp/asgs.temp" | |
function usage() | |
{ | |
echo "Usage: $0 -a {suspend|resume} -f name-filter -p profile-name" | |
echo "Where: " | |
echo " -a - Action - suspend or resume autoscaling." | |
echo " -f - Name filter - filter for autoscaling groups. Allows you to select autoscaling groups matching a specific string." |
OlderNewer