Skip to content

Instantly share code, notes, and snippets.

View bmacauley's full-sized avatar

Brian Macauley bmacauley

View GitHub Profile
@bmacauley
bmacauley / Makefile
Created April 21, 2018 19:53 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@bmacauley
bmacauley / sync.py
Created April 2, 2018 20:02 — forked from kennethreitz/sync.py
GitHub Syncer. Clones or Pulls all GitHub repos (including watched list).
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Kenneth Reitz's GitHub Syncer
This script uses the GitHub API to get a list of all forked, mirrored, public, and
private repos in your GitHub account. If the repo already exists locally, it will
update it via git-pull. Otherwise, it will properly clone the repo.
It will organize your repos into the following directory structure:
@bmacauley
bmacauley / Update Fork.md
Created February 28, 2018 22:26 — forked from seankross/Update Fork.md
Update a Github Fork from the Original Repo

Taken from here

Add remonte branch:

git remote add --track master mleung git://github.com/mleung/feather.git

Verify:

git remote

@bmacauley
bmacauley / Update Fork.md
Created February 28, 2018 22:26 — forked from seankross/Update Fork.md
Update a Github Fork from the Original Repo

Taken from here

Add remonte branch:

git remote add --track master mleung git://github.com/mleung/feather.git

Verify:

git remote

@bmacauley
bmacauley / run-transit-vpc-poller.py
Created February 8, 2018 21:08 — forked from vkhatri/run-transit-vpc-poller.py
Python Wrapper to Execute Transit VPC Poller Module for Testing
# Module Source - https://github.com/vkhatri/aws-transit-vpc/tree/feature-vrf
# Change Module Source accordingly, currently
import os
import ast
import logging
import sys
# symlink transit-vpc-poller.py module for import workaround
# ln -s transit-vpc-poller.py transit_vpc_poller.py
import transit_vpc_poller
@bmacauley
bmacauley / update-dns.py
Created June 24, 2017 16:36 — forked from mhjwork/update-dns.py
Dynamic DNS using AWS
#!/usr/bin/python
# Run this script as a cron job on a machine inside your network that is always on
# Prerequisites:
# - Python
# - boto3 module for AWS access
# - Route 53 DNS hosted zone that you use as the target
# - SNS topic to send notifications when the DNS is updated (IP changed)
#
@bmacauley
bmacauley / infra-secret-management-overview.md
Created March 26, 2017 10:01 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@bmacauley
bmacauley / convert_IAM_to_SES.py
Created March 19, 2017 12:08
an attempt to convert AWS IAM credentials to the SES sort as per the instructions found here: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html#Obtaining Amazon SES SMTP Credentials by Converting AWS Credentials
def hash_IAM(user_password):
#http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html
if DEBUG: debug_message("Hashing for IAM to SES values")
AWS_SECRET_ACCESS_KEY = user_password
AWS_MESSAGE = "SendRawEmail"
#in Python 2, str are bytes
signature = hmac.new(
key=AWS_SECRET_ACCESS_KEY,
@bmacauley
bmacauley / convert_IAM_to_SES.py
Created March 19, 2017 12:08
an attempt to convert AWS IAM credentials to the SES sort as per the instructions found here: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html#Obtaining Amazon SES SMTP Credentials by Converting AWS Credentials
def hash_IAM(user_password):
#http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html
if DEBUG: debug_message("Hashing for IAM to SES values")
AWS_SECRET_ACCESS_KEY = user_password
AWS_MESSAGE = "SendRawEmail"
#in Python 2, str are bytes
signature = hmac.new(
key=AWS_SECRET_ACCESS_KEY,
@bmacauley
bmacauley / README.md
Created July 31, 2016 19:21 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index: