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 "bundler" | |
Bundler.require | |
def client | |
@client ||= Aws::AutoScaling::Client.new(region: 'ap-southeast-1') | |
end | |
def launch_configurations | |
@launch_configurations ||= client.describe_launch_configurations.launch_configurations | |
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
# Description: | |
# Create pull request from develop to master. | |
# | |
# Dependencies: | |
# "githubot": "0.4.x" | |
# | |
# Configuration: | |
# HUBOT_GITHUB_TOKEN | |
# HUBOT_GITHUB_USER | |
# HUBOT_GITHUB_ORG |
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
# uuid | |
SecureRandom.uuid | |
# 半角英数16文字 | |
SecureRandom.hex(8) |
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
it 'notify error message' do | |
allow(ExceptionNotifier).to receive(:notify_exception) | |
# call method that raise error | |
expect(ExceptionNotifier).to have_received(:notify_exception) | |
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
expect(variable).to match /^.{36}$/ |
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 'yaml' | |
def read_hash(hash, path, f) | |
hash.keys.each do |k| | |
val = hash[k] | |
if val.class == Hash | |
read_hash(val, path + k + ".", f) | |
else | |
f.write "\"#{path}#{k}\",\"#{val}\"\n" | |
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
<source> | |
type twittersearch | |
consumer_key | |
consumer_secret | |
oauth_token | |
oauth_token_secret | |
tag input.twitter | |
keyword doorkeeper.jp | |
run_interval 300 | |
count 100 |
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
rails _3.2.13_ new nanika |
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
gem "thin" | |
gem_group :development, :test do | |
gem "rspec-rails" | |
gem "pry-rails" | |
gem "pry-debugger" | |
gem "spork" | |
gem "guard-spork" | |
gem "guard-rspec" | |
gem "factory_girl_rails" |
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
gem "twitter-bootstrap-rails" | |
gem "thin" | |
gem_group :development, :test do | |
gem "rspec-rails" | |
gem "pry-rails" | |
gem "pry-debugger | |
gem "spork" | |
gem "guard-spork" | |
gem "guard-rspec" |
NewerOlder