Skip to content

Instantly share code, notes, and snippets.

View voxxit's full-sized avatar

Josh Delsman voxxit

View GitHub Profile
var sumoURL = process.env.SUMO_ENDPOINT,
zoneID = process.env.CLOUDFLARE_ZONE_ID,
cloudflareAuthEmail = process.env.CLOUDFLARE_AUTH_EMAIL,
cloudflareAuthKey = process.env.CLOUDFLARE_AUTH_KEY,
sourceCategoryOverride = process.env.SOURCE_CATEGORY_OVERRIDE || 'none',
sourceHostOverride = process.env.SOURCE_HOST_OVERRIDE || 'api.cloudflare.com',
sourceNameOverride = process.env.SOURCE_NAME_OVERRIDE || zoneID;
var https = require('https');
var zlib = require('zlib');
@voxxit
voxxit / Dockerfile
Last active September 27, 2020 17:53
FROM haproxy:1.7
ENV CT_VERS=0.16.0 \
CONSUL_HTTP_ADDR=demo.consul.io
RUN apt-get update \
&& apt-get -y install --no-install-recommends curl ca-certificates unzip \
&& curl -O https://releases.hashicorp.com/consul-template/${CT_VERS}/consul-template_${CT_VERS}_linux_amd64.zip \
&& unzip consul-template_${CT_VERS}_linux_amd64.zip \
&& mv consul-template /usr/local/bin/ \
@voxxit
voxxit / large.txt
Last active December 16, 2016 20:24 — forked from maxguzenski/redis-elasticache-benchmark.txt
redis-benchmark on Elasticache instancies
//
// m2.xlarge | vcpu: 2 | memory: 16.7
//
PING_INLINE: 30674.85 requests per second
PING_BULK: 30674.85 requests per second
SET: 30395.14 requests per second
GET: 30674.85 requests per second
INCR: 30959.75 requests per second
LPUSH: 31250.00 requests per second
LPOP: 30030.03 requests per second
@voxxit
voxxit / gist:8bf76779eecd350decbb8117c07f3b7c
Created May 23, 2016 04:43
Init script for hwdsl2/ipsec-vpn-server
#!/bin/bash
case "$1" in
start )
docker run \
--name docker-ipsec-vpn-server \
-p 500:500/udp \
-p 4500:4500/udp \
-v /lib/modules:/lib/modules:ro \
--detach \
@voxxit
voxxit / POSTMORTEM.md
Last active March 10, 2020 15:07
Example/outline of a postmortem to be conducted after a site outage/incident

POSTMORTEM: “Event Title Here”

Issue Summary

This should be a short (4-5 sentences) blurb which succinctly describes the event. At the very least, it should include:

  • the duration (with start & end times in the U.S. Pacific time zone):

…which lasted for roughly 10 minutes between 9:02PM and 9:12PM Pacific…

  • the impact to our users:
@voxxit
voxxit / RUNBOOK.md
Created April 29, 2016 14:26
Example of a solid run book/operations manual

Run Book / Operations Manual

  1. Table of Contents
  2. System Overview
    • Service Overview
    • Contributing Applications, Daemons, and Windows Services
    • Hours of Operation
    • Execution Design
    • Infrastructure and Network Design
    • Resilience, Fault Tolerance and High-Availability
@voxxit
voxxit / .gitconfig
Created April 18, 2016 14:13
Example .gitconfig alias — git prf — which uses the Github PR template
[alias]
..
prf = !hub pull-request -F .github/PULL_REQUEST_TEMPLATE
..
@voxxit
voxxit / truthy.rb
Created February 4, 2016 19:05 — forked from mmcclimon/truthy.rb
Port Perl's truthy values to Ruby.
#!/usr/bin/env ruby
class Object
# The following are falsy: false, nil, 0, "", and empty arrays/hashes.
# Anything else falls is truthy. This emulates Perl's truthiness.
def truthy?
if self.nil?
return false
elsif self.is_a? Fixnum
return self != 0
@voxxit
voxxit / README.md
Created December 20, 2015 21:10
HOW-TO: Free up disk inodes

First, run the following as root to find out which folder is using the most disk inodes:

# for i in `ls -1A`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -5
94520 usr
40694 proc
39851 mnt
39845 srv
34830 home
@voxxit
voxxit / main.go
Created October 11, 2015 22:12
Code snippets for "Supercharge Your DevOps Arsenal: Building Your First CLI Tool in Go"
package main
import (
“os”
“github.com/codegangsta/cli”
)
var app *cli.App