Skip to content

Instantly share code, notes, and snippets.

View bhenerey's full-sized avatar

Brian Henerey bhenerey

View GitHub Profile
@bhenerey
bhenerey / .tmux.conf
Created August 13, 2019 02:17 — forked from koshuang/.tmux.conf
.tmux.conf file for Ubuntu
# set -g default-command "reattach-to-user-namespace -l zsh"
# tmux display things in 256 colors
set -g default-terminal "screen-256color"
set -g status-utf8 on
set -g history-limit 20000
# automatically renumber tmux windows
set -g renumber-windows on
#
# Author:: Adam Jacob (<adam@opscode.com>)
# Author:: Seth Chisamore (<schisamo@opscode.com>)
# Copyright:: Copyright (c) 2010-2011 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@bhenerey
bhenerey / dd-info.txt
Created December 27, 2013 19:12
dd info
bhenerey@ip-10-0-0-177:~$ sudo /etc/init.d/datadog-agent info
===================
Collector (v 4.0.1)
===================
Status date: 2013-12-27 19:11:13 (1s ago)
Pid: 6861
Platform: Linux-3.2.0-56-virtual-x86_64-with-Ubuntu-12.04-precise
Python Version: 2.7.3
Logs: <stderr>, /var/log/datadog/collector.log, syslog:/dev/log
@bhenerey
bhenerey / check_config
Last active December 16, 2015 00:39
mongodb-metrics.rb check result
{
"checks": {
"mongodb_metrics": {
"handlers": ["graphite-tcp"],
"type": "metric",
"command": "/etc/sensu/plugins/mongodb-metrics.rb --scheme stats.:::name::: ",
"interval": 15,
"subscribers": [ "empire-staging" ]
}
}
@bhenerey
bhenerey / vacuumetrix.json
Last active December 15, 2015 20:49
Sensu config for running vacuumetrix checks.
{
"checks": {
"AWScountEC2": {
"handlers": ["preprod-checks"],
"type": "pipe",
"command": "/etc/sensu/vacuumetrix/bin/AWScountEC2.rb",
"interval": 60,
"subscribers": [ "my_sensu" ]
},
"AWScloudwatchElasticache": {
@bhenerey
bhenerey / deploy.rb
Created January 24, 2013 03:34 — forked from olegykz/deploy.rb
namespace :deploy do
namespace :assets do
task :precompile, :roles => :web, :except => { :no_release => true } do
begin
from = source.next_revision(current_revision) # <-- Fail here at first-time deploy because of current/REVISION absence
rescue
err_no = true
end
if err_no || capture("cd #{latest_release} && #{source.local.log(from)} vendor/assets/ app/assets/ | wc -l").to_i > 0
run %Q{cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile}
[2012-07-25T22:28:22+00:00] INFO: Processing apt_package[libcurl4-gnutls-dev] action install (hw-chef-graphiti::default line 22)
[2012-07-25T22:28:30+00:00] INFO: apt_package[libcurl4-gnutls-dev] installed version 7.22.0-3ubuntu4
[2012-07-25T22:28:30+00:00] INFO: Processing apt_package[ruby1.9.1-full] action install (hw-chef-graphiti::default line 22)
[2012-07-25T22:29:03+00:00] INFO: apt_package[ruby1.9.1-full] installed version 1.9.3.0-1ubuntu2
[2012-07-25T22:29:03+00:00] INFO: Processing gem_package[bundler] action install (hw-chef-graphiti::default line 25)
[2012-07-25T22:29:15+00:00] INFO: gem_package[bundler] installed version 1.1.5
[2012-07-25T22:29:15+00:00] INFO: Processing remote_file[/usr/src/graphiti.tgz] action create_if_missing (hw-chef-graphiti::default line 27)
[2012-07-25T22:29:25+00:00] INFO: remote_file[/usr/src/graphiti.tgz] updated
[2012-07-25T22:29:25+00:00] INFO: remote_file[/usr/src/graphiti.tgz] owner changed to 33
[2012-07-25T22:29:25+00:00] INFO: remote_file[/usr/src/graphiti.tgz] g
@bhenerey
bhenerey / ideal ops.md
Created May 23, 2012 19:40
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@bhenerey
bhenerey / forAndy
Created May 14, 2012 07:48
netstat -nr
bhenerey@31541:/etc: netstat -nr
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 10.192.57.156 UGSc 0 0 tun0
default tun0 UCSI 38 0 tun0
2.16.157.231 tun0 UHW3I 0 30 tun0
2.18.114.110 tun0 UHW3I 0 22 tun0
2.18.125.177 tun0 UHW3I 0 52 tun0

How would you like to replace me as The Guardian's Digital Operations Manager?

This is an exciting role where you'll be challenged in many different ways. Here is the mission should you choose to accept it:

  • Do whatever it takes to keep serving >400,000,000 pages a month
  • Perform capacity planning - our traffic grew over 20% over last year
  • Manage incidents - we're optimising on MTTR not MTBF
  • Help lead us down the road of Continuous Delivery - We're not quite Etsy, but we did 37 releases last month and are getting faster

If you want to know more, please view the job spec (coming soon on Guardian Jobs) and contact me at brian.henerey@guardian.co.uk