Skip to content

Instantly share code, notes, and snippets.

View qmcree's full-sized avatar

Quentin McRee qmcree

View GitHub Profile
@qmcree
qmcree / ecr_auth.sh
Last active July 19, 2018 20:00
Authenticates to ECR without exposing password to other processes.
#!/bin/bash -e
AWS_ACCOUNT=
AWS_REGION=us-east-1
ECR_URL=https://${AWS_ACCOUNT}.dkr.ecr.${AWS_REGION}.amazonaws.com
# On Mac, replace "base64 -d" with "base64 -D".
aws ecr get-authorization-token --query authorizationData[].authorizationToken --output text | base64 -d | cut -d: -f2 \
| docker login -u AWS --password-stdin ${ECR_URL} \
|| echo "Failed to authenticate to ECR." && exit 1
@qmcree
qmcree / .bash_profile
Created August 30, 2016 05:47
Mac shortcuts for Bash embedded terminal in Jetbrains IDE's (PhpStorm, PyCharm, etc)
export INPUTRC=~/.inputrc
application {
name = "booker"
type = "python"
dependency {
source = "github.com/hashicorp/otto/examples/postgresql"
}
}
customization {
@qmcree
qmcree / l4_raw_output_regex.txt
Last active September 16, 2015 21:10
Regular expression that matches all references to raw-output Blade directives in Laravel 4. I needed it for replacing them to the new raw output directive in Laravel 5.
(?<!\{)\{\{(?!\{|--)(.+)(?<!\}|--)\}\}(?!})