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
package main | |
import ( | |
"fmt" | |
) | |
var colors = map[string]string{ | |
"black": "0;30", | |
"red": "0;31", | |
"green": "0;32", |
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
# expose the 22 port for ssh login | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT | |
# launch ss server and export port | |
ssserver -d start -c /etc/shadowsocks.json | |
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8398 -j ACCEPT | |
# launch nginx | |
sudo nginx |
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
#################### Oh My Zsh Configuration ####################### | |
ZSH_THEME="ys" | |
plugins=( | |
git, go, node, npm, nvm | |
) | |
###################### Custom Configuration ######################## |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"time" | |
) | |
func main() { | |
ctx1, cancel1 := context.WithCancel(context.Background()) |
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
{ | |
"sync.gist": "76f3e5a767908ed2f8060b54f0072ed1", | |
"workbench.editor.revealIfOpen": true, | |
"window.title": "${activeEditorLong}", | |
"editor.fontFamily": "Iosevka SS18", | |
"editor.wordWrap": "on", | |
"eslint.run": "onSave", | |
"editor.tokenColorCustomizations": { | |
"[Noctis*]": { | |
"textMateRules": [ |
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
git clone [this repo] docker-compose && cd docker-compose | |
docker-compose 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
mkdir -p /root/work/nginx/logs | |
cd /root/work/nginx | |
git clone [this repo] conf.d |
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
# expose the 22 port for ssh login | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT | |
# launch ss server and export port | |
ssserver -d start -c /etc/shadowsocks.json | |
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8398 -j ACCEPT |
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
volumes | |
docker/nginx/index.html:/usr/share/nginx/html/index.html | |
docker/nginx:/etc/nginx/conf.d | |
port | |
8008:80 |
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
volumes | |
docker/caddy/index.html:/etc/caddy/index/index.html | |
docker/caddy/caddyfile:/etc/caddy/Caddyfile | |
port | |
8008:80 |