Skip to content

Instantly share code, notes, and snippets.

@xuweicheng
xuweicheng / gist:6584760f43fde46332d18337012a9c5d
Created July 31, 2018 21:36
nginx redirect http to https
1. create self-signed certificate
openssl req -newkey rsa:2048 -nodes -keyout localhost.key -x509 -days 365 -out localhost.crt
2. copy localhost.key and localhost.crt to nginx/conf folder
3. configure nginx.conf to
server {
listen 80;
server_name localhost;
return 301 https://$server_name$request_uri;
@xuweicheng
xuweicheng / Add_Existing_Project_To_Git.md
Created March 16, 2018 16:08 — forked from alexpchin/Add_Existing_Project_To_Git.md
Add Existing Project To Git Repo

#Adding an existing project to GitHub using the command line

Simple steps to add existing project to Github.

1. Create a new repository on GitHub.

In Terminal, change the current working directory to your local project.

##2. Initialize the local directory as a Git repository.

git init