Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jgeiger's full-sized avatar

Joey Geiger jgeiger

View GitHub Profile
@jgeiger
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 http://task3.cc/418/how-to-automatically-mount-and-umount-apple-time-capsule-on-linu for info and explanations.
#!/bin/bash
#
# 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
# http://sam.zoy.org/wtfpl/COPYING 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 (https://keybase.io/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
jgeiger / Makefile
Created January 28, 2016 15:49
Default Makefile for building Go projects including Docker containers
SHELL := /bin/bash
PROJECT := github.com/jgeiger/example
PKGS := $(shell go list ./... | grep -v /vendor)
EXECUTABLE := example
PKG := example
DOCKER_REGISTRY := jgeiger
DOCKER_IMAGE_NAME := example
GIT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
.PHONY: build test golint docs $(PROJECT) $(PKGS) vendor
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
@jgeiger
jgeiger / git_commit_example.txt
Created November 19, 2014 16:22
Git commit message format
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)
[#tracker_story_id]
or for multiple stories
@jgeiger
jgeiger / mmonit.conf
Created August 24, 2014 21:01
M/Monit config file
# 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
jgeiger / nginx.conf
Last active December 24, 2021 06:23
Nginx base config
user www-data;
worker_processes 2;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
multi_accept on;
use epoll;
}
@jgeiger
jgeiger / nginx.conf
Created August 13, 2014 21:32
nginx upstart config
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/nginx.pid
# Needed to allow Nginx to start, however, the wrong PID will be tracked
expect fork
@jgeiger
jgeiger / nginx.conf
Created August 13, 2014 21:29
Nginx monit conf file
# nginx
check process nginx with pidfile /usr/local/nginx/logs/nginx.pid
start program = "/sbin/start nginx"
stop program = "/sbin/stop nginx"
if failed host 127.0.0.1 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
jgeiger / redis-server.conf
Last active August 29, 2015 14:05 — forked from cyx/gist:3690597
Redis server monit config for upstart
check process redis-server
with pidfile "/var/run/redis.pid"
start program = "/sbin/start redis-server"
stop program = "/sbin/stop redis-server"
if 2 restarts within 3 cycles then timeout
if failed host 127.0.0.1 port 6379 then restart
if 5 restarts within 5 cycles then timeout