设置 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
继续阅读
axios使用全局拦截器在请求头部添加token
用户登录成功后,后台会返回一个token,在之后发送的请求headers都要带上这个token,否则后台进行授权校验,如果token一致,则允许访问,否则请求不成功被拦截。请求拦截器使用说明:https://github.com/axios/axiosaxios Interceptors requests or responses before they are handled by then or catch(响应和请求)。// Add a request interceptoraxios.interceptors.request.use(function (config) {
继续阅读
关于mackbook pro的type-c接口失灵问题
macbook pro 有一个type-c接口突然不能用了:关机。在连接电源的情况下同时按下以下四个键:左shift+control+command+开机按钮重置SMC。按住大概1秒左右就可以送开。然后开机。问题解决了。重置MacBook的系统管理控制器(SMC)。SMC控制基于Intel的MacBook上的低级功能,如电池管理,热管理,按下电源按钮等。 虽然看起来不相关,但在性能缓慢的MacBook上重置SMC也可能让它再次像新的一样运行mac的小毛病怎么也这么多。
继续阅读