设置 Git 的 HTTP 代理(ClashX HTTP 端口默认 7890)
# 设置 Git 的 HTTP 代理(ClashX HTTP 端口默认 7890)git config --global http.proxy http://127.0.0.1:7890 git config --global https.proxy https://127.0.0.1:7890
继续阅读
Mac在终端快速使用WebStorm 编辑器
## 在终端快速使用 WebStorm 编辑器### 设置 WebStorm 别名快捷键1. 编辑 `.zshrc` 文件。 ```sh vim .zshrc ```2. 为 WebStorm 添加别名。 ```sh alias webstorm='open -na "WebStorm.app" --args "$@"' ```3. 使更改生效。 ```sh source .zshrc ```现在,你可以在终端中快速打开 WebStorm 并进入你的项目目录:```sh# 1. 进入项目
继续阅读
使用 zip 命令循环压缩当前目录中的所有子目录
下面命令保存为(zip.sh) #!/bin/bash# 获取当前目录current_dir=$(pwd)# 遍历当前目录下的子目录for subdir in "$current_dir"/*; do if [[ -d "$subdir" ]]; then # 子目录存在时进行压缩 subdir_name=$(basename "$subdir") zip -r "$subdir_name.zip" "$subdir" fidone
继续阅读
NPM SSL Errors! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm 安装时证书验证错误!!!NPM的install ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURENPM SSL Errorsnpm ERR! Error: SSL Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE在确定所安装的包是安全的情况下,可以这样做(关闭npm的https)npm config set strict-ssl false开启npm config set strict-ssl true
继续阅读
vim中删除某段,某行的命令
linux /Mac下vim中关于删除某段,某行,或者全部删除的命令 先打开某个文件vim filename 设置显示行号, 通过行号确定你要删除的行在vim里执行(在普通模式下直接按冒号,并输入下面的命令):set number :set nu 转到文件结尾在命令模式输入 G 转到10行在命令模式输入 10G 删除所有内容:先用 G 转到文件尾,然后使用下面命令::1,.d 删除第10行到第20行的内容:先用 20G 转到第20行,然后使用下面命令::9,.d 命令输入“:32,65d”,回车键,32-
继续阅读