Skip to content

Instantly share code, notes, and snippets.

Andy Leonard anl

Block or report user

Report or block anl

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
anl /
Last active Jul 1, 2016
Installing streisand prereqs in a virtualenv on OS X
brew install gmp
brew install libffi
virtualenv ~/virtualenvs/streisand
. ~/virtualenvs/streisand/bin/activate
pip install -U pip
pip install -U setuptools
env "CFLAGS=-I/usr/local/include -L/usr/local/lib" pip install pycrypto
pip install ansible
# Undocumented, unsupported means to compress GitHub Enterprise logs:
yes | ghe-unlock
sudo -u git gzip /var/log/github/unicorn.log.1
View pre-commit
# Adapted from a puppet pre-commit hook at:
# install this as .git/hooks/pre-commit to check DNS zone files
# for errors before committing changes.
anl /
Last active Oct 13, 2015
Purge Ubuntu VM prior to imaging on SmartOS; tested with 12.04.
# This script assumes:
# 1) Joyent's vmtools are installed; and
# 2) /etc/rc.local contains:
# /usr/sbin/dpkg-reconfigure openssh-server
# or the equivalent.
/usr/bin/apt-get update
/usr/bin/apt-get -y dist-upgrade
anl /
Created Dec 10, 2012
Bootstrap Graphite on SmartOS
dataset=$(zfs list | grep data | awk '{print $1}')
sudo zfs set mountpoint=/data $dataset
sudo groupadd graphite
sudo useradd -c "Graphite User" -m -d /data/graphite -g graphite -s /bin/bash graphite
sudo pkgin up
sudo pkgin -y ug
sudo pkgin -y in gcc47
sudo pkgin -y in openldap-client
View site.config.m4
APPENDDEF(`confLIBS', `-lssl -lcrypto')
VERSIONID(`setup for linux')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
View drop_tarball.pp
# Small define to expand a tarball at a location; assumes File[$title]
# definition of tarball and installation of pax:
define baselayout::drop_tarball($dest, $dir_name, $dir_sub='') {
# $dest: cwd in which expansion is done
# $dir_name: name of top level directory created in $dest
# $dir_sub: regexp to -s for pax - not supported for .zip archives
if ($dir_sub) {
View qimo.pp
# How obsessive sysadmins install Qimo for their four year olds at home:
class qimo {
# # Qimo lives in the universe repository - activate if necessary, assuming @apt::repo["universe"]
# # elsewhere in Puppet config (uncomment require in Package["qimo-session"] as well):
# realize Apt::Repo["universe"]
package { "qimo-session":
ensure => present,
# require => Apt::Repo["universe"],
View slapd.default
# Location of the slapd configuration to use. If using the cn=config
# backend to store configuration in LDIF, set this variable to the
# directory containing the cn=config data; otherwise set it to the location
# of your slapd.conf file. If empty, use the compiled-in default
# (/etc/ldap/slapd.d).
# System account to run the slapd server under. If empty the server
# will run as root.
You can’t perform that action at this time.