Skip to content

Instantly share code, notes, and snippets.

View lukebakken's full-sized avatar

Luke Bakken lukebakken

View GitHub Profile
@lukebakken
lukebakken / monit.conf
Created October 18, 2012 17:55 — forked from shapeshed/monit.conf
Upstart script for monit on Ubuntu 10.04
# This is an event.d (upstart) script to keep monit running.
# To install disable the old way of doing things:
#
# /etc/init.d/monit stop && update-rc.d -f monit remove
#
# then put this script here:
#
# /etc/init/monit.conf
#
# and reload upstart configuration:
@lukebakken
lukebakken / code-samples.md
Last active January 2, 2016 10:08
Erlang Study Group - Riak Code Samples

erlang-study

Notes / examples from Programming Erlang with emphasis on Riak

Page Code Method Source
#!/usr/bin/env bash
set -o errexit
set -o nounset
tmpfile=''
function onexit
{
if [[ -f $tmpfile ]]
@lukebakken
lukebakken / riak-2-certificate-notes.md
Last active July 5, 2022 13:54
Riak 2 / PAM / Certificates

Testing Notes

At this time only the protocol buffers client supports client certificates. HTTP is not supported.

Setup

Setting up a Root CA

It is necessary to set up a Root Certificate authority to be able to create and sign certificates.

@lukebakken
lukebakken / collectd.conf
Last active November 1, 2020 19:50
Riak monitoring setup with collectd + Graphite
Hostname "ubuntu-12"
FQDNLookup true
BaseDir "/var/lib/collectd"
PIDFile "/var/run/collectd.pid"
PluginDir "/usr/local/lib/collectd"
TypesDB "/usr/local/share/collectd/types.db"
# LoadPlugin syslog
# <Plugin syslog>
# LogLevel info
@lukebakken
lukebakken / watch-xfers
Created April 29, 2014 21:38
Watch Riak Transfers
#!/usr/bin/env bash
function xfers_in_progress
{
local tmp="$(mktemp)"
riak-admin transfers > "$tmp" 2>&1
fgrep -qi 'No transfers active' "$tmp"
declare -i rv=$?
rm -f "$tmp"
if (( rv == 1 ))
@lukebakken
lukebakken / commands.md
Last active August 29, 2015 14:01
Ubuntu / FreeBSD / Misc useful commands
@lukebakken
lukebakken / logrep
Created December 3, 2014 16:57
Large Object Grep
#!/usr/bin/env perl
use strict;
use warnings;
while (<>)
{
# 2014-10-05 14:59:45.023
my @F = split;
if (/(\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}).*Reading large object/)
@lukebakken
lukebakken / .gitignore
Last active August 29, 2015 14:11
Load Riak Memory backend
dev*/
@lukebakken
lukebakken / HipchatLongIdle.user.js
Created January 9, 2015 17:02
HipChat web chat long idle for Chromium/Chrome
// ==UserScript==
// @author Luke Bakken
// @name Hipchat Long Idle
// @namespace org.bowbak.luke
// @description Makes you stay "Available" in hipchat for 8 hours of inactivity instead of 5 minutes
// @match https://*.hipchat.com/chat
// @version 1
// @grant none
// @run-at document-end
// ==/UserScript==