Skip to content

Instantly share code, notes, and snippets.

View aaronrea's full-sized avatar
🦊

Aaron Rea aaronrea

🦊
View GitHub Profile
[python]
pyenv_version_name = true
[gcloud]
symbol = ''
style = "bold green"
format = 'on [$symbol ($project)]($style) '
[aws]
disabled = true
@aaronrea
aaronrea / tree.md
Created July 31, 2020 15:28 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@aaronrea
aaronrea / main.tf
Created July 28, 2020 20:45
Cloudknocking Terraform PoC
#########################
##
## variables
##
#########################
variable zone_id {}
variable region {
default = "us-east-1"
}
@aaronrea
aaronrea / Makefile
Created April 14, 2020 23:48 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
### Keybase proof
I hereby claim:
* I am aaronrea on github.
* I am aaronrea (https://keybase.io/aaronrea) on keybase.
* I have a public key ASAZi0_r7p4ZplczrfpeX7mST3690ua3KLR8mhruondcVwo
To claim this, I am signing this object:
import sys
import subprocess
import tempfile
import urllib
text = sys.stdin.read()
chart_url_template = ('http://chart.apis.google.com/chart?'
'cht=qr&chs=300x300&chl={data}&chld=H|0')
chart_url = chart_url_template.format(data=urllib.quote(text))