摘要: 关键代码: ```ts const router = useRouter() const author = 'myname' router.push({ name: 'Edit', query: { author }}) const route = useRoute() const value = 阅读全文
posted @ 2023-09-04 12:10 waketzheng 阅读(1750) 评论(0) 推荐(0)
摘要: Talk is cheap, show me the code: ```bash cd /etc/yum.repos.d [ -f CentOS-Base.repo.bak ] || cp CentOS-Base.repo CentOS-Base.repo.bak export MIRROR="ht 阅读全文
posted @ 2023-08-16 15:41 waketzheng 阅读(430) 评论(0) 推荐(0)
摘要: 代码如下,Windows环境测试通过(1. 判断是否在虚拟环境里;2. 判断当前目录下是否有venv文件夹;3. 如果都没有则通过python -m venv venv来创建;4. 然后调用venv里的pip来安装模块) 1 import platform 2 import re 3 import 阅读全文
posted @ 2023-06-16 17:54 waketzheng 阅读(275) 评论(0) 推荐(0)
摘要: # conf files in /etc/supervisor/conf.d/ ## Version Supervisor is installed by apt, and it's version is: ``` sudo supervisord --version 4.1.0 ``` ## Co 阅读全文
posted @ 2023-06-08 15:30 waketzheng 阅读(29) 评论(0) 推荐(0)
摘要: # 带变量的nginx后端项目配置 不同的api项目,挂载不同的域名,只需在配置夹里,修改文件名(建议文件名和域名保持一致)、修改端口号、修改第5行第22行backend_api后面的编号、修改第11行的项目名、可能还需要修改第12行的文件夹名、修改第14行的域名 $ cat /etc/nginx/ 阅读全文
posted @ 2023-06-08 15:29 waketzheng 阅读(14) 评论(0) 推荐(0)
摘要: **在nginx的sites-avaliable中,增加新文件之后,需要创建软连接到sites-enable里,reload才会生效,所以写了如下脚本:** - create_ln.py ```py #!/usr/bin/env python3 import os from pathlib impo 阅读全文
posted @ 2023-06-08 15:12 waketzheng 阅读(14) 评论(0) 推荐(0)
摘要: API server using: `fastapi+tortoise-orm+postgresql+redis+supervisor+nginx` There are some period tasks and async tasks that will run in `celery+rabbit 阅读全文
posted @ 2023-06-08 15:10 waketzheng 阅读(302) 评论(0) 推荐(0)
摘要: 一、安装 pip install --upgrade --user pip pipx pipx install poetry poetry --version # Poetry (version 1.3.2) 二、换源 (注)如果有git,直接执行这个命令就会自动完成安装插件和换源:git clon 阅读全文
posted @ 2023-02-21 20:31 waketzheng 阅读(15855) 评论(0) 推荐(0)
摘要: 先上效果图 代码如下: 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>ECharts 家有儿女关系图</title> 5 <meta charset="utf-8" /> 6 <script src="https://cdnjs.cloudflare.co 阅读全文
posted @ 2022-12-30 18:46 waketzheng 阅读(708) 评论(0) 推荐(0)
摘要: 由于经常需要登录服务器、在服务器与本地之间传送文件,所以花了点时间写了个脚本,以提高效率 脚本内容如下(vi to_my_server.sh; chmod +x to_my_server.sh; cat to_my_server.sh): #!/bin/bash #IP_OR_DOMAIN="www 阅读全文
posted @ 2022-11-23 21:50 waketzheng 阅读(161) 评论(0) 推荐(0)