update
This commit is contained in:
parent
4400e24dca
commit
6b8a293ff8
35
database/postgres/docker-compose.yml
Normal file
35
database/postgres/docker-compose.yml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
container_name: postgres_container
|
||||||
|
image: postgres
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER:-root}
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-123456}
|
||||||
|
PGDATA: /data/postgres
|
||||||
|
volumes:
|
||||||
|
- postgres:/data/postgres
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
networks:
|
||||||
|
- postgres
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
pgadmin:
|
||||||
|
container_name: pgadmin_container
|
||||||
|
image: dpage/pgadmin4
|
||||||
|
environment:
|
||||||
|
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-root@test.com}
|
||||||
|
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-123456}
|
||||||
|
PGADMIN_CONFIG_SERVER_MODE: "False"
|
||||||
|
ports:
|
||||||
|
- "${PGADMIN_PORT:-8091}:80"
|
||||||
|
networks:
|
||||||
|
- postgres
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
networks:
|
||||||
|
postgres:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres:
|
||||||
13
go/gocode.md
13
go/gocode.md
@ -4,3 +4,16 @@
|
|||||||
# 退出gocode 服务
|
# 退出gocode 服务
|
||||||
gocode exit
|
gocode exit
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## error
|
||||||
|
|
||||||
|
slice append 会引用到原slice
|
||||||
|
|
||||||
|
```golang
|
||||||
|
a := make([]any, 0, 20)
|
||||||
|
a = append(a, 1, 2, 3)
|
||||||
|
b := append(a, 4)
|
||||||
|
c := append(a, 5)
|
||||||
|
b[0] = 0
|
||||||
|
logv.Warn().Msgf("%v %v %v", a, b, c)
|
||||||
|
```
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## caddyfile
|
## caddyfile
|
||||||
|
|
||||||
|
docker run -d -p 80:80 --name caddy -v ~/.config/www:/data -v ~/.config/caddy:/etc/caddy caddy
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
*.nps.veypi.com:80 {
|
*.nps.veypi.com:80 {
|
||||||
reverse_proxy 127.0.0.1:800
|
reverse_proxy 127.0.0.1:800
|
||||||
|
|||||||
23
linux/ssh.md
Normal file
23
linux/ssh.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# auto ssh proxy
|
||||||
|
|
||||||
|
ssh -C -N -R remote_port:localhost:local_port username@remote_server
|
||||||
|
|
||||||
|
vim /etc/systemd/system/vautossh.service
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=AutoSSH tunnel service for reverse port forwarding
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Environment="AUTOSSH_GATETIME=0"
|
||||||
|
ExecStart=/usr/bin/ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -C -N -R remote_port:localhost:local_port username@remote_server
|
||||||
|
Restart=always
|
||||||
|
User=your_username
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable vautossh.service
|
||||||
@ -33,7 +33,6 @@ tmux attach -t $1
|
|||||||
```
|
```
|
||||||
|
|
||||||
## .tmux.conf
|
## .tmux.conf
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# ln -s $(pwd)/tmux.conf ~/.tmux.conf
|
# ln -s $(pwd)/tmux.conf ~/.tmux.conf
|
||||||
|
|
||||||
@ -47,20 +46,14 @@ bind r source-file ~/.tmux.conf \; display-message "Config reloaded.."
|
|||||||
# 打开鼠标 调整面板 切换面板
|
# 打开鼠标 调整面板 切换面板
|
||||||
set-option -g mouse on
|
set-option -g mouse on
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -g base-index 1 # 设置窗口的起始下标为1
|
set -g base-index 1 # 设置窗口的起始下标为1
|
||||||
set -g pane-base-index 1 # 设置面板的起始下标为1
|
set -g pane-base-index 1 # 设置面板的起始下标为1
|
||||||
|
|
||||||
|
|
||||||
unbind '"'
|
unbind '"'
|
||||||
bind - splitw -v -c '#{pane_current_path}' # 垂直方向新增面板,默认进入当前目录
|
bind - splitw -v -c '#{pane_current_path}' # 垂直方向新增面板,默认进入当前目录
|
||||||
unbind %
|
unbind %
|
||||||
bind = splitw -h -c '#{pane_current_path}' # 水平方向新增面板,默认进入当前目录
|
bind = splitw -h -c '#{pane_current_path}' # 水平方向新增面板,默认进入当前目录
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set -g status-interval 1 # 状态栏刷新时间
|
set -g status-interval 1 # 状态栏刷新时间
|
||||||
set -g status-justify left # 状态栏列表左对齐
|
set -g status-justify left # 状态栏列表左对齐
|
||||||
setw -g monitor-activity on # 非当前窗口有内容更新时在状态栏通知
|
setw -g monitor-activity on # 非当前窗口有内容更新时在状态栏通知
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user