Skip to content

Instantly share code, notes, and snippets.

Jon dayreiner

  • The Flowr Corporation
  • Toronto, Canada
Block or report user

Report or block dayreiner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View example-compose-mariadb-galera.yml
version: '2'
image: dayreiner/centos7-mariadb-10.1-galera:latest
container_name: db1
restart: never
- "3306"
- "4567"
- "4568"

Keybase proof

I hereby claim:

  • I am dayreiner on github.
  • I am dayreiner ( on keybase.
  • I have a public key whose fingerprint is C9B8 3E33 457A 7E82 52BA 1D32 8800 AEA0 322E A3E2

To claim this, I am signing this object:

dayreiner /
Last active Mar 31, 2016
Part one of a two-part series on building a high-availability containerized MariaDB Galera cluster on top of a multi-master docker swarm in the cloud.

Reposted from this blog entry

Associated github repository

Multicolored Containers Photo By: Håkan Dahlström

Part one of a two-part series. The second part will be posted in a couple of days...

While I manage environments across multiple cloud platforms (and even the occasional "traditional" colo) at my workplace, our primary application environment is in IBM Softlayer. I enjoy working with Softlayer -- the API is fairly robust, there's a lot of choice (even bare-metal, should that tickle your fancy) and it allows me to deploy instances in both Toronto and Montreal. Canadian data-residency is a "big deal" for many Canadian companies; which the

dayreiner / sysctl.conf
Last active Aug 30, 2018
A decent base to start tuning off of for centos 7 apache and mariadb systems
View sysctl.conf
# MariaDB Tuning
vm.swappiness = 1
fs.file-max = 2097152
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
# Sets the time before the kernel considers migrating a proccess to another core
kernel.sched_migration_cost_ns = 5000000
# Group tasks by TTY
dayreiner /
Last active Mar 7, 2016
Monitoring MariaDB / MySQL Galera cluster status with Citrix Netscaler

Monitoring MariaDB Galera Cluster Members with Citrix Netscaler

Also posted here:

We run several MariaDB Galera clusters for various client sites and use Citrix Netscaler Application Delivery Controllers to load-balance various services (among other features). With near-synchronous multimaster replication, Galera cluster simplifies application stacks as in many cases you can point each web server at its own corresponding database server and just worry about balancing the load between your application servers.

Citrix netscaler also supports load-balancing across MySQL systems, for instances where you want to spread out reads across systems or want to balance reads and send writes to a specific system.

But what happens when

dayreiner /
Last active Sep 19, 2019
Log all users zsh / bash commands via syslog without 3rd-party tools or auditd

Sending Bash and ZSH Commands to Syslog

Also posted here:

Your bash/zsh history is great if its complete, but it doesn't capture commands across all users, sudo's, root commands etc. In particular with test environments, someone may perform a "one-off" procedure and then months later it needs to be repeated. It would be nice to be able to look up what the user did at the time, and searching through multiple, possibly truncated history files is a pain.

Tools like typescript are great if you're actively documenting, but not something you would use all the time in practice and capture more than just a history of your commands. There are third-party tools like rootsh and Snoopy that can accomplish this, but third-party tools can be overkill if all you want is a quick reference in a re

dayreiner /
Last active Oct 19, 2016
HOWTO: Docker 1.10.0-rc3 on OSX El Capitan with docker-compose 1.6.0-rc2 and docker-machine 0.6.0-rc3. Use Xhyve driver instead of virtualbox for performance.
dayreiner /
Last active Apr 4, 2016
HOWTO: Docker 1.10.0-rc1 on OSX El Capitan with docker-compose 1.6.0-rc1 and docker-machine 0.6.0-rc1. Use Xhyve driver instead of virtualbox for performance.

Docker 1.10.0 RC1 with Docker Compose 0.6 and Docker Machine 1.6 and Xhyve on OSX

Updated install instructions for RC2 are available here


The steps below will uninstall docker, docker-machine and docker-compose under OSX using virtualbox (via either brew or toolbox, or both), and replace them with the latest RC versions of docker, compose and machine using the Xhyve driver for better performance under OSX using Hypervisor.framework.

dayreiner /
Last active Nov 12, 2015 — forked from rodw/
A simple script to backup an organization's GitHub repositories, wikis and issues. Forked to add pagination support as my org has more repos than the original can handle.
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account
GHBU_GITHOST=${GHBU_GITHOST-""} # the GitHub hostname (see comments)
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted
dayreiner / icinga2_check_wmi_plus.conf
Created Jun 11, 2015
An example check_wmi_plus configuration for Icinga2. Check_wmi_plus ( is a clientless plugin for monitoring Windows systems via WMI with Nagios and other monitoring platforms.
View icinga2_check_wmi_plus.conf
object CheckCommand "check_wmi" {
import "plugin-check-command"
command = [ PluginDir + "/" ]
arguments = {
"--inidir" = "$wmi_inidir$"
"-H" = "$$"
"-A" = "$wmi_authfile_path$"
"-m" = "$check_mode$"
"-s" = "$wmi_submode$"
You can’t perform that action at this time.