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
package main | |
import ( | |
"log" | |
"net/http" | |
//"io/ioutil" | |
) | |
func get(url string, c chan bool){ | |
resp, err := http.Get(url) |
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
from sqlalchemy import create_engine, Column, ForeignKey | |
from sqlalchemy.dialects.mysql import ( | |
INTEGER, | |
VARCHAR, | |
TINYINT, | |
) | |
from sqlalchemy.orm import sessionmaker, relation | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() |
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
// NTTコムのcloudnのオブジェクトストレージをscalaから使うサンプル | |
// S3互換があるので、AWSのjava-sdkが使えた。 | |
// | |
// 参考... | |
// SDK API: http://docs.aws.amazon.com/AWSAndroidSDK/latest/javadoc/index.html | |
// Developers IO: http://dev.classmethod.jp/cloud/aws-s3/ | |
import com.amazonaws._ | |
import com.amazonaws.auth._ | |
import com.amazonaws.services.s3.AmazonS3 |
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
rm -rf /data/storage-* | |
mkdir -p /data/bench/logs | |
cd /data/bench | |
cat <<'EOF' > ./dd.sh | |
#!/bin/sh | |
for i in {1..300}; do | |
echo ID: $$ PASS: $i | |
date |
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
{ | |
"checks": { | |
"snmpd_proc": { | |
"handlers":["mailer"], | |
"command": "/etc/sensu/plugins/check-procs.rb -p snmpd -C 0 -W 1 ", | |
"subscribers": [ | |
"common" | |
], | |
"interval": 180, | |
"occurrences": 2, |
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
{ | |
"client": { | |
"name": "web01", | |
"address": "192.168.1.101", | |
"subscriptions": [ | |
"common", | |
"web" | |
] | |
}, | |
"keepalive": { |
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
[root@xxxxx gems]# /etc/init.d/td-agent start | |
Starting td-agent: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/config/parser.rb:57:in `process_include': uninitialized constant Fluent::Config::Parser::URI (NameError) | |
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/config/parser.rb:41:in `parse!' | |
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/config/parser.rb:8:in `parse' | |
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/config.rb:33:in `parse' | |
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/supervisor.rb:364:in `apply_system_config' | |
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/supervisor.rb:110:in `initialize' | |
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.51/lib/fluent/command/fluentd.rb:160:in `new' | |
from /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/ |
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
backend default { | |
.host = "127.0.0.1"; | |
.port = "8000"; | |
} | |
sub vcl_recv { | |
if (req.request == "POST") { | |
ban("req.url ~ /"); | |
return(pass); |
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 | |
touch production staging | |
mkdir group_vars | |
touch group_vars/group1 | |
touch group_vars/group2 | |
mkdir host_vars | |
touch host_vars/hostname1 | |
touch host_vars/hostname2 | |
mkdir library |
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
mkdir /perl | |
export PERLBREW_ROOT=/perl | |
curl -L --insecure http://xrl.us/perlbrewinstall | bash | |
echo 'export PERLBREW_ROOT=/perl' >> ~/.zshrc | |
echo '[ -f /perl/etc/bashrc ] && source /perl/etc/bashrc' >> ~/.zshrc | |
source ~/.zshrc | |
perlbrew available | |
perlbrew install perl-5.16.2 | |
perlbrew switch perl-5.16.2 | |
perlbrew install-cpanm |
OlderNewer