\d+
- only numbers
.+
- any value
For example:
Api path like /v1/projects/{project-key}/test-runs/{test-run-key}/steps/{step-number}/attachments
in kong
/v1/projects/.+/test-runs/.+/steps/\d+/attachments$
This file contains 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 | |
# This script lists all objects in a specified AWS S3 bucket that were moved to the GLACIER storage class within a specified number of days ago. | |
# Usage: ./show_obgects_moved_to_glacier.sh your-bucket-name aws-profile days_ago | |
# Get the arguments | |
bucket="$1" | |
profile="$2" | |
days_ago="$3" | |
# Set the page size for pagination |
This file contains 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
AWSTemplateFormatVersion: '2010-09-09' | |
Description: >- | |
CloudFormation template for Global Accelerator with Listeners port 443 and Endpoints to exist ALB. | |
Exist ALB Arn is fettched by Lambda. | |
Finaly, we updating Dns recoord for domain to point to the Global Accelerator. | |
# ------------------------------------------------------------# | |
# Input Parameters | |
# ------------------------------------------------------------# | |
Parameters: |
This file contains 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
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: Serverless patterns - Amazon API Gateway REST API with VPC Link integration | |
Parameters: | |
usecase: | |
Description: What environment should be deployed | |
Type: String | |
AllowedValues: | |
- "prod" |
This file contains 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
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: 'Amazon EKS VPC - Private and Public subnets' | |
Parameters: | |
usecase: | |
Description: Which account are you deploying in? | |
Type: String | |
AllowedValues: | |
- 'prod' |
This file contains 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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: Setup ElasticCache. | |
Parameters: | |
PrimaryAvailabilityZone: | |
Description: Primary Availability Zone | |
Type: String | |
Default: "us-east-1a" | |
ReplicaAvailabilityZone1: |
This file contains 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
# docker-compose.yml | |
version: '3' | |
services: | |
server: | |
image: postgrest/postgrest | |
ports: | |
- "3000:3000" | |
environment: | |
PGRST_DB_URI: postgres://app_user:password@db:5432/app_db |
This file contains 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
``` | |
- mkdir -p ~/.ssh | |
- | | |
cat <<'EOF' >> /root/.ssh/id_rsa | |
-----BEGIN OPENSSH PRIVATE KEY----- | |
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn | |
....... | |
Ql5XBc4URDIP4ttLefoiQqTlQ44jhsvNQew0Y6nWW8FGbAboJ8aBNKtmREEXBGTImds5dg | |
2Vtten/iK+Qh0AAAAabWFyYXRzdHJlbGV0c0BNQlAwMDIubG9jYWwB | |
-----END OPENSSH PRIVATE KEY----- |
This file contains 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
Example of replacing "tag" in helm values.yaml file in CodeBuild | |
``` | |
# VALUE for tag in values.yaml is tag: "121212" | |
# NEW_TAG = 131313 | |
# YAML_FILE = values.yaml | |
- "OLD_TAG=$(cat $YAML_FILE | grep -P 'tag:' | awk -F: '{ print $2 }' | sed 's/[\",]//g' | sed -e 's/^[[:space:]]*//')" | |
- echo OLD_TAG=$OLD_TAG | |
- sed -i "s|${OLD_TAG}|${NEW_TAG}|g" $YAML_FILE | |
- cat $YAML_FILE | grep tag | |
``` |
This file contains 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
### Tested on | |
GKE Version 1.18.12-gke.1210 | |
EKS Version 1.19 | |
With TestProject Agent => v0.66.4 | |
This yaml snippet spins up 3 deployments: |