Skip to content

Instantly share code, notes, and snippets.

View CreateAWSClientUsingSTSCredential.py
import boto3
import sys
# Please fill in the following variables
ROLE_ARN = ""
ROLE_SESSION_NAME = ""
EXTERNAL_ID = ""
DEFAULT_REGION = ""
View download_s3_objects.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import boto3
import click
import os
class DownLoadS3Objects(object):
""" copy s3 object """
View file0.py
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!\n"
if __name__ == "__main__":
app.run()
View file0.txt
# cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
@rriifftt
rriifftt / file0.txt
Last active Feb 8, 2016
CentOS7 (vagrant) に docker をインストールして nginx で hello world するまで ref: http://qiita.com/satoshi_iwashita/items/859b3d0d4593e7e3cfd2
View file0.txt
$ curl -fsSL https://get.docker.com/ | sh
$ systemctl start docker.service
@rriifftt
rriifftt / file0.txt
Created Feb 6, 2016
CentOS 7 に docker をインストールして hello world するまで ref: http://qiita.com/satoshi_iwashita/items/4f77e8c85c2dd094f79f
View file0.txt
$ curl -fsSL https://get.docker.com/ | sh
$ systemctl start docker.service
@rriifftt
rriifftt / file0.txt
Created Dec 9, 2015
AWS DataPipeline の ShellCommandActivity を使って特定のタグを持つインスタンスを日次停止する ref: http://qiita.com/satoshi_iwashita/items/992f9a5166703322e478
View file0.txt
#!/bin/bash
sudo yum update aws-cli -y
AWS="/usr/bin/aws --region ap-northeast-1"
ids=$(${AWS} ec2 describe-instances --filters \\
"Name=tag:dont_stop,Values=False" \\
"Name=instance-state-code,Values=16" \\
--query 'Reservations[].Instances[].InstanceId' \\
@rriifftt
rriifftt / aws.tf
Last active Feb 15, 2016
terraform で userdata を渡して ec2 インスタンスを起動し、ホスト名をつける ref: http://qiita.com/satoshi_iwashita/items/5fd93d584faa0bbc8e76
View aws.tf
/*
aws settings
*/
provider "aws" {
access_key = "************"
secret_key = "********************"
region = "ap-northeast-1"
}
@rriifftt
rriifftt / file0.txt
Created Oct 27, 2015
powershell で X-AspNet-Version ヘッダを削除する ref: http://qiita.com/satoshi_iwashita/items/5d2a3bf91a79096955ed
View file0.txt
<system.web>
<httpRuntime enableVersionHeader="false" />
</system.web>
@rriifftt
rriifftt / file0.txt
Last active May 30, 2018
powershell で .NET Framework のバージョンを確認 ref: https://qiita.com/satoshi_iwashita/items/0032969159af2b88d6e8
View file0.txt
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.34209
BuildVersion 6.3.9600.17400
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}