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://ip-ranges.amazonaws.com/ip-ranges.json | |
var k = { | |
"syncToken": "1482877149", | |
"createDate": "2016-12-27-22-19-09", | |
"prefixes": [ | |
{ | |
"ip_prefix": "13.32.0.0/15", | |
"region": "GLOBAL", | |
"service": "AMAZON" | |
}, |
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 logs nginx 2>&1 | grep "127." | |
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
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
eb ssh <eb environment name> | |
sudo docker ps | |
sudo docker exec -it <id of GitHub web hook container> sh | |
cd app && git pull |
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
http://stackoverflow.com/questions/36327096/vscode-linter-es6-es7-babel-linter/36327097#36327097 |
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
# list running instances. | |
sudo docker ps | |
# show logs of a particular instance: 5b51cb779326 | |
sudo docker logs 5b51cb779326 |
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
# most restrictive for pem file. | |
chmod 400 path/to/your/.pem | |
# to add your .pem file to ~/.ssh/ | |
ssh-add path/to/your/.pem | |
# e.g: login to gobike-api-dev environment, it reads from your /.ssh dir | |
eb ssh gobike-api-dev |
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
# to start laravel webserver. | |
artisan serve | |
# to start laravel schedulling. | |
artisan schedule:run | |
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
#INTRODUCTION | |
# Vagrant is a virtual machine manager, it allows you to script the virtual machine configuration as well as the provisioning. | |
# add 'laravel/homestead' to vm/virtual-box via vagrant, ref: https://laravel.com/docs/5.3/homestead#first-steps | |
vagrant box add laravel/homestead -c | |
# up and running, do it in ~/.homestead | |
vagrant init hashicorp/precise64 | |
vagrant up |
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
# start mysql instance | |
mysql.server start | |
# performance_schema'.'session_variables' has the wrong structure | |
mysql_upgrade -u root -p --force | |
mysql.server restart #restart after this. | |
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
{ | |
"containerDefinitions": [ | |
{ | |
"command": [ "string" ], | |
"cpu": number, | |
"disableNetworking": boolean, | |
"dnsSearchDomains": [ "string" ], | |
"dnsServers": [ "string" ], | |
"dockerLabels": { | |
"string" : "string" |