Skip to content

Instantly share code, notes, and snippets.

View sioncojp's full-sized avatar

Shohei "Sion" Koyama sioncojp

View GitHub Profile
# サーバ
* サーバの種類を全部把握していること
* ストレージ容量、見積もり
* N+2構成になっているか
* サーバを更新する方法
* リリースプロセスの確認
# ネットワーク
* ネットワークQoS: 帯域、輻輳/制御、保証、回避
@sioncojp
sioncojp / capacity_test.go
Created March 22, 2017 07:42
channelを作成する際に、capacityをつける場合とつけない場合のbenchmark
package main
import "testing"
func BenchmarkChan1(b *testing.B) {
ch := make(chan int)
go func() {
for {
<-ch
}
#!/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.
#
#!/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
# atom keymapのbackup用
#!/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
#!/usr/bin/python
import urllib2
import sys
try:
import json
except ImportError:
import simplejson as json
MACKEREL_API_KEY=''
#!/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),
});
#!/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";
$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/