Skip to content

Instantly share code, notes, and snippets.

@tjinjin
tjinjin / memo.md
Last active March 26, 2019 03:24
参考になる資料置き場
@tjinjin
tjinjin / AWS.sh
Last active May 16, 2018 01:36
AWSのよく使うコマンド
## EC2のインスタンス一覧が欲しい
export AWS_PROFILE=hoge
export AWS_REGION=ap-northeast-1
aws --output table ec2 describe-instances --region $AWS_REGION --profile $AWS_PROFILE \
--query 'Reservations[].Instances[].[PrivateIpAddress,Tags[?Key==`Name`].Value|[0],InstanceId]'
@tjinjin
tjinjin / main.tf
Last active March 7, 2018 15:00
module
module "test" {
# この"count"はmoduleに渡されるcountになる?
# workspaceで実行を切り替えたい
count = "${terraform.workspace ? 1 : 0}"
source = "module/test"
}
@tjinjin
tjinjin / closed_range.rb
Created August 2, 2017 01:07
Tdd work shop
class ClosedRange
attr_reader :lower_endpoint, :upper_endpoint
def initialize(lower_endpoint, upper_endpoint)
raise IllegalRangeError if lower_endpoint > upper_endpoint
@lower_endpoint = lower_endpoint
@upper_endpoint = upper_endpoint
end
@tjinjin
tjinjin / test.rb
Last active June 22, 2016 16:15
test2
[1,2,3].each do |n|
puts n
end