Skip to content

Instantly share code, notes, and snippets.

@unloadedroe
unloadedroe / Test Event
Created October 4, 2018 12:19 — forked from iammuho/Test Event
Password Generator Lambda Function
To Encrypt:
{
"StackId": "a",
"RequestId": "b",
"PhysicalResourceId": "c",
"LogicalResourceId": "e",
"RequestType": "create",
"ResourceProperties": {
"PasswordLength": 20,
"KeyId": "KEYID",
@unloadedroe
unloadedroe / .zshrc
Created September 23, 2018 19:46 — forked from dwchiang/.zshrc
gcloud with zsh
# The next line updates PATH for the Google Cloud SDK.
source /Users/dwchiang/google-cloud-sdk/path.zsh.inc
# The next line enables zsh completion for gcloud.
source /Users/dwchiang/google-cloud-sdk/completion.zsh.inc
@unloadedroe
unloadedroe / 1_kubernetes_on_macOS.md
Created September 17, 2018 14:42 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

######################
# Create The Cluster #
######################
# Make sure that your minikube version is v0.26 or higher
minikube start \
--vm-driver virtualbox \
--cpus 2 \
--memory 2048
@unloadedroe
unloadedroe / 01-sts.sh
Created September 13, 2018 16:17 — forked from vfarcic/01-sts.sh
git clone \
https://github.com/vfarcic/k8s-specs.git
cd k8s-specs
# Create a Kubernetes cluster
cat sts/jenkins.yml
# Only if minishift
@unloadedroe
unloadedroe / lambda-concurrent.sh
Created August 28, 2018 11:06 — forked from smithclay/lambda-concurrent.sh
Concurrently execute a lambda function for warming purposes
#!/bin/bash
# This attempts to concurrently execute an AWS Lambda function. WIP.
# After execution, roughly NUM_EXECUTION containers will be ready
# to accept requests.
# More advanced strategies are out there. Check out @lambdacult on twitter, for example.
AWS_LAMBDA_FUNCTION_NAME=LambdaInfo
NUM_EXECUTIONS=3
@unloadedroe
unloadedroe / ngrxintro.md
Created July 25, 2018 10:06 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@unloadedroe
unloadedroe / S3-Static-Sites.md
Created June 12, 2018 13:16 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

@unloadedroe
unloadedroe / aws-ssh-config-multiple-users
Created April 25, 2018 07:24 — forked from justinpawela/config
AWS CodeCommit Multiple Account Config
# This file is: ~/.ssh/config
# You may have other (non-CodeCommit) SSH credentials stored in this
# config file – in addition to the CodeCommit settings shown below.
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file!
# Credentials for Account1
Host awscc-account1 # 'awscc-account1' is a name you pick
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region
@unloadedroe
unloadedroe / parse_yaml.sh
Created March 9, 2018 08:50 — forked from pkuczynski/LICENSE
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}