Skip to content

Instantly share code, notes, and snippets.

View jnewland's full-sized avatar

Jesse Newland jnewland

View GitHub Profile
@jnewland
jnewland / Capfile
Created August 22, 2010 20:39
execute capistrano commands serially
server 'localhost', :test
server '127.0.0.1', :test2
task :test_serially do
serially do
run 'date && sleep 5'
end
end
def serially(&block)
{% line_chart value:calls_per_minute regexp:'Database/Redis/[b-z].*' title:'CPM' %}
{% line_chart value:average_value regexp:'Database/Redis/[b-z].*' title:'Average Time' %}
{% line_chart value:max_value regexp:'Database/Redis/[b-z].*' title:'Max Time' %}
{% line_chart value:calls_per_minute regexp:'Database/Redis/allWeb' title:'Redis Web CPM' %}
{% line_chart value:calls_per_minute regexp:'Database/Redis/allOther' title:'Redis Background CPM' %}
@jnewland
jnewland / Gemfile
Created June 6, 2011 22:49
get the latest installed version of a gem without deprecation warnings
source :rubygems
gem 'rspec'
gem 'aruba', :require => 'aruba/api'
gem 'test-construct', :require => 'construct'
#!/bin/bash
prog="remote_syslog"
config="/etc/log_files.yml"
pid_dir="/var/run"
EXTRAOPTIONS=""
pid_file="$pid_dir/$prog.pid"

The Ack Bar

Brainstorming an ideal landing page for indicating the status of working an Ops/Nagios/PagerDuty alert.

First, indicate your initial thoughts on the alert

I know, bro

# CheckGraphite
# A simple framework for writing nagios checks based on Graphite data.
# Usage
# -----
#
# $ cat /tmp/page-queue.coffee
# CheckGraphite = require('check-graphite')
#
testing1234567
#!/bin/bash
#/ Usage: bench.sh <setup> <command> <teardown> <repeats>
set -e
[ $# -lt 4 ] && {
tail -n +2 "$0" |
grep "^#/" |
cut -c4-
exit 2
}
@jnewland
jnewland / repl.py
Last active January 2, 2016 05:26
python-openzwave repl
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of **python-openzwave** project https://github.com/OpenZWave/python-openzwave.
:platform: Unix, Windows, MacOS X
:sinopsis: openzwave wrapper
.. moduleauthor:: bibi21000 aka Sébastien GALLET <[email protected]>