Skip to content

Instantly share code, notes, and snippets.

@unloadedroe
unloadedroe / iterm2-solarized.md
Created September 10, 2016 12:46 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)

Solarized

@unloadedroe
unloadedroe / fix-homebrew-npm.md
Created December 21, 2017 21:14 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@unloadedroe
unloadedroe / docker-easy-commands.md
Last active March 9, 2018 12:45
Remove image based on repository name

Docker easy commands

Images

Remove

Remove image based on repository name

docker rmi $(docker images --format '{{.Repository}}' | grep 'imagename')
@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]}}
@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 / 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 / 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 / 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 / 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
######################
# Create The Cluster #
######################
# Make sure that your minikube version is v0.26 or higher
minikube start \
--vm-driver virtualbox \
--cpus 2 \
--memory 2048