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 / 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 / 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
@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 / multipath.conf
Created September 12, 2014 12:57
Fix unexpected multipathing of local SCSI disks
# RHEV REVISION 1.0
# RHEV PRIVATE
defaults {
polling_interval 5
no_path_retry fail
user_friendly_names no
flush_on_last_del yes
fast_io_fail_tmo 5
dev_loss_tmo 30
max_fds 4096
<VirtualHost *:<%=@rev_port-%><%#81%>>
<IfModule headers_module>
Header append WebBox "<%=@node_short_name-%><%- if @conf_type == 'ssl_compat' -%>_ssl_compat<%- end -%>"
</IfModule>
ServerName <%=@web_external_url-%>
<%- if defined? @server_alias and @server_alias != "" -%>
node default {
}
node '1.customer1.com' {
class {
'deployment_server':
apache_clubs => [ 'thing1', 'thing2' ],
ec_url => 'cheapthing1.customer1.com',
@Zordrak
Zordrak / update
Created June 20, 2014 12:25
/home/git/repositories/tools/clubs-deploy.git/hooks/update -> /home/git/gitlab-shell/hooks/update
#!/usr/bin/env ruby
# This file was placed here by GitLab. It makes sure that your pushed commits
# will be processed properly.
# You can add your own hooks to this file, but be careful when updating gitlab-shell!
# Added for debug
puts RUBY_VERSION
refname = ARGV[0]