Skip to content

Instantly share code, notes, and snippets.

Follow these steps to install graphite on OS X Mavericks.

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Install dependencies

Install Cairo and friends

@winebarrel
winebarrel / drone-template.rb
Created March 30, 2014 13:19
Drone on AWS
Parameters do
ImageId do
Type "String"
# http://cloud-images.ubuntu.com/precise/current/
# ap-northeast-1; 64-bit; ebs
Default "ami-1f334f1e"
end
InstanceType do
Type "String"
@winebarrel
winebarrel / template.rb
Created March 10, 2014 15:55
Kumogata: Post command
Resources do
MyInstance do
Type "AWS::EC2::Instance"
Properties do
ImageId "ami-0d13700c"
InstanceType "t1.micro"
KeyName "XXX"
NetworkInterfaces [
@winebarrel
winebarrel / template.rb
Created March 9, 2014 17:29
Kumogata+Serf - template.rb
hosts = [:cthulhu, :hastur, :nyar]
Parameters do
SerfURL do
Type "String"
Default "https://dl.bintray.com/mitchellh/serf/0.4.5_linux_amd64.zip"
end
EventHandlerURL do
Type "String"
@winebarrel
winebarrel / event_handler.rb
Last active August 29, 2015 13:57
Kumogata+Serf- event_handler.rb
#!/usr/bin/env ruby
require 'fileutils'
require 'tempfile'
require 'socket'
HOSTS_PATH = '/etc/hosts'
EVENTS = %w(member-join member-leave member-failed)
EXCLUDES = %w(127.0.0.1)
def open_hosts
An h1 header
============
Paragraphs are separated by a blank line.
2nd paragraph. *Italic*, **bold**, `monospace`. Itemized lists
look like:
* this one
* that one
@winebarrel
winebarrel / gist:9013850
Last active August 29, 2015 13:56
コネクションプーリング有効
$ for i in 1st 2nd 3rd; do echo "### $i ###"; siege -c 16 -t 1m -b -q http://dagon/employee_count; echo '---'; sleep 3; done
### 1st ###
Lifting the server siege... done.
Transactions: 5436 hits
Availability: 100.00 %
Elapsed time: 59.02 secs
Data transferred: 0.08 MB
Response time: 0.17 secs
@winebarrel
winebarrel / gist:9013842
Last active August 29, 2015 13:56
コネクションプーリング無効
$ for i in 1st 2nd 3rd; do echo "### $i ###"; siege -c 16 -t 1m -b -q http://dagon/employee_count; echo '---'; sleep 3; done
### 1st ###
Lifting the server siege... done.
Transactions: 5451 hits
Availability: 100.00 %
Elapsed time: 59.31 secs
Data transferred: 0.08 MB
Response time: 0.17 secs
@winebarrel
winebarrel / cthulhu.old-master.sql
Created January 22, 2014 00:24
MHAによるオンライン切り換え時のクエリログ
140122 0:21:53 7 Connect mha@yog on
7 Query set autocommit=1
7 Query SELECT CONNECTION_ID() AS Value
8 Connect mha@yog on
8 Query set autocommit=1
8 Query SELECT CONNECTION_ID() AS Value
8 Query SET wait_timeout=86400
8 Query SELECT @@global.server_id As Value
8 Query SELECT VERSION() AS Value
8 Query SHOW GLOBAL VARIABLES LIKE 'log_bin'
<Response><Say language="ja-jp" voice="woman">私こっくりさん。今あなたの後ろにいるよ。</Say></Respon