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
#!/bin/sh | |
set -e | |
trap 'echo "NG: $?"' ERR | |
pip-python install awscli --upgrade 2>&1 | logger -s -t ${0##*/} | |
exit 0 | |
deploy | |
# cd /var/lib/cloud/scripts/per-once | |
# ln -s /opt/suz-lab/bin/update-awscli update-awscli |
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
//AWS SDK for Ruby | |
# /usr/lib64/fluent/ruby/bin/gem install aws-sdk | |
//JsonPath | |
# /usr/lib64/fluent/ruby/bin/gem install jsonpath | |
//fluent-plugin-cloudwatch_ya | |
# /usr/lib64/fluent/ruby/bin/gem install fluent-plugin-cloudwatch_ya | |
//how to use |
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
//install (Redis1(10.0.0.10), Redis2(10.0.0.20)) | |
# cd /usr/local/src | |
# curl -OL http://redis.googlecode.com/files/redis-2.6.4.tar.gz | |
# tar xzf redis-2.6.4.tar.gz | |
# cd redis-2.6.4 | |
# make | |
# make install | |
# mkdir /etc/redis /var/lib/redis | |
# cd /usr/local/src/redis-2.6.4/ | |
# cp redis.conf /etc/redis/ |
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
// install redis (Redis1(10.0.0.10), Redis2(10.0.0.20)) | |
# cd /usr/local/src | |
# curl -OL http://redis.googlecode.com/files/redis-2.6.4.tar.gz | |
# tar xzf redis-2.6.4.tar.gz | |
# cd redis-2.6.4 | |
# make | |
# make install | |
# mkdir /etc/redis /var/lib/redis | |
# cd /usr/local/src/redis-2.6.4/ | |
# cp redis.conf /etc/redis/ |
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
// install fluentd (td-agent) | |
# vi /etc/yum.repos.d/td.repo | |
--- | |
[treasuredata] | |
name=TreasureData | |
baseurl=http://packages.treasure-data.com/redhat/$basearch | |
gpgcheck=0 | |
--- |
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
import java.util.List; | |
import com.amazonaws.auth.AWSCredentials; | |
import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider; | |
import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoder; | |
import com.amazonaws.services.elastictranscoder.AmazonElasticTranscoderClient; | |
import com.amazonaws.services.elastictranscoder.model.CreatePipelineRequest; | |
import com.amazonaws.services.elastictranscoder.model.CreatePipelineResult; | |
import com.amazonaws.services.elastictranscoder.model.Job; | |
import com.amazonaws.services.elastictranscoder.model.JobInput; |
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
###### "top level" this ###### | |
var hoge = "fuga"; | |
window.foo = "bar"; | |
// fuga+bar と表示される | |
console.log(this.hoge + "+" + this.foo); | |
(function(){ | |
// 同じくfuga+bar と表示される | |
console.log(this.hoge + "+" + this.foo); |
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
// install net-ping | |
gem install net-ping | |
// script | |
#!/usr/local/bin/ruby | |
require 'rubygems' | |
require 'net/ping' | |
def portscan(ip = IPAddr.new('127.0.0.1'), ports = 1..65536) |
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
#Describe | |
rds-describe-db-log-files --db-instance-identifier instanceid | |
#Download | |
rds-download-db-logfile --db-instance-identifier okochangdb --log-file-name error/mysql-error-running.log | |
#Watch | |
rds-watch-db-logfile --db-instance-identifier okochangdb --log-file-name error/mysql-error-running.log |
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
>> elbfailover-prod | |
$ sudo yum -y install httpd | |
$ echo "<html><head><title>OK</title><body><p>hello</p></body>" | sudo tee /var/www/html/index.html | |
$ sudo chkconfig httpd on | |
$ sudo service httpd start | |
>> ELB start & setup | |
hogehoge |
OlderNewer