Skip to content

Instantly share code, notes, and snippets.

This gist contains everything you need to install StatsD and Graphite on CentOS 6.3. Unless I forgot something. If I did, shoot a reminder email to noah at one more bug dot com. tl;dr: womm, ymmv, yolo.

I (mostly) followed the steps shown in the EZUnix wiki

And I also referred back to this gist by Michael Grace

#!/usr/bin/env node
/* -*- js2 -*- */
/* ************************************************************* */
// Set up classes to support Range objects. Ported from
// Nagios::Plugin::Range. See named functions below.
// TODO: Modularize properly/idiomatically.
/*
* Represents a Nagios plugin range object.
@obazoud
obazoud / export.json
Created April 28, 2014 14:55
Zabbix Json
{
hosts: [
{
checks_enabled: "1",
display_name: "xxx",
name: "xxx",
num_services: "19",
num_services_crit: "0",
num_services_ok: "19",
num_services_pending: "0",
@obazoud
obazoud / Gateway.java
Last active August 29, 2015 14:01
Reactor questions
public class Gateway {
TcpClient<String, String> client = null;
NetChannel<String, String> channel;
public Gateway(String host, int port) {
client = new TcpClientSpec<String, String>(NettyTcpClient.class)
.env(env)
.codec(StandardCodecs.STRING_CODEC)
.connect(host, port)
.get();
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
#!/bin/bash
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
SELECT table_schema,
table_name,
data_type,
( CASE data_type
WHEN 'tinyint' THEN 255
WHEN 'smallint' THEN 65535
WHEN 'mediumint' THEN 16777215
WHEN 'int' THEN 4294967295
WHEN 'bigint' THEN 18446744073709551615
end >> IF(Locate('unsigned', column_type) > 0, 0, 1) ) AS MAX_VALUE,
# -*- mode: ruby; coding: utf-8; -*-
source "https://api.berkshelf.com"
#source "https://supermarket.getchef.com"
cookbook 'chef-client', '~> 3.6.0'
@obazoud
obazoud / oneshot.rb
Last active August 29, 2015 14:04
Chef: How to remove a recipe dynamically ?
ruby_block 'remove_dynamically_oneshot' do
block { node.run_list.remove('recipe[mycookbook::oneshot]') }
end
# This recipe is unused
# Please use RVM-Plugin for Jenkins
include_recipe "jenkins"
script "Install RVM to jenkins" do
interpreter "bash"
not_if {::File.exists?("/var/lib/jenkins/.rvm")}
code <<-EOH
sudo -u jenkins bash -c '