Skip to content

Instantly share code, notes, and snippets.

Noah Coad noahcoad

Block or report user

Report or block noahcoad

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
@noahcoad
noahcoad / event_2019-05-24_aws_python_chalice_intro_dallas_makerspace.md
Last active May 31, 2019
Event 2019-05-24: AWS w Python and AWS Chalice Intro at Dallas Makerspace
View event_2019-05-24_aws_python_chalice_intro_dallas_makerspace.md

AWS Intro w Python

Taught by Noah Coad, Senior IoT Architect at AWS
at the Dallas Makerspace on 2019-05-24 and 2019-06-27

Overview

Amazon Web Services (AWS) provides essential building blocks to creating your own applications. Like code in the cloud (AWS Lambda), image recognition detection (AWS Rekognize), database (AWS DynamoDB), file storage (S3), etc. Through this course you'll get started on combining 6 of these AWS services together to build a cloud app that you can submit an image to, store it, detect elements in the image, store those in a database, and manage it all through a REST API. We'll be using a Python framework for AWS called AWS Chalice, which makes coding, connecting, testing, and deploying these compon

@noahcoad
noahcoad / easily-switch-accounts-in-aws.md
Last active Jun 18, 2019
Easily Switch Accounts in AWS with Role Switcher
View easily-switch-accounts-in-aws.md

Easily Switch Accounts in AWS

When working with multiple AWS accounts, it can be a pain to keep signing out and signing back in. I work with a number of accounts, my own, customer accts, burner accts, etc. It was a pain to keep logging in and out of the AWS Console. Thankfully the AWS Console has a "Role Switcher" that lets you quickly switch between accounts built-in. It does this by assuming a role from another account. Here's how to set that up...


TL;DR

Assuming you have a primary and new AWS accounts

@noahcoad
noahcoad / readme.md
Last active May 30, 2019
New Computer Setup
View readme.md

New Computer Setup for Mac

The steps I use to restore a new mac

Restoring

# Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# OSX App Store Purchases (xcode, keynote, etc)
# OSX Preferences: keyboard speed, three-finger drag, dock, desktop icons
@noahcoad
noahcoad / install-aws-greengrass-dependencies-java-node.md
Last active May 7, 2019
Install java and nodejs for AWS Greengrass
View install-aws-greengrass-dependencies-java-node.md

How to install the java and nodejs dependencies for AWS Greengrass

Greengrass v1.7 specifically supports Java 8 and NodeJS 6.10, and it requires the binaries be in the PATH and a specific file name.

On an Amazon Linux 2 AMI EC2 Instance

# install java
sudo yum install -y java-1.8.0-openjdk
View upgrade-osx-mac-bash.md

Upgrade bash on OSX

Due to GPL limitations, OSX ships with bash v3.2.57. As of writing this the current version is bash v5.0.2. bash v4 and beyond support unicode characters, and much more.

Check current bash version with:

echo $BASH_VERSION

To upgrade use Homebrew

@noahcoad
noahcoad / readme.md
Last active May 13, 2019
Code Minecraft with Python on Mac OSX
View readme.md

Code Minecraft with Python on Mac OSX

Here's a step-by-step to get started scripting Minecraft with Python on Mac OSX

@noahcoad
noahcoad / color_scheme_additions.xml
Last active Oct 11, 2018
Custom Sublime Text Text File Coloring
View color_scheme_additions.xml
<dict>
<key>name</key>
<string>Noah Text: header</string>
<key>scope</key>
<string>plaintxt.header</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#a6e22e</string>
</dict>
@noahcoad
noahcoad / get_serial.py
Created Jun 22, 2018
Get the hardware serial number for Raspberry Pi or Mac in Python 3.6
View get_serial.py
import platform, re, subprocess, os.path, logging;
log = logging.getLogger('simple_example')
log.setLevel(logging.INFO)
# get local system serial identifier
# tested for Raspberry Pi and Mac OSX
def get_serial():
log.info("getting serial number")
ptn = None
@noahcoad
noahcoad / json2yaml.py
Last active Sep 10, 2018
Python to convert json to yaml
View json2yaml.py
#!/usr/bin/env python3
# convert json to yaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# python3 json2yaml.py < ~/code/manpow/moneybug/mbuploader/support/offices.json
# gist https://gist.github.com/noahcoad/46909253a5891af3699580b8f17baba8
import yaml, json, sys
sys.stdout.write(yaml.dump(json.load(sys.stdin)))
@noahcoad
noahcoad / yaml2json.py
Last active Oct 5, 2018
Python to Convert yaml to json
View yaml2json.py
# convert yaml to json
# pip3 install pyyaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# py3 yaml2json.py < ~/code/manpow/homeland/heartland/puphpet/config.yaml
# gist https://gist.github.com/noahcoad/51934724e0896184a2340217b383af73
import yaml, json, sys
sys.stdout.write(json.dumps(yaml.load(sys.stdin), sort_keys=True, indent=2))
You can’t perform that action at this time.