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
local l = require "lpeg" | |
require "cjson" | |
l.locale(l) | |
local sp = l.space^0 | |
local unreserved = l.digit + l.alnum + l.S"/=-.,_~ " | |
local name = l.C(unreserved^1) * sp | |
local comment = l.P"#" * (1 - l.P"\n")^1 * l.P"\n" | |
local sep = l.P(read_config("pair_separator")) |
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
--[[ | |
Inspired by: https://github.com/mozilla-services/lua_sandbox/pull/22 | |
*Haproxy log-format Directive* | |
log-format %ci:%cp\ [%t]\ %ft\ %b/%s\ %Tq/%Tw/%Tc/%Tr/%Tt\ %ST\ %B\ %CC\ %CS\ %tsc\ %ac/%fc/%bc/%sc/%rc\ %sq/%bq\ %hr\ %hs\ %{+Q}r | |
*Example Config* | |
[haproxy_udp_input] | |
type = "UdpInput" |
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
{ | |
"description": "build th base image", | |
"min_packer_version": "0.8.0", | |
"variables": { | |
"user": "centos", | |
"image": "d5f2c6b8-ae55-41d3-b9ba-15e0f2350659", | |
"flavor": "2", | |
"role1": "common", | |
"role2": "common", | |
"role3": "common", |
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/. | |
--[[ | |
--]] | |
local l = require 'lpeg' |
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) |
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
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
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
# 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
# $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 |