Skip to content

Instantly share code, notes, and snippets.

View youyo's full-sized avatar

Naoto Ishizawa youyo

View GitHub Profile
@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.ini
Last active December 11, 2015 21:28
/etc/php.ini
date.timezone = Asia/Tokyo
post_max_size = 32M
max_execution_time = 300
max_input_time = 300
@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
@youyo
youyo / nginx.conf
Created January 29, 2013 06:47
/etc/nginx/nginx.conf
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
@youyo
youyo / nginx_zabbix.conf
Created January 29, 2013 06:49
/etc/nginx/conf.d/nginx_zabbix.conf
server {
listen 80;
server_name your.webserver;
root /var/www/nginx;
index index.html;
access_log /var/log/nginx/zabbix/access_log main;
error_log /var/log/nginx/zabbix/error_log error;
location /zabbix {
@youyo
youyo / .vimrc
Created February 12, 2013 11:45
syntax on
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,iso-2022-jp,euc-jp,ucs-2,cp932,sjis
set tabstop=2
set autoindent
set expandtab
set shiftwidth=2
set ignorecase
set showmatch
#!/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}