Skip to content

Instantly share code, notes, and snippets.

View tanji's full-sized avatar

Guillaume Lefranc tanji

View GitHub Profile
@simlated
simlated / remove-s3-objects-by-date.sh
Last active May 6, 2024 15:03
Remove objects from an AWS s3 bucket if last modified date is egual or before a given date.
#!/bin/bash
# usage: ./remove-s3-objects-by-date.sh bucket_name min_date
# min_date parameter must be in YYYY-MM-DD format
if [ "$1" = "" ]; then
echo "Missing bucket name. Usage:./remove-s3-objects-by-date.sh bucket_name min_date"
exit 1
fi
if [ "$2" = "" ]; then
@Stanback
Stanback / nginx.conf
Last active July 24, 2024 18:44 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which