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": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Deny", | |
"Action": [ | |
"organizations:LeaveOrganization", | |
"config:DeleteConfigRule", | |
"config:DeleteConfigurationRecorder", | |
"config:DeleteDeliveryChannel", |
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
$ for EP in $(cat sqs-endpoint.txt); do ping -c 4 $EP; echo; echo; done | |
PING sqs.ap-east-1.amazonaws.com (13.248.36.32) 56(84) bytes of data. | |
64 bytes from 13.248.36.32 (13.248.36.32): icmp_seq=1 ttl=232 time=53.1 ms | |
64 bytes from 13.248.36.32 (13.248.36.32): icmp_seq=2 ttl=232 time=52.6 ms | |
64 bytes from 13.248.36.32 (13.248.36.32): icmp_seq=3 ttl=232 time=52.6 ms | |
64 bytes from 13.248.36.32 (13.248.36.32): icmp_seq=4 ttl=232 time=52.7 ms | |
--- sqs.ap-east-1.amazonaws.com ping statistics --- | |
4 packets transmitted, 4 received, 0% packet loss, time 3003ms | |
rtt min/avg/max/mdev = 52.630/52.779/53.142/0.312 ms |
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 'pp' | |
require 'net/http' | |
require 'date' | |
require 'json' | |
endpoint = "http://<HOST>:<PORT>/" | |
expire_days = 7 |
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
<match *> | |
type copy | |
<store> | |
type forest | |
subtype elasticsearch | |
<template> | |
id es-test01.${tag} | |
include_tag_key true | |
tag_key @tag | |
host 127.0.0.1 |
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 'rubygems' | |
require 'aws-sdk' | |
require 'resolv' | |
require 'pp' | |
$target_fqdn = 'target-fqen.example.com' | |
$target_elb = 'target-elb-XXXXXX.ap-northeast-1.elb.amazonaws.com' | |
$access_key_id = 'YOUR ACCESS KEY ID' |
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
def exec_command(command, dry_run = false) | |
if dry_run | |
puts command | |
return | |
end | |
begin | |
PTY.spawn(command) do |stdin, stdout, pid| | |
begin | |
line = '' |
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
# Target Region | |
:region: ap-northeast-1 | |
# Target Accounts | |
:accounts: | |
test_account: | |
:access_key_id: ACCESS_KEY_ID | |
:secret_access_key: SECRET_ACCESS_KEY |
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 "pp" | |
require 'base64' | |
f = open("list") | |
while name = f.gets | |
name = name.chomp | |
result = `ldapsearch -x -LLL -t "(uid=#{name})"` | |
uid_number = result.scan(/uidNumber: (\d*)/).flatten[0] | |
user_password = result.scan(/userPassword:: (.*)\s/).flatten[0] |
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
target_dir = "PATH/TO/TARGETDIR" | |
output_dir = "PATH/TO/OUTPUTDIR" | |
Dir.chdir(target_dir) | |
for i in Dir.glob("*").sort.each | |
f = open(output_dir + i + ".txt", "w") | |
Dir.chdir(i) | |
for rpm in Dir.glob("*").sort.each | |
f.write(rpm + "\n") |
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 'rubygems' | |
require 'right_aws' | |
access_key_id = "your-access-key-id" | |
secret_access_key = "your-secret-access-key" | |
ENV["ACW_URL"] = "https://monitoring.ap-northeast-1.amazonaws.com:443/" | |
ENV["RDS_URL"] = "https://rds.ap-northeast-1.amazonaws.com:443/" | |
NewerOlder