Skip to content

Instantly share code, notes, and snippets.

View undeadops's full-sized avatar

Mitch Anderson undeadops

View GitHub Profile
@undeadops
undeadops / watchdns-nginx.py
Created January 3, 2019 01:33
Watch upstream dns entries for changes, reload nginx based on changes
#!/usr/bin/env python
# Watch for DNS changes for heroku
import logging
from logging.handlers import SysLogHandler
import socket
import os
import yaml
import sys
import argparse
@undeadops
undeadops / traefik-alb.tf
Created April 15, 2020 23:55
Kubernetes ALB + Traefik Daemon Set Ingress Controller
// Traefik Ingress controller ALB
resource "aws_lb" "traefik" {
name = "traefik-alb"
internal = false
load_balancer_type = "application"
security_groups = [aws_security_group.traefik-ingress.id]
subnets = data.terraform_remote_state.vpc.outputs.vpc-public-subnets
enable_deletion_protection = true
enable_cross_zone_load_balancing = false
" Flash screen instead of beep sound
" set visualbell
" Change how vim represents characters on the screen
set encoding=utf-8
" Set the encoding of files written
set fileencoding=utf-8
" Color scheme
@undeadops
undeadops / index.ts
Last active July 29, 2022 22:19
pulumi - create inline iam policy
const kmsArns: pulumi.Output<string>[] = [];
config.get('kmsKeys').forEach((keyArgs: KmsKeyConfig) => {
const kms = new KmsKeys({
env: config.get('env'),
...keyArgs,
});
kmsArns.push(kms.arn);
});
const kmsInlinePolicy = pulumi.all(args.kmsKeys).apply((kmsKeys) => {