Skip to content

Instantly share code, notes, and snippets.

def filter_grouped
count = 0
begin
timeout(3) do
#!/usr/bin/env ruby
#
# This handler creates and resolves PagerDuty incidents, refreshing
# stale incident details every 30 minutes
#
# Copyright 2011 Sonian, Inc <[email protected]>
#
# Released under the same terms as Sensu (the MIT license); see LICENSE
# for details.
[2012-12-05T00:55:04+00:00] FATAL: Errno::ENOENT: service[redis] (redis::_server_service line 14) had an error: Errno::ENOENT: No such file or directory - /etc/init.d/redis-server stop
%w{/var/cache/local /var/cache/local/preseeding}.each do |dirname|
directory dirname do
owner "root"
group "root"
mode 0644
action :create
end
end
@ohlol
ohlol / gist:3939378
Created October 23, 2012 15:19
Awesome steel cut oatmeal
Boil 1.5c water
Melt 1 pat butter and add .5c steel cut oats; toast for 2min
Add boiling water to oats, simmer for 25min, stirring regularly
Mix ~1tsp brown sugar
Add splash of whole milk to taste, stir
Pour into bowl and enjoy!
@ohlol
ohlol / gist:3863544
Created October 10, 2012 06:42
seamanship 1 notes
lighting requirements
- side lights
red port, green starboard
arc of visibility 112.5 deg
- stern light
white
arc of visibility 135 deg
- steaming light
==== Build errors (non-DEBUG) ====
dmake: Warning: Target `install' not remade because of errors
The following command caused the error:
dmake: Warning: Target `install' not remade because of errors
The following command caused the error:
dmake: Warning: Command failed for target `libbrand'
dmake: Warning: Target `install' not remade because of errors
The following command caused the error:
dmake: Warning: Target `install' not remade because of errors
1 | 22 | 21 | t | t
2 | 22 | 21 | t | t
3 | 22 | 21 | t | t
4 | 22 | 21 | t | t
5 | 22 | 21 | t | t
from fabric.api import *
import time
env.name = 'myapp'
env.python = 'python2.6'
env.time = int(time.time())
env.buildroot = '/tmp/%s/%d' % (env.name, env.time)
env.app = '%s/%s' % (env.buildroot, env.name)
env.deploy = '/usr/local/%s/releases' % env.name
#!/usr/bin/env ruby
require 'rubygems'
require 'sensu-handler'
require 'socket'
class Graphite < Sensu::Handler
def send_graphite(metric, msg)
host = 'graphite.host.com'