-
Using the help flag
bash example.sh -h Usage: bash example.sh -n Willy --gender male -a 99 --person_name | -n [Willy] What is your name? --age | -a [Required] --gender | -g [Required]
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
# GOOD | |
FROM python:3.9.1-slim as build | |
# Upgrade pip and then install build tools | |
RUN pip install --upgrade pip && \ | |
pip install --upgrade wheel setuptools wheel check-wheel-contents | |
### Consider the comments as commands | |
# Copy and install requirements - better caching |
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
# BAD - Not that bad, but it could be better | |
FROM python:3.9.1-slim | |
# Upgrade pip and then install build tools | |
RUN pip install --upgrade pip && \ | |
pip install --upgrade wheel setuptools wheel check-wheel-contents | |
# Copy and install requirements - better caching | |
COPY requirements.txt /code/ |
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
# GOOD | |
# Copy and install requirements - only if requirements.txt was changed | |
COPY requirements.txt /code/ | |
RUN pip install --user -r "requirements.txt" | |
# Copy everything from the build context | |
COPY . /code/ |
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
# BAD | |
# Copy everything from the build context | |
COPY . /code/ | |
# Install packages - on any change in the source-code | |
RUN pip install --user -r "requirements.txt" |
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 Groups Tagging API | |
GoLang SDK Docs: https://docs.aws.amazon.com/sdk-for-go/api/service/resourcegroupstaggingapi/ | |
The package resourcegroupstaggingapi provides the client and types for making API requests to AWS Resource Groups Tagging API. | |
This example was written especially for GoLang newcomers (like me). | |
Scenario: Getting all resources ARNs which are tagged with "APP_NAME = api-group" | |
Given: There are two resources that are tagged with "APP_NAME=api-group", both are S3 buckets | |
### |
-
Using the help flag
bash example.sh -h Usage: bash example.sh -n Willy --gender male -a 99 --person_name | -n [Willy] What is your name? --age | -a [Required] --gender | -g [Required]
-
Using the help flag
bash example.sh -h Usage: bash example.sh -n Willy --gender male -a 99 --person_name | -n [Willy] What is your name? --age | -a [Required] --gender | -g [Required]
-
Using the help flag
bash example.sh -h Usage: bash example.sh -n Willy --gender male -a 99 --person_name | -n [Willy] What is your name? --age | -a [Required] --gender | -g [Required]
#!/bin/bash
source bargs.sh "$@"
echo -e \
"Name:~$person_name\n"\
"Age:~$age\n"\
"Gender:~$gender\n"\
"Location:~$location" | column -t -s "~"