Skip to content

Instantly share code, notes, and snippets.

@arachnafobic
arachnafobic / flapjack.rb
Created April 13, 2016 11:48
flapjack.rb quickfix for sensu 0.23
# Sends events to Flapjack for notification routing. See http://flapjack.io/
#
# This extension requires Flapjack >= 0.8.7 and Sensu >= 0.13.1
#
# In order for Flapjack to keep its entities up to date, it is necssary to set
# metric to "true" for each check that is using the flapjack handler extension.
#
# Here is an example of what the Sensu configuration for flapjack should
# look like, assuming your Flapjack's redis service is running on the
# same machine as the Sensu server:
deb http://apt.postgresql.org/pub/repos/apt precise-pgdg main
@arachnafobic
arachnafobic / gist:9530958
Created March 13, 2014 15:47
how to get guestproperties from every vm on a host
vboxmanage list vms | sed -r 's/^"(.*)" \{(.*)\}$/\1 \2/' | xargs -n 2 sh -c 'echo -n "$1 ($2): "; vboxmanage guestproperty get $2 /VirtualBox/GuestAdd/Version' sh
#!/bin/bash
umask 0022
export RAILS_ENV=production
cmds=(
'bundle install --without development:test'
'bundle exec rake db:migrate'
'bundle exec rake assets:precompile'
)
- Setting up calendarserver on Ubuntu 12.04 LTS
This describes how to setup a calendarserver with openldap
authentication.
The setup is specific to my needs, your millage may vary.
Afterwards the setup should be as followed :
- A running LDAP server, able to authenticate calendar users
and maintain groups. Communicating with it's clients on TLS
- A running calendar server, serving contents on SSL
- Setting up gerrit server on Ubuntu 12.04 LTS
This describes how to setup a gerrit server.
== Install the required packages ==
== w/ sudo ==
- if you are in a VM without swap, add some :
# Build script for jenkins
set -xe
export GEM_HOME=/var/lib/jenkins/.gem/ruby/1.9.1
export PATH=$GEM_HOME/bin:$PATH
export RAILS_ENV=test
# Clean up previous gembuilds
rm -Rf /var/lib/jenkins/.gem/ruby/1.9.1/gems
rm -Rf /var/lib/jenkins/.gem/ruby/1.9.1/bin
@arachnafobic
arachnafobic / Vagrantfile
Created January 17, 2014 15:37
Vagrantfile for multiple VMs that have both access to the internet thru NAT and can see eachother host only. Also makes it so the share folder doesn't share the entire VM.
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'fileutils' ; FileUtils.mkdir_p 'shared'
Vagrant::Config.run do |config|
config.vm.define :vm1 do |config|
config.vm.share_folder 'v-root', '/vagrant', 'shared'
config.vm.box = "precise64"
config.vm.network :hostonly, "192.168.99.2"
- Setting up nagios nrpe client on Ubuntu 12.04.3 LTS
This describes how to setup a nagios nrpe with autossh
tunneling to communicate with the nagios server, and
configure various checks.
The checks are specific to my needs, your millage may vary.
== Install the required packages ==
== w/ sudo ==
@arachnafobic
arachnafobic / _nagios with nginx on ubuntu_
Last active November 21, 2017 00:33
nagios with nginx on ubuntu 12.04.3 LTS
- Setting up nagios server on Ubuntu 12.04.3 LTS
This describes how to setup a nagios server with nginx
and configure various checks.
The checks are specific to my needs, your millage may vary.
== Install the required packages ==
== w/ sudo ==