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
| 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 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
| // 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 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
| 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 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
| { | |
| "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 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
| { | |
| "client": { | |
| "name": "web01", | |
| "address": "192.168.1.101", | |
| "subscriptions": [ | |
| "common", | |
| "web" | |
| ] | |
| }, | |
| "keepalive": { |
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
| [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 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
| backend default { | |
| .host = "127.0.0.1"; | |
| .port = "8000"; | |
| } | |
| sub vcl_recv { | |
| if (req.request == "POST") { | |
| ban("req.url ~ /"); | |
| return(pass); |
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
| require 'mysql2-cs-bind' | |
| def get_db | |
| return Mysql2::Client.new( | |
| :host => 'localhost', | |
| :port => 3306, | |
| :username => 'root', | |
| :password => '', | |
| :database => 'queue_test', | |
| :reconnect => true, |
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/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 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "NotAction": "iam:*", | |
| "Resource": "*" | |
| }, | |
| { | |
| "Effect": "Allow", |