JetBrains AI Assistant 生成提交消息 (Commit message) 提示语(Prompt) 作者: Chuwen 时间: 2025-02-12 分类: 神奇技巧 评论 > 基于此项目进行相关改造:https://github.com/guanguans/ai-commit/blob/main/config/ai-commit.php#L238-L263 ```text IMPORTANT: Your response MUST be in Simplified Chinese (简体中文) only. Additional formatting requirement: - Add a space between Chinese characters and English/numbers/symbols (在中文字符和英文、数字、符号之间添加空格) Here are some best practices for writing commit messages: - Write clear, concise, and descriptive messages that explain the changes made in the commit. - Use the present tense and active voice in the message, for example, "Fix bug" instead of "Fixed bug." - Use the imperative mood, which gives the message a sense of command, e.g. "Add feature" instead of "Added feature" - Limit the subject line to 72 characters or less. - Capitalize the subject line. - Do not end the subject line with a period. - Limit the body of the message to 256 characters or less. - Use a blank line between the subject and the body of the message. - Use the body of the message to provide additional context or explain the reasoning behind the changes. - Avoid using general terms like "update" or "change" in the subject line, be specific about what was updated or changed. - Explain, What was done at a glance in the subject line, and provide additional context in the body of the message. - Why the change was necessary in the body of the message. - The details about what was done in the body of the message. - Any useful details concerning the change in the body of the message. - Use a hyphen (-) for the bullet points in the body of the message. Remember: 1. The commit message must be written in Simplified Chinese (简体中文) 2. Always add a space between Chinese and English/numbers/symbols (在中文和英文、数字、符号之间需要添加空格) Please provide a response in the following format: (): Example: feat(tracking): 添加 TrackingInfoService 数据处理逻辑 feat(login): 添加 OAuth2 认证支持 feat(route): 添加 /test 路由 fix(order): 修复订单可以 0 元购的问题 ```
使用 docker inspect 和 jq 命令快速查看容器挂载目录、docker-compose.yaml 路径 作者: Chuwen 时间: 2024-07-31 分类: 神奇技巧 评论 关于 `jq` 命令的详细解释及安装教程:https://wangchujiang.com/linux-command/c/jq.html --- 语法: ```shell docker inspect | jq '.[0].Mounts' ``` 例如: ```shell shine@Shine-Win11:~/documents/self-projects/tmp$ docker inspect aa3f359ddc0e | jq '.[0].Mounts' [ { "Type": "bind", "Source": "/home/shine/documents/git/projects/docker-elk/elasticsearch/config/elasticsearch.yml", "Destination": "/usr/share/elasticsearch/config/elasticsearch.yml", "Mode": "ro,Z", "RW": false, "Propagation": "rprivate" }, { "Type": "volume", "Name": "docker-elk_elasticsearch", "Source": "/var/lib/docker/volumes/docker-elk_elasticsearch/_data", "Destination": "/usr/share/elasticsearch/data", "Driver": "local", "Mode": "z", "RW": true, "Propagation": "" } ] ```  ## 查看 docker-compose.yaml 路径 语法: ```shell docker inspect | jq '.[0].Config.Labels' ``` 示例: ```shell shine@Shine-Win11:~/documents/git/projects/docker-elk$ docker inspect 8334b593b89a | jq '.[0].Config.Labels' { "com.docker.compose.config-hash": "d1f80fc712ff55f9f33eafc4842bf71f947a6584b27eb548bca0c0dc399bff8b", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "", "com.docker.compose.image": "sha256:de7d209b219972d54381f0a7d18671d0c3aa1f3b4410a607cb82d34a08a97dc8", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "frankenphp-typecho", "com.docker.compose.project.config_files": "/mnt/c/Users/Shine/Documents/Self/projects/frankenphp-typecho/docker-compose.yaml", "com.docker.compose.project.working_dir": "/mnt/c/Users/Shine/Documents/Self/projects/frankenphp-typecho", "com.docker.compose.replace": "3a7bd46c1737dd0ce32be2e6f4b246ca3e2778bbc83d105579c994e8fadc3a17", "com.docker.compose.service": "wordpress", "com.docker.compose.version": "2.24.7", "org.opencontainers.image.created": "2024-04-23T12:51:06Z", "org.opencontainers.image.description": "The modern PHP app server", "org.opencontainers.image.licenses": "MIT", "org.opencontainers.image.revision": "a9ebc3aeea590b45422a19510473955b372d09aa", "org.opencontainers.image.source": "https://github.com/dunglas/frankenphp", "org.opencontainers.image.title": "FrankenPHP", "org.opencontainers.image.url": "https://frankenphp.dev", "org.opencontainers.image.vendor": "Kévin Dunglas", "org.opencontainers.image.version": "v1.1.3" } ``` 
PHPStorm 命令行工具支持 - 添加 hyperf 命令 作者: Chuwen 时间: 2023-07-07 分类: 神奇技巧 评论 ## 操作步骤 1. 打开 PHPStorm 设置 2. 选择 **Tools | Command Line Tool Support**(工具) 3. 再选择 **Command Line Tools**(命令行工具支持) 4. 点击 “+” 添加  5. 按照如图所示选择  6. 工具设置 * **别名** 可按照自己需求输入比如 `hyperf`、`h`,这里我为了方便选择 `h` 作为别名 * **脚本路径** 输入 hyperf 脚本的相对路径 `bin/hyperf.php`  7. 最点击确定、应用设置即可  ## 使用 1. 双击 Ctrl 键唤出“运行任何内容”窗口  2. 输入相关命令如 `h d`,然后就会进行命令联想  3. 选定一个命令,按回车运行 
Chrome 无法使用谷歌翻译(Google Translate)解决办法 作者: Chuwen 时间: 2022-12-16 分类: 神奇技巧 评论 ## 解决方案 ### 1. DNS 重写 将 `translate.googleapis.com` CNAME 解析到 `update.googleapis.com` 即可 使用如 AdGuard 进行 DNS 重写:  ### 2. 修改系统 hosts 文件 因为网上有许多资料讲怎么修改,这里不再赘述
下载 c.gb688.cn 网站里的国家标准 pdf 作者: Chuwen 时间: 2022-03-31 分类: 神奇技巧 2 条评论 打开 Chrome 浏览器开发者工具  选择 Console / 控制台 选项卡,然后粘贴以下代码,然后按回车运行即可  ``` PDFViewerApplication.save() ```