Skip to content

Instantly share code, notes, and snippets.

View shijiezhou1's full-sized avatar

Shijie Zhou shijiezhou1

View GitHub Profile
@shijiezhou1
shijiezhou1 / docker-compose.yml
Created July 5, 2020 09:48
Oracle with WordPress Docker compose
version: '3.7'
services:
wordpress:
image: wordpress
container_name: wp
restart: always
ports:
- 8080:80
user nginx;
worker_processes 1; # cpu of your server
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# close iptables
service iptables stop
# prevent iptables restart on boot
chkconfig iptables off
# stop firewall
systemctl stop firewalld.service
# prevent firewall restart on boot
@shijiezhou1
shijiezhou1 / gist:c2ac6836c223819b3ae589abc2caeb50
Created July 1, 2020 13:40
Update Cloud Username and Password
#!/bin/bash
echo root:pass |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart
# username: root
# password: pass
@shijiezhou1
shijiezhou1 / gist:82540859642fd24e1b5a59f1c4624c15
Created April 13, 2020 14:21
Setup Nginx Configuration For Server
server {
listen 80;
location / {
# if you index.js is listening on port 3000
# or for location
# proxy_pass http://0.0.0.0:3000
proxy_pass http://127.0.0.1:3000
}
}
@shijiezhou1
shijiezhou1 / app.js
Last active April 13, 2020 14:16
Restifyjs Starter
// app.js
const http = require('http');
// Create an instance of the http server to handle HTTP requests
let app = http.createServer((req, res) => {
// Set a response type of plain text for the response
res.writeHead(200, {'Content-Type': 'text/plain'});
// Send back a response and end the connection
@shijiezhou1
shijiezhou1 / serverUbuntu.conf
Created March 6, 2020 03:39
Setting up Ubuntu config file in Nginx with SSL
#
server {
listen 80;
listen [::]:80;
server_name yourdomainname.com www.yourdomainname.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
@shijiezhou1
shijiezhou1 / Architecture
Last active January 23, 2020 00:59
Architecture Proposal
# Backend Architecture (Design Proposal)
[AWS DEMO](https://gist.githubusercontent.com/shijiezhou1/62de971da9cb8795a974739b11c4933b/raw/1eed6338564390bb697321c8163acb6214d6d107/aws.jpg)
Please provide a visualization with a detailed explanation on the client-server architecture proposed.
## API Gateway Integration
- To satisfy and meet the requirements, the backend for the software is using Amazon API Gateway which provides fully managed service. For example, it allows users to publish, create, monitor, and secure all APIs on any scale. Since they do not introduce the concepts of RPC even it was way faster than restful, we will just stick with RESTful, HTTP/HTTPs and Web-socket API.
@shijiezhou1
shijiezhou1 / Project.gif
Last active July 24, 2019 06:57
Project
Project.gif
@shijiezhou1
shijiezhou1 / ABOUTME.gif
Last active April 19, 2023 13:15
AboutMe
ABOUTME.gif