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
| ❯ nslookup google.com | |
| Server: 192.168.21.1 | |
| Address: 192.168.21.1#53 | |
| Non-authoritative answer: | |
| Name: google.com | |
| Address: 172.217.31.142 |
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
| $script = <<SCRIPT | |
| sudo apt-get update | |
| sudo apt-get install python-dev python-setuptools -y | |
| sudo easy_install pip | |
| sudo pip install ansible -U | |
| cd /vagrant | |
| ansible-playbook -i localhost, -c local raptor-playbook.yml | |
| SCRIPT |
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 | |
| TAGN=Role | |
| TAGV=ap | |
| ELB=elb-waiters-test | |
| SLEEP=5 | |
| # 引数すべてを一つのコマンドとして格納 | |
| CMD=$@ |
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
| # SNS のクライアントロード | |
| SNS = Aws::SNS::Client.new(region: 'ap-northeast-1') | |
| # SNS通知の受け口 | |
| post '/s3notification' do | |
| notif = JSON.parse(request.body.read) | |
| case notif['Type'] | |
| # サブスクリプション認証のリクエストを受け取ったので承認する。 | |
| when "SubscriptionConfirmation" then |
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
| $ ruby spot.rb | |
| 1409 | |
| 2014-08-14 23:11:42 UTC | |
| 2014-10-14 11:24:23 UTC |
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
| Windows版Vagrantのインストーラをダウンロード | |
| http://www.vagrantup.com/downloads.html | |
| ダウンロードしたものをインストール | |
| 利用するUbuntuのBoxを選んで置く | |
| https://cloud-images.ubuntu.com/vagrant/ | |
| コマンドプロンプトをりようしBoxの取り込み | |
| vagrant box add Ubuntu14.04 https://cloud-images.ubuntu.com/vagrant/trusty/20140716/trusty-server-cloudimg-amd64-vagrant-disk1.box |