Skip to content

Instantly share code, notes, and snippets.

View youyo's full-sized avatar

Naoto Ishizawa youyo

View GitHub Profile
#!/bin/bash -u
if [ $# -ne 9 ]; then
echo -e "Usage:\t${0} HOSTNAME PASSWORD VCPU MEMORY SWAP DISK IPADDRESS NETMASK GATEWAY"
exit 99
fi
HOSTNAME=${1?need hostname}
PASSWORD=${2?need password}
VCPU=${3?need vcpu}
@youyo
youyo / fio.sh
Created February 23, 2015 11:40
#!/bin/bash -u
#BS=('4k' '16k' '1m')
#TYPE=('read' 'write' 'randread' 'randwrite')
#IODEPTH=(1 2 4 8 16 32 64)
BS=('4k')
TYPE=('read' 'write' 'randread' 'randwrite')
IODEPTH=(1 2 4 8 16 32 64)
OUTPUT='/tmp/fio.json'
BASE_CMD='fio -ioengine=libaio -direct=1 -invalidate=1 -filename=/tmp/fio.bin -size=10G -numjobs=1 -runtime=60 -group_reporting -name=fio --output-format=json'
#!/usr/bin/env ruby
require 'gruff'
require 'json'
require 'yajl'
require 'pp'
giops = Gruff::Line.new
giops.title = "IOPS Result (bs=4k)"
giops.x_axis_label = 'IO depth'
#!/bin/bash -u
if [ $# -ne 9 ]; then
echo -e "Usage:\t${0} HOSTNAME PASSWORD VCPU MEMORY SWAP DISK IPADDRESS NETMASK GATEWAY"
exit 99
fi
HOSTNAME=${1?need hostname}
PASSWORD=${2?need password}
VCPU=${3?need vcpu}
#!/bin/bash -u
if [ $# -ne 11 ]; then
echo -e "Usage:\t${0} HOSTNAME PASSWORD VCPU MEMORY SWAP DISK IPADDRESS NETMASK GATEWAY OS-TYPE[centos6,centos7] NIC[1,2]"
exit 99
fi
HOSTNAME=${1?need hostname}
PASSWORD=${2?need password}
VCPU=${3?need vcpu}
@youyo
youyo / test
Created January 16, 2013 08:41
Hello World!
@youyo
youyo / store-s3.rb
Created January 22, 2013 04:06
Store S3-storage script.
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'aws/s3'
include AWS::S3
Access_key = '********'
Secret_key = '********'
DEFAULT_HOST.replace "s3-ap-northeast-1.amazonaws.com"
MyBucket = 'bucket_name'
@youyo
youyo / nginx.conf
Last active December 11, 2015 18:38
http {
# DNS resolver
resolver 127.0.0.1;
proxy_cache_path /var/cache/nginx/static_file_cache levels=1:2 keys_zone=cache_static_file:10m inactive=7d max_size=100m;
proxy_temp_path /var/cache/nginx/temp;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
<source>
type forward
port 24224
bind 0.0.0.0
</source>
<match ping.**>
type copy
<store>
@youyo
youyo / php_zabbix.conf
Created January 29, 2013 06:39
/etc/php-fpm.d/php_zabbix.conf
[zabbix]
listen = /var/run/php-fpm/zabbix.socket
;listen.backlog = -1
listen.allowed_clients = 127.0.0.1
;listen.owner = nobody
;listen.group = nobody
;listen.mode = 0666
user = nginx
group = nginx
pm = dynamic