Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Markley alexmarkley

View GitHub Profile
@alexmarkley
alexmarkley / generateImageDerivatives.sh
Last active Sep 1, 2020
generateImageDerivatives.sh -- That Feeling When You Realize You Should Have Used A Higher-Level Language But You've Already Written Too Much Bash And You Can't Stop Now...
View generateImageDerivatives.sh
#!/bin/bash
set -o pipefail
# Requested image sizes describes the size breakpoints we will resize down to. Sizes larger than the input image are ignored.
REQUESTED_IMAGE_SIZES=(3840 2880 1920 1440 1280 1024 640 320 128 64)
# Manifest format version should be incremented only if the format changes enough that a client should not try to parse it.
MANIFEST_FORMAT_VERSION=1
# Manifest generation version should be incremented every time the derivative generation rules change (for example if REQUESTED_IMAGE_SIZES is updated or if the resampling algorithm changes) to force a regeneration of the derivatives even if the source image has not changed.
MANIFEST_GENERATION_VERSION=1
View keybase.md

Keybase proof

I hereby claim:

  • I am alexmarkley on github.
  • I am alexmarkley (https://keybase.io/alexmarkley) on keybase.
  • I have a public key ASCt7eou3beka-TE0R2Ii-3-dQMVF9Y6pQjQhq1h7dzLCQo

To claim this, I am signing this object:

@alexmarkley
alexmarkley / s3dl
Last active Sep 18, 2020
A minimal authenticated S3 download script using only Bash, Curl, and OpenSSL.
View s3dl
#!/bin/bash
# s3dl
# by Alex Markley; released under CC0 Public Domain
# https://creativecommons.org/publicdomain/zero/1.0/
# Hosted at: https://gist.github.com/alexmarkley/0b45af17fdc805756ac710aeaceb77be
# Example script demonstrating how to fetch a private AWS S3 Object using only basic shell scripting techniques.
#################
You can’t perform that action at this time.