$ ruby get_value_from_cloudwatch.rb --help
Usage: get_value_from_cloudwatch [options]
--endpoint=VAL default:us-east-1, us-east-1/us-west-2/us-west-1/eu-west-1/ap-southeast-1/ap-southeast-2/ap-northeast-1/sa-east-1
--namespace=VAL
--metric-name=VAL
--no-exist-dimensions
--dimension=VAL format:: or ~
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 'irc-socket' | |
irc = IRCSocket.new('example.com') | |
irc.connect | |
if irc.connected? | |
irc.nick "hulk" | |
irc.user "hulk", 0, "*", "I am hulk hogan" | |
while line = irc.read |
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
source "https://rubygems.org" | |
gem "aws-sdk" |
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 'aws-sdk' | |
require 'ostruct' | |
require 'optparse' | |
options = OpenStruct.new | |
options.action_options = OpenStruct.new | |
subparsers = Hash.new do |h, k| | |
$stderr.puts "no such subcommand: #{k}" |
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
source 'https://rubygems.org' | |
gem 'aws-sdk' |
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
# A sample Gemfile | |
source "https://rubygems.org" | |
gem 'rubix' | |
gem 'zabbixapi' | |
gem 'zabby' | |
gem 'zbxapi' |
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 'openssl' | |
require 'base64' | |
# openssl genrsa -out ./id_rsa で作成 | |
private_key = nil | |
File.open("id_rsa") do |f| | |
private_key = OpenSSL::PKey::RSA.new(f) | |
end | |
# openssl rsa -in id_rsa -pubout -out id_rsa_pub で作成 |
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
javascript:(function(){t%20=%20prompt("JIRA%E8%AA%B2%E9%A1%8C%20number","");if(t!==""&&t!==null){location.href%20=%20"http://example.com/jira/browse/"%20+%20t.replace(/^#/,"")}else%20if(t==""){location.href%20=%20"http://example.com/jira/"}})(); |
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
# A sample Gemfile | |
source "http://rubygems.org" | |
# gem "rails" | |
gem "activesupport" | |
gem "tzinfo" |