Skip to content

Instantly share code, notes, and snippets.

Pete Shima pshima

  • Seattle, WA
Block or report user

Report or block pshima

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View runbook_template.md

Runbook for X

What is happening?

Such and such service is probably having X, that means Y.

What is the user experience when this happens?

No users will be able to do anything.

View keybase.md

Keybase proof

I hereby claim:

  • I am pshima on github.
  • I am petey5000 (https://keybase.io/petey5000) on keybase.
  • I have a public key whose fingerprint is E9BF EE96 BE8A 9572 363C AECE A0FC 7453 01B0 5C53

To claim this, I am signing this object:

View gist:2260113
haproxy_http_production:
command: /etc/sensu/plugins/haproxy/haproxy-metrics.rb -h my.hostname.com -q haproxy_stats -u username -p password -s my.hostname
handlers: ["graphite"]
interval: 60
subscribers: ["sensu_server"]
type: metric
memcached_graphite_production:
command: /etc/sensu/plugins/memcached/check-memcached-graphite.rb -h my.hostname -p 11211
handlers: ["graphite"]
@pshima
pshima / gist:2259915
Created Mar 31, 2012
Sensu Redis Metrics Run
View gist:2259915
redis = Redis.new(:host => config[:host], :port =>config[:port])
redis.info.each do |k, v|
output "#{config[:scheme]}.#{k}", v
end
@pshima
pshima / deploy_revision before_migrate
Created Jan 27, 2012 — forked from jbz/deploy_revision before_migrate
Bundler error inside deploy_revision before_migrate
View deploy_revision before_migrate
before_migrate do
if app['main']['uses_bundler']
link "#{release_path}/vendor/bundle" do
to "#{app['main']['deploy_to']}/shared/vendor_bundle"
end
common_groups = %w{development test cucumber staging production}
execute "LANG=en_US.UTF-8 LC_ALL='en_US.UTF-8' bundle install --deployment --without #{(common_groups -([app['main']['rails_env']])).join(' ')}" do
ignore_failure true
cwd release_path
environment ({'LANG' => 'en_US.UTF-8'})
@pshima
pshima / unicorn.conf
Created Dec 15, 2011
Unicorn logrotate
View unicorn.conf
/path/to/unicorn/log/unicorn.stderr.log
/path/to/production/log/production.log
{
daily
missingok
rotate 180
compress
dateext
# this is important if using "compress" since we need to call
View check_raindrops.rb
# from https://github.com/petey5king/raindrops-nagios
#!/usr/bin/env ruby
#script to check the unicorn backlog
#requires the nagios gem, raindrops and rubygems
$LOAD_PATH.unshift '../lib'
require 'rubygems'
@pshima
pshima / nrpe.cfg
Created Dec 15, 2011
nrpe raindrops
View nrpe.cfg
command[check_raindrops]=/usr/lib/nagios/plugins/check_raindrops -w 512 -c 900
@pshima
pshima / nrpe.cfg
Created Dec 15, 2011
nrpe unicorn
View nrpe.cfg
command[check_unicorn]=/usr/lib/nagios/plugins/check_procs -c 1:24 -C unicorn
View nginx.conf
location ~ ^/(images|assets|javascripts|stylesheets|fonts)/ {
try_files /$uri /oldassets/$uri =404;
expires 10y;
}
You can’t perform that action at this time.