Follow these steps to install graphite on OS X Mavericks.
- Homebrew
- Python 2.7
- Git
select | |
pg_user.usename, | |
t1.nspname, | |
t1.relname, | |
relacl.privilege_type, | |
relacl.is_grantable | |
from ( | |
select | |
pg_namespace.nspname, | |
pg_class.relname, |
#!/usr/bin/env ruby | |
require 'json' | |
require 'jq/extend' | |
#require 'pp' | |
trap(:PIPE, :EXIT) | |
# wget https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json -O AmazonEC2.json | |
json = File.read('AmazonEC2.json') | |
jq = JQ(json) |
#!/usr/bin/env ruby | |
require 'benchmark' | |
require 'postfix_status_line' | |
it = 5 | |
n = 500000 | |
status_lines = "Feb 27 09:02:37 MyHOSTNAME postfix/smtp[26490]: D53A72713E5: to=<[email protected]>, relay=gateway-f1.isp.att.net[204.127.217.16]:25, delay=0.57, delays=0.11/0.03/0.23/0.19, dsn=2.0.0, status=sent (250 ok ; id=20120227140036M0700qer4ne)" | |
r = /^(?<time>[^ ]* [^ ]* [^ ]*) (?<host>[^ ]+) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?[^\:]*\: (?<key>[^:]+): ?((to|from)=(<(?<address>[^>]+)>)?)?,( ?(orig_to=<(?<orig_to>[^>]+)>),)? ?(relay=(?<relay>[^ ]+)), ?(delay=(?<delay>[^ ]+)), ?(delays=(?<delays>[^ ]+)), ?(dsn=(?<dsn>[^ ]+)), ?(status=(?<status>[^,]+))/ |
#!/usr/bin/env ruby | |
require 'securerandom' | |
require 'tmpdir' | |
S3_BACKET = 'my-bucket' | |
S3_PATH = 'path' | |
ENDPOINT = 'my-bucket.s3-website-ap-northeast-1.amazonaws.com' | |
Dir.mktmpdir do |dir| | |
now = Time.now.utc |
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" |
Resources do | |
MyInstance do | |
Type "AWS::EC2::Instance" | |
Properties do | |
ImageId "ami-0d13700c" | |
InstanceType "t1.micro" | |
KeyName "XXX" | |
NetworkInterfaces [ |
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" |
#!/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 |