Skip to content

Instantly share code, notes, and snippets.

View brodygov's full-sized avatar

Andy Brody brodygov

View GitHub Profile
#!/usr/bin/env bash
set -eu
# shellcheck source=/dev/null
. "$(dirname "$0")/lib/common.sh"
usage() {
cat >&2 <<EOM
Usage: $0 [OPTIONS...] <bucket_name> <state_file_path> <terraform_dir> <region> <dynamodb_table>
#!/usr/bin/env bash
set -euo pipefail
# shellcheck source=/dev/null
. "$(dirname "$0")/lib/common.sh"
# Directory where we will install terraform
TERRAFORM_DOT_D="${TERRAFORM_DOT_D-}"
if [ -z "$TERRAFORM_DOT_D" ]; then
#!/usr/bin/env ruby
require 'scrypt'
def usage
puts <<-EOM
usage: #{File.basename($0)} N r p [rounds]
Benchmark a single set of scrypt parameters
N, r, p: scrypt parameters in base 10
rounds: number of trials to perform
#!/bin/bash
set -euo pipefail
usage() {
cat >&2 <<EOM
usage: $(basename "$0") COMMON_NAME
Generate saml certificate and key in the current directory for COMMON_NAME.
For example:
#!/bin/bash
set -eu
run() {
echo >&2 "+ $*"
"$@"
}
if [ $# -lt 2 ]; then
cat >&2 <<EOM
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'bundler/setup'
require 'date'
require 'json'
require 'rest-client'
DefaultStart = '10:30 AM'
@brodygov
brodygov / repo_cloner.rb
Created February 7, 2019 20:31
Ruby code for cloning a repo via SSH to a temporary directory
# frozen_string_literal: true
require 'fileutils'
require 'logger'
require 'tempfile'
require 'tmpdir'
require 'octokit'
require 'subprocess'
#!/usr/bin/env ruby
# Copy a list of issues from one repository to another.
require 'date'
require 'yaml'
require 'pp'
require 'json'
require 'rest-client'
@brodygov
brodygov / AB ish.fwt
Created October 12, 2018 18:24
AB Focuswriter theme (gzip the file and rename to .fwtz to import)
[General]
LoadColor=#000000
Name=AB ish
[Background]
Color=#000000
ImageFile=
Type=0
[Foreground]
#!/usr/bin/env python3
import os
import sys
import zipfile
import requests
def main(argv):