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
# サーバ | |
* サーバの種類を全部把握していること | |
* ストレージ容量、見積もり | |
* N+2構成になっているか | |
* サーバを更新する方法 | |
* リリースプロセスの確認 | |
# ネットワーク | |
* ネットワークQoS: 帯域、輻輳/制御、保証、回避 |
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 "testing" | |
func BenchmarkChan1(b *testing.B) { | |
ch := make(chan int) | |
go func() { | |
for { | |
<-ch | |
} |
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/bash | |
# | |
# consul-template Startup script for consul-template | |
# | |
# chkconfig: - 95 16 | |
# processname: consul | |
# config: /etc/conusl-template | |
# pidfile: /var/run/consul-template.pid | |
# description: consul-template queries a Consul instance and updates any number of specified templates on the filesystem. | |
# |
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/bash | |
# | |
# consul Startup script for consul | |
# | |
# chkconfig: - 94 16 | |
# processname: consul | |
# config: /etc/conusl.d | |
# config: /etc/sysconfig/consul | |
# pidfile: /var/run/consul.pid | |
# description: consul makes service discovery and configuration made easy |
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
# atom keymapのbackup用 |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import locale | |
import time | |
import curses | |
import sys, string | |
import random | |
import struct |
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
#!/usr/bin/python | |
import urllib2 | |
import sys | |
try: | |
import json | |
except ImportError: | |
import simplejson as json | |
MACKEREL_API_KEY='' |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Cache::Memcached::Fast; | |
use String::Random; | |
my $memd = Cache::Memcached::Fast->new({ | |
servers => [{address => 'localhost:11211'}], | |
utf8 => ($^V ge v5.8.1 ? 1 : 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Cache::Memcached::Fast; | |
my (@even, @odd, $str, $ii, $i, @data, $key, $value, $exptime, $file, $memd); | |
### ファイル名を指定してください | |
$file = "/tmp/11211.dump"; |
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
$sudo brew install rbenv | |
$sudo brew install ruby-build | |
※makeコマンドがない場合 | |
xcode->preference->downloadでcuiをインストール | |
linux版 | |
$sudo yum install git | |
$git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
$git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
$cd .rbenv/plugins/ruby-build/ |
NewerOlder