Skip to content

Instantly share code, notes, and snippets.

Brandon Galbraith brandongalbraith

  • North America
Block or report user

Report or block brandongalbraith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View _MicroService Proxy Gateway

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

brandongalbraith / gist:8453fc83e52e82b92792c8d322f44de6
Created Jan 26, 2019 — forked from garyrh/gist:2a373cc5a097433471fa
Shell function that returns how many captures the Wayback Machine lists for a page/domain
View gist:8453fc83e52e82b92792c8d322f44de6
function ia-check() {
echo $(curl -s -m60 "*/$(echo "$*" | sed 's# #%20#g;s#/$#/\*#')" |
head -c10KB |
grep -m1 -Poi "(Saved <strong>\d+ time(s)?)|((\d+,)*\d+ URLs have been captured for this domain)|(Page cannot be crawled or displayed due to robots\.txt)|(This URL has been excluded from the Wayback Machine)|(Wayback Machine doesn&apos;t have that page archived)|(504 Gateway Time-out)" |
sed "s#&apos;#'#g;s#<strong>##")
import os
import getpass
import boto3
os.environ['AWS_ACCESS_KEY_ID'] = ... # your accounts access key
os.environ['AWS_SECRET_ACCESS_KEY'] = ... # your accounts secret
client = boto3.client("sts")
token = getpass.getpass("Enter MFA token -> ")
# Exchange permanent key/secret for temporary ones
brandongalbraith /
Created Nov 6, 2018 — forked from jasonrdsouza/
Export archived article data from Pocket
'''This script can be used to export data from Pocket (
Uses include migrating to a different "read it later" service, saving
specific articles to another service, backing up your reading history,
and more.
Currently it can be used to export links and metadata for archived
articles with a given tag, which are more recent than a given timestamp.
An example use case is to export all articles you have tagged as
"to-export", which are newer than 10 days old. The timestamp functionality
brandongalbraith / detect-private-browsing.js
Created Apr 3, 2018 — forked from cou929/detect-private-browsing.js
Detect private browsing mode (InPrivate Browsing or Incognito).
View detect-private-browsing.js
function retry(isDone, next) {
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false;
var id = window.setInterval(
function() {
if (isDone()) {
if (current_trial++ > max_retry) {
brandongalbraith / aws-s3-bucket-policy-tls-kms-enforcement.json
Last active Mar 8, 2018
AWS S3 Bucket Policy: Require TLS for data transport, enforce object encryption using any KMS key
View aws-s3-bucket-policy-tls-kms-enforcement.json
"Version": "2012-10-17",
"Id": "PolicyIdentifierGUIDgoesHere",
"Statement": [{
"Action": "s3:*",
"Effect": "Deny",
"Principal": "*",
"Resource": "arn:aws:s3:::<bucketname>",
"Condition": {
"Bool": {
# Install
# curl | bash
# Instructions
sudo apt-get -y update # apt likes to be fresh
sudo apt-get -y install libav-tools ffmpeg python3-pip git jq # tubeup deps
brandongalbraith /
Created Feb 20, 2018 — forked from zmwangx/
Python script to download entire photosets (original quality) on Flickr. #flickr
#!/usr/bin/env python
import subprocess
import sys
# pip install flickrapi
# project home:
import flickrapi
api_key = '00000000000000000000000000000000' # obtain your api key at
brandongalbraith /
Created Jan 14, 2018 — forked from jnschulze/
Move Chrome, Safari and iTunes Cache to Ramdisk.
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB
#DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://1572864`
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://2097152`
/usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK
View street-sweeper
#!/usr/bin/env bash
# Clean up an instance so packer can bake an AMI from it.
# Copyright 2017, Jiff Inc
# License: Apache 2.0
set -o pipefail
if [ ! -z "${DEBUG}" ]; then
You can’t perform that action at this time.