Skip to content

Instantly share code, notes, and snippets.

View chrisboulton's full-sized avatar
💫

Chris Boulton chrisboulton

💫
View GitHub Profile
@chrisboulton
chrisboulton / gist:4203133
Created December 4, 2012 12:06
create_resources_dup_example
define my_user($username, $group) {
user { $username: ensure => present, }
# This will trigger a duplicate definition error when compiling the catalog
group { $group: ensure => present, }
}
$users = {
'chris' => {
'username' => 'chris',
130208 1:34:22 InnoDB: Compressed tables use zlib 1.2.3
130208 1:34:22 InnoDB: Using Linux native AIO
130208 1:34:22 InnoDB: Initializing buffer pool, size = 30.0G
130208 1:34:23 InnoDB: Completed initialization of buffer pool
130208 1:34:23 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 78393430125
130208 1:34:24 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
130208 1:36:01 [Note] WSREP: Member 0 (db1c) synced with group.
$default_node_params = {
'name' => $::fqdn,
'data' => $is_data,
'master' => $is_master,
}
# awareness values should be munched into the 'node' config section
$node_params = merge($default_node_params, $awareness_attributes)
class { 'elasticsearch':
@chrisboulton
chrisboulton / graphite.ini
Last active December 15, 2015 14:09
Graphite aggregation rules for StatsD
[statsd_lower]
pattern = ^stats\..*\.lower(_[0-9]+)?$
aggregationMethod = min
xFilesFactor = 0.1
[statsd_upper]
pattern = ^stats\..*\.upper(_[0-9]+)?$
aggregationMethod = max
xFilesFactor = 0.1
#!/bin/sh
set -x
REDIS_CLI="redis-cli"
REDIS_SERVER="/usr/bin/redis-server"
START_STOP="/sbin/start-stop-daemon"
E_INVALID_ARGS=65
E_INVALID_COMMAND=66
E_NO_SLAVES=67
@chrisboulton
chrisboulton / gist:5692394
Last active December 17, 2015 23:49
CB's "I have some of the ingredients but not all of the ingredients slow-cooker chili"
500g ground beef
1 red onion
1 green pepper
1 red pepper
1 chilli
3 garlic cloves
800g diced tomatos
4 tbsp tomato paste
smoked paprika
cayenne pepper
lines = '# Generated by iptables-save v1.4.8 on Sun Jun 30 20:28:03 2013
*raw
:PREROUTING ACCEPT [389063:480408960]
:OUTPUT ACCEPT [365429:736377112]
-A PREROUTING -p udp -m udp --dport 8125 -m comment --comment "disable conntrack for statsd" -j NOTRACK
COMMIT
# Completed on Sun Jun 30 20:28:03 2013
# Generated by iptables-save v1.4.8 on Sun Jun 30 20:28:03 2013
*nat
:PREROUTING ACCEPT [6621:379806]
@chrisboulton
chrisboulton / gist:5899714
Created July 1, 2013 10:06
swap mysql-5.1 out with percona-server-5.5 on a box with other packages depending upon mysql
# DISCLOSURE: it is a HORRIBLE, HORRIBLE idea for you to blindly run the
# below unless you absolutely know what each and every command does and
# have a system where you can test first, have appropriate backups etc.
# this is not a script - you should run every command and keep a very
# close eye on the output for anything unexpected.
apt-get install libaio1
apt-get install -d percona-server-client-5.5 percona-server-server-5.5 percona-server-server-5.5 libmysqlclient18=5.5.31-rel30.3-520.squeeze libmysqlclient-dev=5.5.31-rel30.3-520.squeeze
@chrisboulton
chrisboulton / gist:5907249
Created July 2, 2013 06:58
Specify a HTTPS proxy for Idera ServerBackup license activation
# add this to your environment in one way or another
# (a good place may be /etc/init.d/cdp-server)
# adjust where necessary.
export _JAVA_OPTIONS="-Dhttp.proxyHost=my.proxy.server -Dhttp.proxyPort=8888 -Dhttps.proxyHost=my.proxy.server -Dhttps.proxyPort=8888"
@chrisboulton
chrisboulton / makeitmakeitnow.sh
Created July 9, 2013 04:14
package nodejs using fpm (for debian) i'm lazy, you should be too, so here's a bash script.
#!/bin/bash
set -e
VERSION=0.10.12
BUILD_DIR=`mktemp -d`
trap "rm -rf -- $BUILD_DIR" EXIT
export DESTDIR=$BUILD_DIR/build
ARCHIVE=node-v$VERSION