| # Load the field 'Password' from the secret 'test/MySecret' from an AWS Secrets Manager secret | |
| PASSWORD="$(aws secretsmanager get-secret-value --secret-id 'test/MySecret' --query 'SecretString' --output text | jq -r '.Password')" | |
| echo "The password is '$PASSWORD'" | |
| # The password is 'MyP@55w0rd' |
| # Load the field 'Password' from the secret 'test/MySecret' from an AWS Secrets Manager secret | |
| PASSWORD="$(aws secretsmanager get-secret-value --secret-id 'test/MySecret' --query 'SecretString' --output text | jq -r '.Password')" | |
| echo "The password is '$PASSWORD'" | |
| # The password is 'MyP@55w0rd' |
| var readline = require('readline'); | |
| readline.emitKeypressEvents(process.stdin); | |
| if (process.stdin.isTTY) | |
| process.stdin.setRawMode(true); | |
| process.stdin.on('keypress', (chunk, key) => { | |
| if (key && key.name == 'q') | |
| process.exit(); |
| """ | |
| Single Responsibility Principle | |
| ββ¦You had one jobββββLoki to Skurge in Thor: Ragnarok | |
| A class should have only one job. | |
| If a class has more than one responsibility, it becomes coupled. | |
| A change to one responsibility results to modification of the other responsibility. | |
| """ | |
| class Animal: | |
| def __init__(self, name: str): |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker startSteps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
This is not an exhaustive list of all interfaces in Go's standard library.
I only list those I think are important.
Interfaces defined in frequently used packages (like io, fmt) are included.
Interfaces that have significant importance are also included.
All of the following information is based on go version go1.8.3 darwin/amd64.
| . | |
| βββ books | |
| βΒ Β βββ handlers.go | |
| βΒ Β βββ models.go | |
| βββ config | |
| βΒ Β βββ db.go | |
| βββ main.go |