Loading

摘要: cron 中开启协程执行任务 ‍ package cron import ( "project/internal/jobs" "github.com/robfig/cron/v3" ) func Run() { c := cron.New(cron.WithSeconds()) // 每分钟的第 4 阅读全文
posted @ 2024-03-27 21:35 zhpj 阅读(11) 评论(0) 推荐(0)
摘要: AES 加解密(前后端) 加密 前端加密: aesEncrypt(plainText: string, key: string) { const key = CryptoJS.enc.Latin1.parse(key); const iv = CryptoJS.enc.Latin1.parse('1 阅读全文
posted @ 2024-03-15 20:44 zhpj 阅读(86) 评论(0) 推荐(0)
摘要: Gin 模型绑定和验证 定义绑定的结构体: type PhoneExistRequest struct { Phone string `json:"phone" binding:"required,len=11" label:"手机号"` SmsCode string `json:"sms_code 阅读全文
posted @ 2024-03-11 08:45 zhpj 阅读(52) 评论(0) 推荐(0)
摘要: PushDeer 自架服务端 官方文档:使用自架服务器端 [root@VM-4-11-centos software]# git clone https://github.com/easychen/pushdeer.git Cloning into 'pushdeer'... remote: Enu 阅读全文
posted @ 2024-02-26 08:49 zhpj 阅读(234) 评论(0) 推荐(0)
摘要: Git Install ‍ [root@localhost software]# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.43.0.tar.gz [root@localhost software]# [root@ 阅读全文
posted @ 2024-02-23 09:02 zhpj 阅读(34) 评论(0) 推荐(0)
摘要: NFS Server 和 Client 的配置 NFS Server 的安装 ‍ Linux 上 NFS Server 的安装及配置 在 Linux 上安装 NFS 共享服务: yum install -y nfs-server ‍ 启动 NFS 服务: systemctl start rpcbin 阅读全文
posted @ 2024-02-22 15:38 zhpj 阅读(1340) 评论(1) 推荐(0)
摘要: # Windows Terminal 中配置代理 cmd 中临时设置代理: ```javascript set http_proxy=http://127.0.0.1:10809 set https_proxy=http://127.0.0.1:10809 ``` 取消代理: ```javascri 阅读全文
posted @ 2023-06-14 11:53 zhpj 阅读(2880) 评论(0) 推荐(0)
摘要: # Git 修改已提交的信息 修改(最后一次)提交信息 git commit --amend --message="xxx" 修改(最后一次)提交人 git commit --amend --author="xxx " ‍ ```bash E:\workspace\go\src\gitee.com\ 阅读全文
posted @ 2023-06-13 10:23 zhpj 阅读(27) 评论(0) 推荐(0)
摘要: # Mac 修改 HostName 和用户名 修改 HostName: ```bash zhpj@zhpj ~ % sudo scutil --set HostName localhost zhpj@zhpj ~ % ``` 重新打开终端: ```bash Last login: Sat Jun 1 阅读全文
posted @ 2023-06-10 18:04 zhpj 阅读(333) 评论(0) 推荐(0)
摘要: 查看已有的数据库: show databases; 创建数据库 create database if not exists 库名 charset = utf8; 查看数据库的定义 show create database 库名; 修改数据库选项(字符集) alter database 库名chars 阅读全文
posted @ 2016-10-11 10:35 zhpj 阅读(139) 评论(0) 推荐(0)