# Terminal 1
sshuttle -r $BASTION_NAME 172.31.0.0/16
# Terminal 2
ssh -L3306:$RDS_HOST_NAME:3306 ec2-user@$INSTANCE_IP -i $PEM
# Terminal 3
mysql -h 127.0.0.1 -u $SQL_USER -p $DATABASE -P 3306
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
cat /var/log/logstash/logstash-plain.log | grep -o "^\[.*\]\[DEBUG\]\[logstash.outputs.amazones\]" | awk '{ gsub(/\[DEBUG\].*/, ""); print }' | sed 's/[][]//g' | sed 's/,.*//g' | python timediff.py |
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
import cfnresponse | |
import boto3 | |
CLIENT = boto3.client('efs') | |
def execute(client, file_system_id, action, security_group_ids): | |
if client is None or not client: | |
raise TypeError('client must be present') | |
if not isinstance(file_system_id, basestring): |
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
#!/usr/bin/env bash | |
set -e | |
function usage() { | |
set -e | |
cat <<EOM | |
##### ecs-run ##### | |
Simple script for running tasks on Amazon Elastic Container Service | |
One of the following is required: | |
Required arguments: |
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
#!/usr/bin/env bash | |
set -o xtrace -o errexit -o pipefail -o nounset | |
######################################################################################## | |
# CircleCI's current recommendation for roughly serializing a subset | |
# of build commands for a given branch | |
# | |
# circle discussion thread - https://discuss.circleci.com/t/serializing-deployments/153 | |
# Code from - https://github.com/bellkev/circle-lock-test |
You're using create-react-app but you need to do some customizations to the webpack configs while you wait for the CRA team to implement/have a solution for whatever it is you need.
BUT - you do not want to eject as you want to keep up to date with any changes in CRA and possibly eventually move away from your customizationed webpack config and go back to using the mainline.
ssh-keygen -t rsa -b 4096 -C "$user@$domain"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
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
// https://forums.aws.amazon.com/thread.jspa?threadID=169448 | |
{ | |
"Listeners": [ | |
// ... | |
{ | |
"InstancePort": 8080, | |
"InstanceProtocol": "http", | |
"LoadBalancerPort": 443, | |
"Protocol": "HTTPS", | |
"PolicyNames": [ |
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] | |
project = warehouse | |
app_dir = /%(project) | |
chdir = %(app_dir) | |
wsgi-file = django-config/wsgi.py | |
static-map = /static=/%(project)/static | |
enable-threads = true | |
single-interpreter = true |
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
// scripts/reconfig.js | |
// | |
// Description: | |
// Pass in a key as an argument with a value and it will merge the change | |
// into the package.json. | |
// | |
// Usage: | |
// ./reconfig.js --$KEY_1_NAME $KEY_1_VALUE --$KEY_2_NAME --$KEY_2_VALUE | |
// ./reconfig.js --homepage http://custom-homepage.com | |
// |
NewerOlder