Skip to content

Instantly share code, notes, and snippets.

View gregplaysguitar's full-sized avatar

Greg Brown gregplaysguitar

View GitHub Profile
@outofcoffee
outofcoffee / find-ecr-image.sh
Last active March 1, 2024 13:35
Check if Docker image exists with tag in AWS ECR
#!/usr/bin/env bash
# Example:
# ./find-ecr-image.sh foo/bar mytag
if [[ $# -lt 2 ]]; then
echo "Usage: $( basename $0 ) <repository-name> <image-tag>"
exit 1
fi
IMAGE_META="$( aws ecr describe-images --repository-name=$1 --image-ids=imageTag=$2 2> /dev/null )"
@nir0s
nir0s / strigo-deploy-dev-env.sh
Last active July 18, 2019 20:03
Strigo's Development Environment Provisioning Script
#!/usr/bin/env bash
###
# The script uses CFN to provision a Target Group in the app-dev ALB, and creates
# an instance behind that target group, after which it attaches two host-header
# based rules to the HTTP/HTTPS listeners which target the newly created target group.
# After the stack is up, it installs the relevant Strigo app, ssc and job-worker builds
# on it for the relevant branch.
#
# NOTE: AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must be set prior to running this.
@nicolashery
nicolashery / solarized-dark.css
Last active March 25, 2022 08:38 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@efedorenko
efedorenko / gist:2028193
Created March 13, 2012 11:22
Function for alpha blending
// Turns out this function already exists in Sass: mix(fg, bg, %) (http://d.pr/mGqa)
// Alpha blending
@function blend($bg, $fg) {
$r: red($fg) * alpha($fg) + red($bg) * (1 - alpha($fg));
$g: green($fg) * alpha($fg) + green($bg) * (1 - alpha($fg));
$b: blue($fg) * alpha($fg) + blue($bg) * (1 - alpha($fg));
@brehaut
brehaut / populate.py
Created June 28, 2011 23:18
Script to generate a mock directory of media based on a listing
"""populate.py
This script takes a listing of folders and filenames (as generated by `ls -R > listing`) on standard input
and the pathname for a set of media as the argument to argv.
e.g:
python populate.py _source < test/listing.txt
The files listed in listing are then mocked from the media files using the filenames in the input, and