This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Listens on localhost port 2003 for graphite metrics and publish them to carbon via amqp | |
var sys = require('sys') | |
, net = require('net') | |
, amqp = require('amqp') | |
var payload = ""; | |
var server = net.createServer(function (s) { | |
s.on('data', function(data) { | |
d = data.toString().replace(/(\n|\r)+$/, ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a post-auth script to integrate Duo Security with OpenVPN Access Server | |
# | |
# glued together from openvpn-as sample code and duo's community openvpn python | |
# integration script | |
# | |
# Disclaimer: I am not a python programmer | |
# | |
import os, sys, urllib, hashlib, httplib, hmac, base64, json, syslog, time, re | |
from pyovpn.plugin import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an rbenv config that installs ruby 1.9.3 with railsexpress patchset from https://github.com/skaes/rvm-patchsets | |
# | |
# https://gist.github.com/burke/1688857 was helpful to look at to see how this is done | |
# | |
# required debian packages: | |
# apt-get install autoconf build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev libffi-dev tk-dev libgdbm-dev | |
#ruby patch revision | |
rev=392 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# This script receives pages in the formats | |
# /usr/bin/curl -d host="$HOSTALIAS$" -d output="$SERVICEOUTPUT$" -d description="$SERVICEDESC$" -d type=service -d notificationtype="$NOTIFICATIONTYPE$ -d state="$SERVICESTATE$" $CONTACTADDRESS1$ | |
# /usr/bin/curl -d host="$HOSTNAME$" -d output="$HOSTOUTPUT$" -d type=host -d notificationtype="$NOTIFICATIONTYPE$" -d state="$HOSTSTATE$" $CONTACTADDRESS1$ | |
# | |
# Based on a gist by oremj (https://gist.github.com/oremj/3702073) | |
# | |
# Configuration: | |
# HUBOT_NAGIOS_URL - https://<user>:<password>@nagios.example.com/cgi-bin/nagios3 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Abuse of vagrant to build some debs. optionally also uploads to an apt repo on s3. | |
# | |
# Tested with: | |
# squeeze64 https://dl.dropboxusercontent.com/u/13054557/vagrant_boxes/debian-squeeze.box | |
# squeeze32 http://mathie-vagrant-boxes.s3.amazonaws.com/debian_squeeze_32.box | |
# Debian-7.1.0-64 (built with veewee, not shared on a public url. this is also the default) | |
# | |
# Usage: | |
# # vagrant box add squeeze32 http://mathie-vagrant-boxes.s3.amazonaws.com/debian_squeeze_32.box |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description | |
# Do things on twitter through hubot, as your logged in user after authenticating with an oauth pin. | |
# | |
# Configuration: | |
# HUBOT_TWITTER_CONSUMER_KEY - API key for hubot app registered on dev.twitter.com | |
# HUBOT_TWITTER_CONSUMER_SECRET - API secret for hubot app registered on dev.twitter.com | |
# | |
# Commands: | |
# hubot t auth <pin_code> - authenticate with pin code | |
# hubot t clear my credentials - forget any authentication tokens |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Tell a nest thermostat to kick the heat on for n minutes | |
require 'nest_thermostat' | |
unless ARGV[0] | |
puts 'Usage: warmup.rb <minutes>' | |
exit 1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Policyfile.rb | |
name "some_policy" | |
run_list 'derp' | |
require 'json' | |
JSON.parse(File.read('../environments/some_env.json'))['default_attributes'].each_pair{|k,v| default[k]=v} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Hubot interface for timezone.io | |
# | |
# Configuration: | |
# HUBOT_TIMEZONEIO_URL - full team url eg: https://timezone.io/team/buffer | |
# | |
# Commands: | |
# hubot tz - Show team's local time across time zones via timezone.io | |
# | |
# Dependencies: |
OlderNewer