Skip to content

Instantly share code, notes, and snippets.

View jgeiger's full-sized avatar

Joey Geiger jgeiger

View GitHub Profile
jgeiger / timecapsule-handler
Created September 15, 2017 18:46 — forked from dgraziotin/timecapsule-handler
Script to automatically look for Apple TimeCapsule devices and mount/umount them under GNU/Linux. See for info and explanations.
View timecapsule-handler
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# for more details.
# Version 3, enhanced for Ubuntu 13.X+, Fedora 19+, and similar distros.

Keybase proof

I hereby claim:

  • I am jgeiger on github.
  • I am jgeiger ( on keybase.
  • I have a public key whose fingerprint is 881A 1844 D71E 5741 C36E C5BD F733 E075 2CE8 36DF

To claim this, I am signing this object:

jgeiger / Makefile
Created January 28, 2016 15:49
Default Makefile for building Go projects including Docker containers
View Makefile
SHELL := /bin/bash
PKGS := $(shell go list ./... | grep -v /vendor)
EXECUTABLE := example
PKG := example
GIT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
.PHONY: build test golint docs $(PROJECT) $(PKGS) vendor
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
jgeiger / git_commit_example.txt
Created November 19, 2014 16:22
Git commit message format
View git_commit_example.txt
50 characters of description (within reason)
Longer descriptions to 72 characters (within reason)
Longer descriptions to 72 characters (within reason)
Longer descriptions to 72 characters (within reason)
or for multiple stories
jgeiger / mmonit.conf
Created August 24, 2014 21:01
M/Monit config file
View mmonit.conf
# This is an upstart script to keep mmonit running.
# Put this script here:
# /etc/init/mmonit.conf
# and reload upstart configuration:
# initctl reload-configuration
# You can manually start and stop monit like this:
jgeiger / nginx.conf
Last active December 24, 2021 06:23
Nginx base config
View nginx.conf
user www-data;
worker_processes 2;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
multi_accept on;
use epoll;
jgeiger / nginx.conf
Created August 13, 2014 21:32
nginx upstart config
View nginx.conf
description "nginx http daemon"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/local/nginx/sbin/nginx
env PIDFILE=/usr/local/nginx/logs/
# Needed to allow Nginx to start, however, the wrong PID will be tracked
expect fork
jgeiger / nginx.conf
Created August 13, 2014 21:29
Nginx monit conf file
View nginx.conf
# nginx
check process nginx with pidfile /usr/local/nginx/logs/
start program = "/sbin/start nginx"
stop program = "/sbin/stop nginx"
if failed host port 80 then restart
if cpu is greater than 40% for 2 cycles then alert
if cpu > 60% for 5 cycles then restart
if 10 restarts within 10 cycles then timeout
jgeiger / redis-server.conf
Last active August 29, 2015 14:05 — forked from cyx/gist:3690597
Redis server monit config for upstart
View redis-server.conf
check process redis-server
with pidfile "/var/run/"
start program = "/sbin/start redis-server"
stop program = "/sbin/stop redis-server"
if 2 restarts within 3 cycles then timeout
if failed host port 6379 then restart
if 5 restarts within 5 cycles then timeout