Skip to content

Instantly share code, notes, and snippets.

View gchaix's full-sized avatar

Greg Lund-Chaix gchaix

View GitHub Profile
gchaix / packages.pp
Last active December 31, 2015 13:19
Conditional package naming in puppet
View packages.pp
$updatecommand = $osfamily ? {
'Debian' => 'apt-get update && apt-get upgrade',
'RedHat' => 'yum update',
'Suse' => 'zypper update',
exec { "update_packages":
command => $updatecommand,
path => "/usr/local/bin/:/bin/",
gchaix / gist:9795176
Created March 26, 2014 22:34
CentOS 6.4 requirements
View gist:9795176
perl-DBD-SQLite.x86_64 0:1.27-3.el6 perl-Digest-SHA1.x86_64 0:2.12-2.el6
perl-File-FnMatch.x86_64 0:0.02-6.el6 perl-JSON-XS.x86_64 1:2.27-2.el6
perl-Moose.x86_64 0:1.15-1.el6 perl-Parse-Yapp.noarch 0:1.05-41.el6
perl-ParseLex.noarch 0:2.15-14.el6 perl-Try-Tiny.noarch 0:0.11-4.el6
Dependency Installed:
perl-Class-C3.noarch 0:0.22-4.el6
perl-Class-MOP.x86_64 0:1.12-1.el6
perl-DBI.x86_64 0:1.609-4.el6
gchaix / default.vcl
Last active October 3, 2018 01:16
Example Varnish default.vcl for Drupal
View default.vcl
# Customized VCL file for serving up a Drupal site with multiple back-ends.
# Based on this excellent Lullabot article:
# Hooks for New Relic
#include <sys/time.h>
View drush sql-sync --debug --verbose
[vagrant@vagrant-multi1 default]$ drush sql-sanitize --debug --verbose
Using the Drush script found at /home/vagrant/.composer/vendor/drush/drush/drush.launcher using pcntl_exec
Drush preflight prepare loaded autoloader at [preflight]
/home/vagrant/.composer/vendor/autoload.php [0.01 sec, 2.88 MB]
Starting Drush preflight. [0.01 sec, 2.88 MB] [preflight]
Cache HIT cid: 8.1-dev-commandfiles-0-b4175ec541a5b0457a6af1fda10b4559 [debug]
[0.01 sec, 2.95 MB]
Scanning into /etc/drush for /.*aliases\.drush(8|)rc\.php$/ [0.03 sec, [debug]
5.61 MB]
Scanning into /etc/drush for /self\.alias\.drush(8|)rc\.php$/ [0.03 sec, [debug]
gchaix / gist:80bf2310f46cdb6d3a4d
Created December 24, 2015 01:55
Running a vagrant clone of a prod site
View gist:80bf2310f46cdb6d3a4d
1. Clone your vagrant template (i.e. or
2. Clone the site code to somewhere convenient
3. Link cloned site code to where the vagrant template is expecting to see code (set in Vagrantfile.local for puppet-centos, symlink to `htdocs` in the repo root for webdev-vagrant)
4. Get a database dump
a. if on Acquia cloud, install the drush alias file for the acquia account and do a `drush @sitename.testsql-dump > site.sql` in the repo root
5. `vagrant up`
6. `vagrant ssh` into the box and load the database from the sql dump: `drush sql-cli < site.sql`
gchaix /
Created April 19, 2016 22:36
mysql replication check script
#--- Configurables ------------------------------------------
# replication delay threshold
# notifcation email (if blank, no email will be sent)
gchaix /
Created April 25, 2016 19:55 — forked from geoffgarside/
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>, Mon, Jan 24 13:04:18 GMT 2010
gchaix /
Created April 25, 2016 20:00 — forked from ertug/
Automatic ZFS Snapshot Rotation
# original code:
# 07/17/2011 - ertug: made it compatible with zfs-fuse which doesn't have .zfs directories
# Path to ZFS executable:
View git-bash_profile
# git-prompt
export GIT_PS1=1
if [ -f /usr/local/bin/ ] && [ $GIT_PS1 -ne 0 ]; then
source /usr/local/bin/
#export PS1=${PS1}$(__git_ps1 "\n(%s)\$ ")
if [ "${SERVER_TYPE_PROMPT}" ]; then

Keybase proof

I hereby claim:

  • I am gchaix on github.
  • I am gchaix ( on keybase.
  • I have a public key ASCECah1aOibvrMVZvHQ9Q90E7b17e66mSy7gcagf1jiQgo

To claim this, I am signing this object: