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 'aws-sdk' | |
require 'optparse' | |
require 'logger' | |
require 'yaml' | |
begin | |
require 'aws/profile_parser' | |
rescue LoadError; end |
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 'aws-sdk' | |
require 'optparse' | |
require 'logger' | |
require 'yaml' | |
begin | |
require 'aws/profile_parser' | |
rescue LoadError; end |
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 'aws-sdk-v1' | |
require 'optparse' | |
def create_ssh_config(region, profile_name = '', ptr_records = {}) | |
AWS.memoize do | |
region.vpcs.each do |vpc| | |
# Exist bastion server in VPC? |
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 | |
# Activate Cloudtrail and create S3 Bucket in each region. | |
# Usage: ./activate.rb --profile <profile_name> | |
# or | |
# Usage: ./activate.rb -k <access_key> -s <secret_key> | |
require 'aws-sdk-v1' | |
require 'optparse' | |
begin |
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
'use strict'; | |
//requires | |
var request = require('request'); | |
require('request').debug = true | |
var aws = require('aws-sdk'); | |
var async = require('async'); | |
//consts | |
var bucket_name = 'S3_BUCKET_NAME'; |
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 "aws-sdk-core" | |
require "json" | |
ami_list = { "AWSAmazonLinuxAMI" => {} } | |
aws = Aws::EC2::Client.new(:region => 'us-east-1') | |
aws.describe_regions.regions.each do |region| | |
#next unless region.region_name == "ap-northeast-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 | |
require "aws-sdk-v1" | |
require "json" | |
ami_list = { "AWSAmazonLinuxAMI" => {} } | |
AWS.regions.each do |region| | |
#next unless region.name == "ap-northeast-1" | |
AWS.config(:region => region.name) | |
ec2 = AWS::EC2.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
#!/usr/bin/env ruby | |
require 'rexml/document' | |
require 'json' | |
file = ARGV[0] | |
class REXML::Element | |
def to_h | |
hash = {} |
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 | |
export TZ="Asia/Tokyo" | |
CHATWORK_API_KEY="YOUR_CHATWORK_API_KEY" | |
CHATWORK_URL="https://api.chatwork.com/v1" | |
CHATWORK_TOKEN_KEY="X-ChatWorkToken" | |
CHATWORK_ROOM_ID="ROOM_ID_TO_POST" | |
link="http://status.aws.amazon.com/" |
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 'mechanize' | |
require 'nokogiri' | |
host = "https://forums.aws.amazon.com" | |
url = "#{host}/rss.jspa" | |
# open-uriだと302のリダイレクトが正しく処理できないためMechanizeを使います | |
mechanize = Mechanize.new |
OlderNewer