Skip to content

Instantly share code, notes, and snippets.

@Zordrak
Zordrak / .aws_helper.sh
Created May 3, 2018 13:42
AWS Console MFA Helper Script
#!/usr/bin/env bash
# Functions to help handle STS manipulation of IAM credentials from
# a shell console for AWS CLI, and other things - especially things
# that don't support IAM roles being specific in boto profile config
#
# When you use the mfa() function, we assume that you do not have your
# credentials defined with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
# variables in the environment. The credentials must be configured elsewhere
# in the boto search path such as ~/.aws/credentials or an EC2 Instance Profile
@Zordrak
Zordrak / .mcollective
Last active June 29, 2018 14:48
mcollective configuration
collectives = mcollective
connector = activemq
direct_addressing = 1
libdir = /usr/local/libexec/mcollective:/usr/libexec/mcollective
logger_type = console
loglevel = warn
main_collective = mcollective
plugin.activemq.base64 = yes
plugin.activemq.heartbeat_interval = 30
plugin.activemq.pool.1.host = puppet.allfiled.local
@Zordrak
Zordrak / gist:e3cfaa83f2dcc486403304b5aa77d21d
Created April 26, 2018 11:18
TF Debug Log for ELB Access Log Configuration Bug
2018-04-26T12:07:03.864+0100 [DEBUG] plugin.terraform-provider-aws_v1.13.0_x4: -----------------------------------------------------
2018-04-26T12:07:03.864+0100 [DEBUG] plugin.terraform-provider-aws_v1.13.0_x4: 2018/04/26 12:07:03 [DEBUG] [aws-sdk-go] <?xml version="1.0" encoding="UTF-8"?>
2018-04-26T12:07:03.864+0100 [DEBUG] plugin.terraform-provider-aws_v1.13.0_x4: <DescribeAccountAttributesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
2018-04-26T12:07:03.864+0100 [DEBUG] plugin.terraform-provider-aws_v1.13.0_x4: <requestId>a9ff8883-739d-4ffa-80dc-cc9d122e0a4f</requestId>
2018-04-26T12:07:03.864+0100 [DEBUG] plugin.terraform-provider-aws_v1.13.0_x4: <accountAttributeSet>
2018-04-26T12:07:03.864+0100 [DEBUG] plugin.terraform-provider-aws_v1.13.0_x4: <item>
2018-04-26T12:07:03.864+0100 [DEBUG] plugin.terraform-provider-aws_v1.13.0_x4: <attributeName>supported-platforms</attributeName>
2018-04-26T12:07:03.864+0100 [DEBUG] plugin.terraform-provider-aws_v1.13.0_x4:
### Keybase proof
I hereby claim:
* I am zordrak on github.
* I am mikepeacheybjss (https://keybase.io/mikepeacheybjss) on keybase.
* I have a public key ASB3h3Asyjt4NDfA_wntdHoJM7or8tjUnVOqQb8eBlIEXQo
To claim this, I am signing this object:
@Zordrak
Zordrak / lumberjack.conf
Created December 9, 2013 10:16
Lumberjack config file
{
"network": {
"servers": ["<logstash indexer ip>:6782"],
"ssl certificate": "/etc/pki/tls/certs/lumberjack.crt",
"ssl ca": "/etc/pki/tls/certs/lumberjack.crt",
"ssl key": "/etc/pki/tls/private/lumberjack.key",
"timeout": 15
},
"files": [
{
@Zordrak
Zordrak / log_check_es
Last active December 30, 2015 03:09
Script to be run from cron every X minutes to e-mail the stack trace of any tomcat exceptions discovered in the previous X minutes.
#!/bin/bash
#
# log_check_es
#
# Check ElasticSearch for recent exceptions from the live tomcat servers
##Debug
#set -x
# Exit on Error
@Zordrak
Zordrak / rc.dhcpd
Created November 29, 2013 14:29
Slackware ISC DHCPD init script
#!/bin/sh
#
# /etc/rc.d/rc.dhcpd
# This shell script takes care of starting and stopping
# the ISC DHCPD service
#
# Put the command line options here that you want to pass to dhcpd:
DHCPD_OPTIONS="-q eth0"
#! /bin/sh
#
# /etc/rc.d/init.d/logstash
#
# Starts Logstash as a daemon
#
# chkconfig: 2345 20 80
# description: Starts Logstash as a daemon
### BEGIN INIT INFO
@Zordrak
Zordrak / clubs_host
Last active August 29, 2015 14:14 — forked from anonymous/cmd_line
clubs_host/
├── files
│ ├── jsonevent-layout-1.6-jar-with-dependencies.jar
│ ├── log4j.properties
│ └── README.markdown
├── lib
│ └── puppet
│ ├── facter
│ │ └── README.markdown
│ ├── parser
@Zordrak
Zordrak / ovirt-export
Created November 4, 2014 09:52
ovirt import failure to get all disks
<?xml version="1.0" encoding="UTF-8"?>
<ovf:Envelope xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1/" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ovf:version="3.5.0.0">
<References>
<File ovf:href="a084a9f2-7457-4c25-a767-bb3eb9755c9a/b790fba2-f0bd-47f7-adbf-cbc1561a1ae8" ovf:id="b790fba2-f0bd-47f7-adbf-cbc1561a1ae8" ovf:size="1073741824" ovf:description="Active VM" />
<File ovf:href="018f3847-5eb2-47d7-9e5a-dec9a484809a/88f53567-0a0f-4893-8104-7112374c4027" ovf:id="88f53567-0a0f-4893-8104-7112374c4027" ovf:size="1073741824" ovf:description="Active VM" />
<File ovf:href="d4f9c0d4-d81e-4c30-9f84-ed4f7a84b94f/4c9ec172-8207-43ac-9190-69b4a18d85fa" ovf:id="4c9ec172-8207-43ac-9190-69b4a18d85fa" ovf:size="1073741824" ovf:description="Active VM" />
</References>
<Section xsi:type="ovf:NetworkSectio