I hereby claim:
- I am DanyC97 on github.
- I am danyc97 (https://keybase.io/danyc97) on keybase.
- I have a public key whose fingerprint is 9877 6060 14EA 006E A062 22A2 19C5 1144 19FC 78AD
To claim this, I am signing this object:
# | |
# 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 |
function decode-authorization-failure-message { | |
if [ $# -ne 1 ] || [ "$1" = -h ] || [ "$1" = --help ]; then | |
cat <<'EOT' | |
Usage: decode-authorization-failure-message <message> | |
Use this when Amazon gives you an "Encoded authorization failure message" and | |
you need to turn it into something readable. | |
EOT | |
return 1 | |
fi |
# shortform git commands | |
alias g='git' | |
# pretty tab'd git log | |
git log --graph --pretty="tformat:%h*(%ar)*<%an>*%d %s" $* | sed -Ee 's/(^[^<]*) ago\)/\1)/' | sed -Ee 's/(^[^<]*), [[:digit:]]+ .*months?\)/\1)/' | column -s '*' -t | cat | |
# change author of all git repos | |
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='yourname'; GIT_AUTHOR_EMAIL='[email protected]'; GIT_COMMITTER_NAME='yourname'; GIT_COMMITTER_EMAIL='[email protected]';" HEAD; | |
# stage only deleted files |
I hereby claim:
To claim this, I am signing this object:
The security group and Network ACLs parts of CloudFormation templates can be difficult to read. This template containing Jinja macros converts easier-to-read YAML dictionaries of security group and NACL rules into JSON.
Here ais a generic macro template and some example files showing how to use it.
Documenting this here, as I often forget (what I have found) is the best way to do this at the moment.
For example, you have a list of two existing security groups given to a stack and wish to create (and use) a third - attaching all to an ALB:
AWSTemplateFormatVersion: "2010-09-09"
Description: "Example template"
Parameters: