Skip to content

Instantly share code, notes, and snippets.

View gchaix's full-sized avatar
😺

Greg Chaix gchaix

😺
View GitHub Profile
@gchaix
gchaix / java.env
Last active July 20, 2017 23:29 — forked from logic/java.env
Zookeeper RPM spec for CentOS and Fedora, including python bindings
ZOO_LOG4J_PROP="INFO,ROLLINGFILE"
ZOO_LOG_DIR="/var/log/zookeeper/"
@gchaix
gchaix / nginx-cors.conf
Created April 6, 2017 23:46 — forked from himyouten/nginx-cors.conf
nginx configuration for CORS (Cross-Origin Resource Sharing), with an origin whitelist, and HTTP Basic Access authentication allowed
#
# A CORS (Cross-Origin Resouce Sharing) config for nginx
#
# == Purpose
#
# This nginx configuration enables CORS requests in the following way:
# - enables CORS just for origins on a whitelist specified by a regular expression
# - CORS preflight request (OPTIONS) are responded immediately
# - Access-Control-Allow-Credentials=true for GET and POST requests
@gchaix
gchaix / zfs-snapshot.sh
Created April 25, 2016 20:00 — forked from ertug/zfs-snapshot.sh
Automatic ZFS Snapshot Rotation
#!/bin/bash
##
# original code: http://andyleonard.com/2010/04/07/automatic-zfs-snapshot-rotation-on-freebsd/
# 07/17/2011 - ertug: made it compatible with zfs-fuse which doesn't have .zfs directories
##
# Path to ZFS executable:
ZFS=/usr/local/sbin/zfs
@gchaix
gchaix / 503.mysql.sh
Created April 25, 2016 19:55 — forked from geoffgarside/503.mysql.sh
FreeBSD periodic/daily script for running MySQL backups
#! /bin/sh
#
# $FreeBSD$
#
# Maintenance shell script to backup mysql databases
# Put this in /usr/local/etc/periodic/daily, and it will be run
# every night
#
# By Geoff Garside <Geoff.Garside at m247.com>, Mon, Jan 24 13:04:18 GMT 2010
#
@gchaix
gchaix / mysql_repl_check.sh
Created April 19, 2016 22:36
mysql replication check script
#!/bin/bash
#--- Configurables ------------------------------------------
# replication delay threshold
TH_SECONDS_BEHIND=5
# notifcation email (if blank, no email will be sent)
EMAIL_ADDR=""
#------------------------------------------------------------