I hereby claim:
- I am cruftyoldsysadmin on github.
- I am cruftyold (https://keybase.io/cruftyold) on keybase.
- I have a public key ASAw1b89MQEorjvS9Dn6j8x1md7c-u6nGuY923pZnNVYOwo
To claim this, I am signing this object:
{ | |
"basics": { | |
"name": "Michael T. Halligan", | |
"label": "Infrastructure as Code & DevOps Engineer", | |
"location": { | |
"city": "Istanbul", | |
"timezone": "UTC+3" | |
}, | |
"email": "[email protected]", | |
"profiles": [ |
# CloudWatch Log Group metric filters for driftctl-slack. | |
module "filter" { | |
for_each = var.cloudwatch_log_filters | |
source = "terraform-aws-modules/cloudwatch/aws//modules/log-metric-filter" | |
version = "3.3.0" | |
log_group_name = local.aws_cloudwatch_log_group | |
metric_transformation_name = each.key | |
metric_transformation_namespace = "drifctl.scan" | |
metric_transformation_value = var.cloudwatch_log_filters[each.key].metric_value |
I hereby claim:
To claim this, I am signing this object:
// Initialize two arrays | |
ary1 = [] | |
ary2 = [] | |
// Iterate over each array | |
for ary in [ary1, ary2] { | |
// Set initial value of counter to 0 for an array index | |
count = 0 | |
// Do this 1000 times |
variable "route53_records_logshell" { | |
description = "logshell.io records" | |
type = map(object({ | |
name = string | |
ttl = number | |
records = list(string) | |
type = string | |
})) | |
default = { |
#!/usr/bin/env python2.7 | |
""" | |
Usage: {prog} --user username \ | |
--password password \ # Either password or Passfile is required | |
--passfile /etc/rabbitmq/secret \ | |
--url http://localhost:15672/api/nodes/rabbitmq@dev-rmq-01 \ | |
--metric partitions \ | |
--metricname displayname.of.metric (optional)\ | |
--debug (optional) |
#!/usr/bin/env python | |
# pw_push() Pushes password to pwpush.com | |
# | |
def pw_push(password): | |
pwp_token = requests.post('https://pwpush.com/p.json', data = | |
{ | |
'password[payload]' : password, | |
'password[expire_after_day]' : 5, | |
'password[expire_after_views]' : 5, |
#!/usr/local/bin/python2 | |
import argparse | |
import json | |
import os | |
import pprint | |
import random | |
import re | |
import requests | |
import string |
If you have ever done *anything* with Puppet templates, you know how ugly it is to debug. | |
This Gist will help improve debugging and reduce guesswork. The main problem I always run into when debugging | |
ERB templates is grokking variable access. | |
I have included two code snippets: | |
- erb-dump.pp # Puppet manifest | |
- erb-dump.yaml.erb # ERB template to dump the entire namespace available to the template to /tmp/erb-dump.yaml | |
- erb-dump.rb # loads the yaml dump into a usable ruby hash |
#!/usr/bin/env ruby | |
# | |
require 'net/http' | |
require 'json' | |
apiKey ='APIKEYHERE' | |
params = { :apikey => apiKey } | |
instances = {} | |
counter = 0 |