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
#!/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
#!/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 |
NewerOlder