Skip to content

Commit b953310

Browse files
Lorchrliuhui
Lorchr
authored and
liuhui
committed
update
1 parent c0ae49b commit b953310

15 files changed

+687
-12
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
/TODO.md
22
/.idea/
3+
4+
**/temp/**

docs/diy/nas/aria2.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
- https://hub.docker.com/r/p3terx/aria2-pro
2+
- https://p3terx.com/archives/docker-aria2-pro.html
3+
4+
```shell
5+
# 安装aria2
6+
docker run -d \
7+
--name aria2-pro \
8+
--restart unless-stopped \
9+
--log-opt max-size=1m \
10+
-e PUID=$UID \
11+
-e PGID=$GID \
12+
-e UMASK_SET=022 \
13+
-e RPC_SECRET=P3TERX \
14+
-e RPC_PORT=6800 \
15+
-p 6800:6800 \
16+
-e LISTEN_PORT=6888 \
17+
-p 6888:6888 \
18+
-p 6888:6888/udp \
19+
-v //d/docker/aria2/conf:/config \
20+
-v //d/docker/aria2/data:/downloads \
21+
p3terx/aria2-pro
22+
23+
# 安装webui
24+
docker run -d \
25+
--name ariang \
26+
--log-opt max-size=1m \
27+
--restart unless-stopped \
28+
-p 6880:6880 \
29+
p3terx/ariang
30+
31+
# 配置webui
32+
# AriaNg设置 -> IP 及 RPC_SECRET
33+
```

docs/middleware/guideline/redis.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22

33
# 1. Spring Boot RateLimit
44
[Spring Boot RateLimit](../redis/Spring-Boot-RateLimit.md ':include')
5+
6+
7+
# 2. Redis data persistence
8+
[Redis data persistence](../redis/Redis-data-persistence.md ':include')

docs/middleware/redis/Redis-data-persistence.md

+174
Large diffs are not rendered by default.

docs/middleware/redis/Spring-Boot-RateLimit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[SpringBoot 服务接口限流,搞定!](blog.csdn.net/qq_34217386/article/details/122100904)
2-
2+
[SpringBoot 项目使用 Redis 对用户 IP 进行接口限流](https://mp.weixin.qq.com/s/062xXsIEaOuen_4wwYTUow)
33

44
## 前言
55
在开发高并发系统时有三把利器用来保护系统:缓存、降级和限流。限流可以认为服务降级的一种,限流通过限制请求的流量以达到保护系统的目的。

docs/template/temp.json

Whitespace-only changes.

docs/template/temp.md

Whitespace-only changes.

docs/template/temp.sql

Whitespace-only changes.

docs/template/temp.xml

Whitespace-only changes.

docs/template/temp.yml

Whitespace-only changes.

docs/zh-cn/awesome-open-source.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
## Java
22
- [MallChat后端 | mallchat.cn](https://github.com/zongzibinbin/MallChat) [MallChat前端](https://github.com/Evansy/MallChatWeb)
3+
- [基于 Spring Cloud Alibaba 的微服务架构,Saas开发平台](https://github.com/matevip/matecloud)
4+
- [分析Spring应用启动过程的工具](https://github.com/linyimin0812/spring-startup-analyzer)
35

46
## Linux
57
- [开源堡垒机](https://github.com/jumpserver/jumpserver)
68
- [Linux 服务器运维管理面板](https://github.com/1Panel-dev/1Panel) [安装脚本](https://github.com/1Panel-dev/installer)
9+
-[一个面向DevOps领域的低代码(GitOps)工具](https://gitee.com/jianmu-dev/jianmu)
710

811
## 实用类
912
- [潘多拉,一个让你呼吸顺畅的ChatGPT](https://github.com/pengzhile/pandora) [体验地址](https://chat.zhile.io)
10-
- [工具导航站](https://tool.browser.qq.com/)
13+
- [腾讯工具导航站](https://tool.browser.qq.com/)
1114
- [答题小程序](https://gitee.com/wulivicor/exam)
1215
- [Spring Boot + Vue3博客系统](https://github.com/weiwosuoai/WeBlog)
1316

1417
## 工具类
1518
- [一个功能强大的开源简历生成器](https://github.com/xitanggg/open-resume)
1619
- [Javascript Markdown 编辑器](https://github.com/Tencent/cherry-markdown)
20+
- [在线生成头像](https://github.com/mayandev/notion-avatar)
21+
- [网页在线工具汇总](https://iui.su/1492/) https://lai.yuweining.cn/music

docs/zh-cn/deploy/win10-server.md

+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# 环境准备
2+
## pgsql安装
3+
- [PgSql安装](https://www.jb51.net/article/114332.htm)
4+
1. 解压压缩包 `postgresql-12.14-2-windows-x64-binaries.zip`
5+
2.`pgsql`目录下新建一个`data`文件夹
6+
3. 配置环境变量
7+
```vbs env.vbs
8+
on error resume next
9+
set sysenv=CreateObject("WScript.Shell").Environment("system") 'system environment array
10+
Path = CreateObject("Scripting.FileSystemObject").GetFolder(".").Path 'add variable
11+
sysenv("PGHOME")="D:\pgsql"
12+
sysenv("PGHOST")="localhost"
13+
sysenv("Path")=sysenv("PGHOME")+"\bin;"+sysenv("Path")
14+
sysenv("PGLIB")=sysenv("PGHOME")+"\lib"
15+
sysenv("PGDATA")=sysenv("PGHOME")+"\data"
16+
17+
wscript.echo "PostgreSQL Success"
18+
```
19+
20+
4. 执行初始化 `pgsql/bin/initdb.exe`
21+
```
22+
initdb.exe -D D:\pgsql\data -E UTF-8 --locale=chs -U postgres -W
23+
24+
-D 指定数据库簇的存储目录
25+
-E 指定字符集为 UTF-8
26+
--locale 关于区域设置 chinese-simplified-china
27+
-U 默认用户 postgres
28+
-W 默认用户密码
29+
```
30+
31+
## 常用命令
32+
33+
1. 初始化数据库
34+
```
35+
initdb.exe -D D:\pgsql\data -E UTF-8 --locale=chs -U postgres -W
36+
37+
```
38+
初始化完成后,会在 data 目录下生成配置文件 postgresql.conf,可以修改运行的端口
39+
40+
2. 启动服务
41+
```
42+
pg_ctl start -w -D "D:\pgsql\data" -l "D:\pgsql\log\pgsql.log"
43+
44+
-w 等待直到操作完成
45+
-D 数据目录
46+
-l 日志文件的位置
47+
```
48+
49+
3. 命令行登录pgsql
50+
```
51+
psql -p 5433 -U postgres -W
52+
```
53+
54+
```sql
55+
-- 查看版本
56+
select version();
57+
58+
-- 查看用户名密码
59+
select * from pg_authid;
60+
61+
-- 获取所有数据库信息
62+
select * from pg_database order by datname;
63+
64+
-- 获取当前db中所有的表信息(pg_tables 是系统视图)
65+
select * from pg_tables order by schemaname;
66+
67+
-- 每一行表示一个进程,显示当前连接的会话的活动进程的信息
68+
select * from pg_stat_activity;
69+
70+
-- 获取数据表名称类型及注释
71+
select a.attname "字段名称",
72+
concat_ws(' ', t.typname, substring(format_type(a.atttypid, a.atttypmod) from '\(.*\)' )) "字段类型",
73+
d.description "字段注释"
74+
from pg_class c, pg_attribute a, pg_type t, pg_description d
75+
where c.relname = 'tab_name'
76+
and a.attnum > 0
77+
and a.attrelid = c.oid
78+
and a.atttypid = t.oid
79+
and d.objoid = a.attrelid
80+
and d.objsubid = a.attnum
81+
```
82+
83+
4. 注册为服务
84+
```
85+
pg_ctl --help
86+
pg_ctl register -N PostgreSQL -D "D:\pgsql\data"
87+
```
88+
89+
services.msc
90+
91+
5. 启动服务
92+
```
93+
net start PostgreSQL
94+
```
95+
96+
6. 停止服务
97+
```
98+
net stop PostgreSQL
99+
```
100+
101+
7. 删除PostgreSQL服务
102+
```
103+
pg_ctl unregister -N PostgreSQL
104+
```
105+
106+
5. 创建用户postgres,密码同样是postgres:
107+
```
108+
net user postgres postgres /add
109+
```
110+
111+
6. 创建PostgreSQL用户和它要找的那个相符
112+
```
113+
createuser --superuser postgres
114+
```
115+
116+
7. 查看系统用户
117+
```
118+
net user
119+
```
120+
121+
122+
## 运行脚本
123+
- [](https://www.cnblogs.com/dbei/p/13629742.html)
124+
- [](https://blog.csdn.net/nandao158/article/details/129333601)
125+
```bat
126+
@echo off
127+
@rem 创建win环境脚本
128+
%1 mshta vbscript:CreateObject("WScript.Shell").Run("%~s0 ::", 0, FALSE)
129+
@rem 关闭黑窗口
130+
(window.close) && exit
131+
@rem 运行java jar 并将日志输出到 console.log中
132+
java -Xss128k -Xms1g -Xmx1g -jar yunyi-quality-1.0-SNAPSHOT.jar --spring.profiles.active=dev >console.log 2>&1 &
133+
@rem 退出
134+
exit
135+
```
136+
137+
138+
## 停止脚本
139+
- [](https://codeleading.com/article/58065096861/)
140+
```bat
141+
@echo off
142+
rem 设置监听的端口号
143+
set port=33333
144+
echo port : %port%
145+
146+
for /f "usebackq tokens=1-5" %%a in (`netstat -ano ^| findstr %port%`) do (
147+
if [%%d] EQU [LISTENING] (
148+
set pid=%%e
149+
)
150+
)
151+
152+
for /f "usebackq tokens=1-5" %%a in (`tasklist ^| findstr %pid%`) do (
153+
set image_name=%%a
154+
)
155+
156+
echo now will kill process : pid %pid%, image_name %image_name%
157+
pause
158+
rem 根据进程ID,kill进程
159+
taskkill /f /pid %pid%
160+
pause
161+
```
162+
163+
164+
脚本源码
165+
-[](https://blog.csdn.net/qq_43290318/article/details/126437411)
166+
```bat
167+
@echo off & setlocal EnableDelayedExpansion
168+
CHCP 65001
169+
CLS
170+
echo 请输入程序正在运行的端口号
171+
set /p port=
172+
echo 找到的进程记录
173+
echo =================================================================================
174+
netstat -nao|findstr !port!
175+
echo =================================================================================
176+
echo 回车进行逐个确认
177+
pause
178+
for /f "tokens=2,5" %%i in ('netstat -nao^|findstr :%%port%%') do (
179+
::if "!processed[%%j]!" == "" (
180+
if not defined processed[%%j] (
181+
set pname=N/A
182+
for /f "tokens=1" %%p in ('tasklist^|findstr %%j') do (set pname=%%p)
183+
echo %%i %%j !pname!
184+
echo 输入Y确认Kill,否则跳过,可回车跳过
185+
set flag=N/A
186+
set /p flag=
187+
if "!flag!" == "Y" (
188+
taskkill /pid %%j -t -f
189+
) else (
190+
echo 已跳过
191+
)
192+
set processed[%%j]=1
193+
)
194+
)
195+
echo 程序结束
196+
pause
197+
```
198+
199+
200+
201+
https://blog.csdn.net/u014641168/article/details/125115035

docs/zh-cn/devenv/Docker-MinIO.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
docker run -d \
88
--publish 9000:9000 \
99
--publish 9001:9001 \
10+
--volume //d/docker/minio/data:/data \
1011
--env MINIO_ROOT_USER=minioaccess \
1112
--env MINIO_ROOT_PASSWORD=miniosecret \
13+
--env MINIO_SERVER_URL=http://minio.example.net:9000 \
1214
--net dev \
1315
--restart=on-failure:3 \
1416
--name minio \
@@ -21,17 +23,15 @@ docker network create dev
2123
docker volume create minio_data;
2224

2325
# 获取默认配置文件
26+
# 见 https://min.io/docs/minio/container/operations/install-deploy-manage/deploy-minio-single-node-single-drive.html#id4
2427

2528
# 运行容器
2629
docker run -d \
2730
--publish 9000:9000 \
2831
--publish 9001:9001 \
2932
--volume //d/docker/minio/data:/data \
30-
--volume //d/docker/minio/conf:/etc/config.env \
31-
--env MINIO_CONFIG_ENV_FILE=/etc/config.env \
32-
--env MINIO_ROOT_USER=minioaccess \
33-
--env MINIO_ROOT_PASSWORD=miniosecret \
34-
--env MINIO_SERVER_URL=http://minio.example.net:9000\
33+
--volume //d/docker/minio/conf/config.env:/etc/minio/config.env \
34+
--env MINIO_CONFIG_ENV_FILE=/etc/minio/config.env \
3535
--net dev \
3636
--restart=on-failure:3 \
3737
--name minio \
@@ -47,15 +47,15 @@ docker container restart minio
4747

4848
[Console Dashboard](http://localhost:9001)
4949

50-
50+
## config.env
5151
```conf
5252
# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server.
5353
# This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment.
5454
# Omit to use the default values 'minioadmin:minioadmin'.
5555
# MinIO recommends setting non-default values as a best practice, regardless of environment
5656
57-
MINIO_ROOT_USER=myminioadmin
58-
MINIO_ROOT_PASSWORD=minio-secret-key-change-me
57+
MINIO_ROOT_USER=minioaccess
58+
MINIO_ROOT_PASSWORD=miniosecret
5959
6060
# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.
6161
@@ -66,5 +66,5 @@ MINIO_VOLUMES="/mnt/data"
6666
6767
# Uncomment the following line and replace the value with the correct hostname for the local machine and port for the MinIO server (9000 by default).
6868
69-
#MINIO_SERVER_URL="http://minio.example.net:9000"
70-
```
69+
# MINIO_SERVER_URL="http://minio.example.net:9000"
70+
```

0 commit comments

Comments
 (0)