Skip to content

Instantly share code, notes, and snippets.

View basedalexander's full-sized avatar
🎯
Focusing

Alex Based basedalexander

🎯
Focusing
View GitHub Profile
scp user@128.35.35.351:~/nginx.tar.gz ~/Desktop/nginx.tar.gz
# Using key file
scp -i ./keys.pem user@128.35.35.351:~/nginx.tar.gz ~/Desktop/nginx.tar.gz
# from local machine to remote server
scp -i ../Dropbox/AWS_keys/ec2-1.pem ./kozlovcoin-wallet.targ.gz ec2-user@ec2-52-14-168-15.us-east-2.compute.amazonaws.com:~/thohoh.pro/kozlovcoin-wallet.tar.gz
# Article https://coderwall.com/p/dgwwuq/installing-nginx-in-mac-os-x-maverick-with-homebrew
# http://brianflove.com/2015/04/04/learning-nginx-on-os-x/
brew install nginx
# run to test, go to localhost:8080
sudo nginx
# stop
sudo nginx -s stop/start/reload/restart
# local host maping at
/etc/hosts
# print interface config ifcoinfig
ifconfig
# check open ports
# - -t - TCP connections
# - -l - listening sockets
# - n - represent ip addresses as addresses, don't resolve the host names
#install
brew install awscli
# on aws website add users or use your root key id
# configure
aws configure
# they will be placed here ~/.aws/credentials
# multiple user profiles
aws configure --profile myawsprofile
@basedalexander
basedalexander / nginx.conf
Last active February 18, 2018 12:30
Nginx
#load balancingss
# sudo vi /usr/local/etc/nginx/nginx.conf
upstream project {
server 127.0.0.1:3000;
# server 22.22.22.3:3000;
# server 22.22.22.5:3000;
}
Config
* git config --global user.name <name>
* git config --global user.email <email>
* git config --global alias.<alias-name> <git-command> // Create a shortcut for a Git command.
* git config --system core.editor <editor> // Define the text editor used by commands
// like git commit for all users on the current machine.
// The <editor> argument should be the command that
// launches the desired editor (e.g., vi).
* git config --global --edit // Open the global configuration file in a text editor for manual editing.