Skip to content

Instantly share code, notes, and snippets.

View ScreamingHawk's full-sized avatar
🦄
Making magic

Michael Standen ScreamingHawk

🦄
Making magic
View GitHub Profile

Keybase proof

I hereby claim:

  • I am screaminghawk on github.
  • I am screaminghawk (https://keybase.io/screaminghawk) on keybase.
  • I have a public key ASBocdkH6yDRUr8O7tuZvA3kj3rxhX6MXPk7tEZnLM2cxQo

To claim this, I am signing this object:

@ScreamingHawk
ScreamingHawk / create_admin.template
Created September 26, 2017 23:52
AWS CloudFormation Template for creating an Admin user with a Password and Access Key
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"AdminName": {
"NoEcho": "false",
"Type": "String",
"Description": "New admin account name",
"MinLength": "1",
"MaxLength": "41",
"AllowedPattern": "[a-zA-Z0-9]*",
@ScreamingHawk
ScreamingHawk / humanifyArray.js
Last active June 1, 2017 22:54
Convert Javascript array into human readable list
function humanifyArray(arr, lastWord){
if (!arr || arr.length === 0){
// Return an empty string for blank arrays
return ''
} else if (arr.length == 1){
// Return the sole array item if only 1 item
return arr[0]
}
// Duplicate array to prevent modification issues
arr = arr.slice(0)

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ScreamingHawk
ScreamingHawk / json-to-swagger-definition.py
Created April 4, 2017 19:46
Convert a JSON file to a Swagger Definition
import sys
import json
def eexit(message):
"""Print a message and exit."""
print(message)
exit(1)
def convert(inFile, outFile):
"""Convert the JSON file to swagger YAML."""