A collection of ZSH aliases for executing various SDK CLIs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @description: Handler entry point. | |
| * - Note AWS CloudFront Functions use a modified ECMAScript 5.1 compatible runtime and NOT NodeJS. | |
| * - Use var, not const or let | |
| * - Use string concatenation and not template literals | |
| * - Beware that the CloudFront Functions Console editor and test environment do NOT mimic CloudFront 100% | |
| * @date 2022-01-26 | |
| * @param {object} event: A CloudFront Function event (expecting a Viewer Request event) | |
| * @return {object}: A CloudFront response or request object (depends whether conditions allow pass through or 301 redirect) | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (cors) { | |
| @origin{args.0} header Origin {args.0} | |
| header @origin{args.0} Access-Control-Allow-Origin "{args.0}" | |
| } | |
| sub.domain.com { | |
| reverse_proxy 127.0.0.1:3000 | |
| header Access-Control-Allow-Methods * | |
| header Access-Control-Allow-Headers content-type | |
| header Access-Control-Allow-Credentials true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "pages": { | |
| "/products/product-1.xml": { | |
| "title": "Product One", | |
| "summary": "A short summary of this product", | |
| "detail": "Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum", | |
| "price": "$9.99", | |
| "modelName": "product-summary" | |
| }, | |
| "/products/product-2.xml": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A simple way of aliasing short project names to deeper working directories. | |
| # - If you work on multiple machines and keep the same directory layout then this becomes very useful | |
| # | |
| # 1. Create a secret gist called joy.json that looks something like the following. Use your own meaningful project names and create as many entries as you need | |
| # | |
| # { | |
| # "bookmarks": { | |
| # "project1": "/full/path/to/the/project1/directory", | |
| # "project2": "/full/path/to/the/project2/directory, | |
| # } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ######################################################################################################################### | |
| # branch.sh is used, with arguments, to create a new branch from main that uses a slugified ADO ticket number and title # | |
| ######################################################################################################################### | |
| # Exit immediately if a command exits with a non-zero status | |
| set -o errexit | |
| # Treat unset variables as an error when substituting | |
| set -o nounset | |
| # Fails entire pipeline if any command fails |
To reset all changes after the last commit in git, you can use the following commands:
OlderNewer