Skip to content

Instantly share code, notes, and snippets.

View inokappa's full-sized avatar
😴
zzzzz

Yohei Kawahara inokappa

😴
zzzzz
View GitHub Profile
@kenjiskywalker
kenjiskywalker / aws-cost.md
Created November 7, 2013 05:15
AWS費用試算例

AWS費用試算例

構成

  Region : Tokyo
     EC2 : c1.xlarge x4
         : 5TB/monthのデータ送信 (4台の合算値)
         : 20GBのEBSをアタッチ
     ELB : 5TB/monthのデータ送信
 RDS : m2.2xlarge (Multi-AZ)
@alekstorm
alekstorm / README.md
Last active April 23, 2020 19:00
Ansible callback plugin that posts events to your Datadog event stream as you deploy

Installation

To install, place datadog.py in your callback plugins directory. If you don't yet have one, run:

mkdir -p plugins/callback

Then place the following in your ansible.cfg file:

[defaults]

callback_plugins = ./plugins/callback

@sawanoboly
sawanoboly / zonefie_to_route53.rb
Last active December 20, 2015 12:39
Create Route53 records from bind zonefile.
require 'zonefile'
require 'route53'
my_access_key = 'REPLACE_TO_YOUR_KEY'
my_secret_key = 'REPLACE_TO_YOUR_SECRET'
domain = 'example.com.'
zone_id = '/hostedzone/ZONEID'
default_ttl = '600'
FC001: [廃止] nodeの属性にアクセスする際はシンボルではなく文字列を使う
FC002: 不必要な文字列展開を避ける
FC003: Chef Server固有の機能を使う前にChef Serverで稼働しているかを調べる
FC004: サービスの開始と終了にはserviceリソースを使う
FC005: リソース宣言の反復を避ける
FC006: ファイル権限のモードはクオートするか完全な記述する
FC007: レシピの依存関係をクックブックのメタデータで明確にする
FC008: 生成されたクックブックのメタデータを更新する
FC009: リソースの属性が未定義
FC010: 検索の分布が不正
@studio3104
studio3104 / ProvisioningFrameworksCasualTalks01.md
Last active December 16, 2015 10:08
Provisioning Frameworks Casual Talks vol.1

Provisioning Frameworks Casual Talks vol.1

ChefとかPuppetとかの勉強会です
次回があるかはわかりませんが、今回はChef成分多めになっております

インターネット情報

Twitterハッシュタグ #pfcasual
IRCチャンネル #chef-casual@freenode

概要

Fluentdは JSONストリームとしてログを扱うログ収集デーモンです。
これまでのところ、最大のユーザーではピーク時で
100台以上のサーバ、650GB daily 、70,000msgs/sec のログを収集しています。

目的

@deverton
deverton / logstash-template.json
Created June 22, 2012 04:49
Logstash Elasticsearch Template
{
"template": "logstash-*",
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0,
"index" : {
"query" : { "default_field" : "@message" },
"store" : { "compress" : { "stored" : true, "tv": true } }
}
},
@cynici
cynici / gist:2249169
Created March 30, 2012 08:00
Directory watcher as a Windows service using ActivePython
# Adapted from http://pypi.python.org/pypi/watchdog
import sys, os, re
import time
import logging
from optparse import OptionParser
import subprocess
from watchdog.observers import Observer
import watchdog.events
import pythoncom
@majek
majek / haproxy-1.5-patch
Created March 7, 2012 00:04
HAProxy port number in x-forwarded-for patch edit
--- src/proto_http-orig.c 2011-09-10 22:43:11.000000000 +0100
+++ src/proto_http.c 2012-03-07 00:06:10.000000000 +0000
@@ -3560,8 +3560,10 @@ int http_process_request(struct session
(((struct sockaddr_in *)&s->req->prod->addr.c.from)->sin_addr.s_addr & s->be->except_mask.s_addr)
!= s->be->except_net.s_addr)) {
int len;
+ unsigned int port;
unsigned char *pn;
pn = (unsigned char *)&((struct sockaddr_in *)&s->req->prod->addr.c.from)->sin_addr;
+ port = ntohs(((struct sockaddr_in *)&s->req->prod->addr.c.from)->sin_port);
@yuya-takeyama
yuya-takeyama / Makefile
Created January 6, 2012 13:37
Makefile からタスクの一覧とその説明 (コメント) を表示する
tasks:
@echo Makefile for FooBar
@echo
@echo Usage: make [task]
@echo
@echo Tasks:
@ruby -ne 'puts " #{$$1.ljust(24)} => #{$$2}" if $$_ =~ /^([a-z\-]*):(?:.*)#\s*(.*)$$/' < Makefile
foo-task: # タスクの説明
echo FOO TASK