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
| import { CfnElement, CfnResource, IAspect, Stack } from 'aws-cdk-lib'; | |
| import { IConstruct } from 'constructs'; | |
| export interface IdMap { | |
| [key: string]: string; | |
| } | |
| export class LogicalIdMapper implements IAspect { | |
| constructor(private idMap: IdMap) { | |
| } |
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
| #set ($keyValues = {}) | |
| #set($prarametersString = $input.body) | |
| #set($parameters = $prarametersString.split("&")) | |
| #foreach($parameter in $parameters) | |
| #set($keyValue = $parameter.split("=")) | |
| $keyValues.put($util.urlDecode($keyValue[0]),$util.urlDecode($keyValue[1])) | |
| #end | |
| { | |
| "TableName": "table_name", | |
| "Item": { |
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
| resource "aws_api_gateway_rest_api" "myApi" { | |
| name = "myApi-${var.env}" | |
| description = "My awesome API (${var.env} environment)" | |
| } | |
| resource "aws_api_gateway_deployment" "myApi" { | |
| depends_on = [ | |
| "aws_api_gateway_integration.myApi_myEndpoint_post", | |
| "aws_api_gateway_integration_response.myApi_myEndpoint_post", | |
| "aws_api_gateway_integration_response.myApi_myEndpoint_post_400", |
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
| URL="http://stackoverflow.com/" | |
| # store the whole response with the status at the and | |
| HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL) | |
| # extract the body | |
| HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g') | |
| # extract the status | |
| HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://') |
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
| #!/bin/bash | |
| # | |
| # git-mv-with-history -- move/rename file or folder, with history. | |
| # | |
| # Moving a file in git doesn't track history, so the purpose of this | |
| # utility is best explained from the kernel wiki: | |
| # | |
| # Git has a rename command git mv, but that is just for convenience. | |
| # The effect is indistinguishable from removing the file and adding another | |
| # with different name and the same content. |
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
| machine github.com | |
| login technoweenie | |
| password SECRET | |
| machine api.github.com | |
| login technoweenie | |
| password SECRET |