This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vm and role mapping for multi-vm vagrant | |
boxes = [ | |
{ :name => :app, :roles => ['base', 'web'] }, | |
{ :name => :mc, :roles => ['base', 'memcache'] }, | |
{ :name => :db, :roles => ['base', 'db-master'] }, | |
{ :name => :util, :roles => ['base', 'redis', 'resque' ] }, | |
] | |
Vagrant.configure("2") do |config| | |
# base image configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'fileutils' | |
def get_freq | |
File.readlines('/proc/cpuinfo').each do |line| | |
next unless line.match(/^cpu MHz/) | |
return line.split(/:/).last.strip.to_f * 1048576 | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
# only run one instance | |
LOCKFILE=/tmp/pg_backup.lock | |
[ -f $LOCKFILE ] && { echo "Error: $LOCKFILE exists"; exit 1; } >&2 | |
touch $LOCKFILE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lang en_US.UTF-8 | |
keyboard us | |
timezone --utc Etc/UTC | |
auth --useshadow --enablemd5 | |
selinux --disabled | |
rootpw --lock --iscrypted locked | |
zerombr | |
clearpart --all --initlabel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $OpenBSD: pf.conf,v 1.52 2013/02/13 23:11:14 halex Exp $ | |
# | |
# See pf.conf(5) for syntax and examples. | |
# | |
# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1 | |
# in /etc/sysctl.conf if packets are to be forwarded between interfaces. | |
### Macros | |
# system |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set up audit logging for connections outbound from the bastion | |
default['openssh']['client'].tap do |client| | |
client['permit_local_command'] = 'yes' | |
client['local_command'] = '/usr/bin/logger -p INFO -t AUTH %u signed into %h:%p as %r' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chef/resource/directory' | |
require 'chef/resource/file' | |
require 'chef/resource/remote_file' | |
require 'chef/resource/user' | |
require 'chef/provider/user' | |
class Chef | |
class Resource::TreehouseUser < Chef::Resource::User | |
def github_users(arg = nil) | |
set_or_return( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
projs := $(basename $(wildcard *.json)) | |
cmds := validate inspect build fix | |
aliases := bootstrap rebuild | |
# Enable packer debug logging | |
PACKER_LOG := 1 | |
PACKER_LOG_PATH := /tmp/packer-debug | |
export PACKER_LOG PACKER_LOG_PATH | |
# call out rules that don't generate output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This Source Code Form is subject to the terms of the Mozilla Public | |
-- License, v. 2.0. If a copy of the MPL was not distributed with this | |
-- file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
--[[ | |
Parses a payload containing JSON. | |
Config: | |
- type (string, optional, default nil): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This Source Code Form is subject to the terms of the Mozilla Public | |
-- License, v. 2.0. If a copy of the MPL was not distributed with this | |
-- file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
--[[ | |
Encodes a heka message as a sensu event | |
Config: | |
- status_field (string, optional, default: status) |
OlderNewer