Skip to content

Instantly share code, notes, and snippets.

View voxxit's full-sized avatar

Josh Delsman voxxit

View GitHub Profile
@voxxit
voxxit / PROJECTS.md
Created October 2, 2015 11:38
Some open-source projects I've worked on

Keybase proof

I hereby claim:

  • I am voxxit on github.
  • I am jdelsman (https://keybase.io/jdelsman) on keybase.
  • I have a public key whose fingerprint is 108A 6856 B063 C346 5E18 E5E0 4D5B 0821 3624 A862

To claim this, I am signing this object:

@voxxit
voxxit / libsum.go
Last active September 15, 2015 17:32
Ruby is 966.06x stupider at maths on my MacBook Pro... http://c7.se/go-and-ruby-ffi
package main
import "C"
//export add
func add(a, b int) int {
return a + b
}
func main() {}
@voxxit
voxxit / nginx.conf
Created August 26, 2015 19:00
Working NGINX configuration; for use with HTTP/2 Dockerfile here: https://gist.github.com/voxxit/48217044067bb859248e
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@voxxit
voxxit / Dockerfile
Last active April 6, 2022 01:52
nginx v1.9.3 Dockerfile with HTTP/2 support baked in!
FROM alpine:latest
MAINTAINER Joshua Delsman <j@srv.im>
EXPOSE 443
ENV NGINX_VERSION 1.9.3
RUN apk add --update openssl-dev pcre-dev zlib-dev build-base \
&& rm -rf /var/cache/apk/* \
@voxxit
voxxit / download-slow-query-log.sh
Last active October 31, 2023 16:13
Downloads RDS slow query logs for the last 24 hours using the AWS CLI
#!/bin/bash
instanceID=$1
date=$(date +%Y%m%d)
function downloadLog () {
local log=$1
aws rds download-db-log-file-portion \
--output text \
@voxxit
voxxit / main.go
Last active August 29, 2015 14:27
Listens for webhooks from PagerDuty, and lights up all lights on the first Hue bridge found on the local network
package main
import (
"log"
"os"
"strconv"
"github.com/codegangsta/cli"
"github.com/gin-gonic/gin"
"github.com/mediocregopher/radix.v2/redis"
@voxxit
voxxit / hashicorp.vault.server.plist
Created August 7, 2015 22:09
LaunchAgent for Vault
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>hashicorp.vault.server</string>
<key>ProgramArguments</key>
<array>
@voxxit
voxxit / hashicorp.consul.server.plist
Created August 7, 2015 22:01
LaunchAgent for Consul & Consul UI
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>hashicorp.consul.server</string>
<key>ProgramArguments</key>
<array>
@voxxit
voxxit / install-dd-agent.sh
Last active August 29, 2015 14:21
Reworked install script for the Python-based Datadog agent — curl -L http://git.io/vTyed | sh
#!/bin/bash
set -x
# Root user required
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you must be root to install dd-agent" && exit 1
fi
# Python and sysstat are required
if ! command -v python &>/dev/null; then echo "Python not installed" && exit 1; fi