Skip to content

Instantly share code, notes, and snippets.

@mominosin
mominosin / gist:c15fc5258c890dcccde4cda3c0910fbf
Created February 13, 2019 10:04
Google.com名前引き
❯ 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
@mominosin
mominosin / file0.txt
Created November 29, 2014 17:25
Ansibleを使ってNginx+Raptor(Phusion Passenger 5)をインストール ref: http://qiita.com/momin/items/954307e20c5ddd08aa38
$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
@mominosin
mominosin / command.sh
Created November 24, 2014 11:43
AWS CLI をつかってELBから抜いたインスタンスにコマンド実行して再追加する ref: http://qiita.com/momin/items/6cc28f523a4da735216c
#! /bin/bash
TAGN=Role
TAGV=ap
ELB=elb-waiters-test
SLEEP=5
# 引数すべてを一つのコマンドとして格納
CMD=$@
@mominosin
mominosin / file0.txt
Last active August 29, 2015 14:09
Amazon S3 Event Notifications + sinatra を利用してS3に追加されるファイルのログを取得 ref: http://qiita.com/momin/items/aafab453d95fd6b80dfa
# 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
@mominosin
mominosin / file1.txt
Last active August 29, 2015 14:07
AWS-SDK for Ruby V2 をつかって Spot Instance の価格履歴を取れるだけ取ってみる ref: http://qiita.com/momin/items/ed11e3b9ba395a6e5322
$ ruby spot.rb
1409
2014-08-14 23:11:42 UTC
2014-10-14 11:24:23 UTC
@mominosin
mominosin / gist:dc1ae2b9edc3b9f1bda5
Last active August 29, 2015 14:04
Vagant Setup for Windows
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