Skip to content

Instantly share code, notes, and snippets.

Avatar

Shijie Zhou shijiezhou1

View GitHub Profile
View Todo.vue
<template>
<ul>
<li
v-for="(todolist, index) in TodoLists"
:key="index"
>
<span class="name">{{todolist.name}}</span>
<span
class="delete"
@click="Delete(todolist.id)"
View container.js
<template>
<div class="container">
<input
type="text"
v-model="msg"
>
<button @click="Create">Create</button>
<TodoList
:TodoLists="TodoLists"
:Delete="Delete"
View app.js
<template>
<h1>Vue 3 Todo App:</h1>
<Container />
</template>
<script>
import Container from './components/Container';
export default {
name: 'App',
@shijiezhou1
shijiezhou1 / wp_ssl.conf
Created Jul 5, 2020
WordPress Https Conf File
View wp_ssl.conf
server {
listen 443 ssl;
server_name www.example.com example.com; # change example to your domain
ssl_certificate /etc/nginx/conf.d/certification/wp.pem;
ssl_certificate_key /etc/nginx/conf.d/certification/wp.key;
location / {
proxy_pass http://{your-cloud-ip}:8080;
}
@shijiezhou1
shijiezhou1 / docker-compose.yml
Created Jul 5, 2020
Oracle with WordPress Docker compose
View docker-compose.yml
version: '3.7'
services:
wordpress:
image: wordpress
container_name: wp
restart: always
ports:
- 8080:80
View nginx.conf
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;
View gist:dd3f91adb1a91d6aebdfd22124273824
# close iptables
service iptables stop
# prevent iptables restart on boot
chkconfig iptables off
# stop firewall
systemctl stop firewalld.service
# prevent firewall restart on boot
View gist:c2ac6836c223819b3ae589abc2caeb50
#!/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 Apr 13, 2020
Setup Nginx Configuration For Server
View gist:82540859642fd24e1b5a59f1c4624c15
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 Apr 13, 2020
Restifyjs Starter
View app.js
// 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