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
# Execute onto container | |
aws ecs execute-command \ | |
--region us-west-2 \ | |
--cluster PeprServiceStackDev-EcsDefaultClusterMnL3mNNYNVpc18E0451A-dn35gqXUjrhi \ | |
--task e575d819e2e04dac99387d22a5219576 \ | |
--command /bin/bash --interactive | |
# Run task with execute enable | |
aws ecs run-task \ | |
--cluster PeprServiceStackDev-EcsDefaultClusterMnL3mNNYNVpc18E0451A-dn35gqXUjrhi \ |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Mocha All", |
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 | |
role_arn="<your_role_arn>" | |
mfa_arn="<your_mfa_arn>" | |
session_id=`date +%s000` | |
# export AWS_DEFAULT_REGION="us-east-2" | |
echo "MFA:" | |
read token_code | |
cmd=$(aws sts assume-role --role-arn "${role_arn}" --role-session-name "${session_id}" --serial-number "${mfa_arn}" --token-code "${token_code}" --query '[Credentials.AccessKeyId,Credentials.SecretAccessKey,Credentials.SessionToken]' --output text) |
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
ip addr | |
ss -pna | grep LISTEN |
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
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' || false |
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 | |
./bin/elasticsearch-keystore create | |
echo 'XXX' | ./bin/elasticsearch-keystore add --stdin s3.client.default.access_key | |
echo 'XXX' | ./bin/elasticsearch-keystore add --stdin s3.client.default.secret_key |
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
ngrok http -bind-tls=true localhost:3000 |
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
1. Kong default config https://github.com/Kong/kong/blob/master/kong.conf.default | |
2. Then modify | |
pg_host = # The PostgreSQL host to connect to. | |
pg_port = 60335 # The port to connect to. | |
pg_user = kong # The username to authenticate if required. | |
pg_password = # The password to authenticate if required. | |
pg_database = kong # The database name to connect to. |
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
# Replace mongodb.log with your mongodb log | |
cat mongodb.log | grep "syslog" | cut -d " " -f 6 | sort | uniq -c | sort -rn |
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
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/tls.key -out /tmp/tls.crt -subj "/CN=example.domain.com" | |
kubectl create secret tls example --key /tmp/tls.key --cert /tmp/tls.crt # example is the ingress secret key |
NewerOlder