Skip to content

Instantly share code, notes, and snippets.

@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@johnboxall
johnboxall / tinypng.sh
Created December 22, 2014 23:30
TinyPNG script.
# Usage:
# ./tinypng.sh <filename> <filename> <filename>
#
# Upload the files to shrink and then save them locally under the same name.
# Only works with JPEG and PNG.
#
# Uses the TinyPNG API: https://tinypng.com/developers/reference
# Inspired by this Gist: https://gist.github.com/s4l1h/553d00b71d4ab14c17d9
#
# TODO:
@kr
kr / jsonenv
Created August 6, 2013 00:59
convert a json dictionary into environment variables
#!/usr/bin/env python
# jsonenv reads a json object as input and produces
# escaped shell commands for setting environment vars
import json
import pipes
import sys
for k, v in json.load(sys.stdin).items():