工作小技巧

2021/11/2

# 新机软件

# Homebrew

  1. 安装git
  2. sh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

# wget

brew install wget 
1
  • 后续命令跟提示输入完整

# curl下载失败

  • 就是把DNS改成其一,然后重启shell

8.8.8.8
114.114.114.114

# 安装zsh

# brew install oh-my-zsh

sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

# curl
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)
1
2
3
4
5
6
  • 开启zsh自动提示 (opens new window)
    cd ~/.oh-my-zsh/plugins
    git clone https://github.com/zsh-users/zsh-autosuggestions.git
    
    1
    2
  • Zsh自定义环境路径导出:
    open ~/.zshrc
    
    1
    export PATH=${PATH}:/Users/dreamarts/Documents/packages/mongodb-macos-x86_64-5.0.9/bin
    
    1
  • Zsh改主题:
    open ~/.zshrc
    # ZSH_THEME="random"
    
    1
    2
  • 更改
open ~/.zshrc
# plugins=(git)

plugins=(git zsh-autosuggestions)
1
2
3
4
  • 生效配置文件
source ~/.zshrc
1

# 安装nvm

# npm淘宝镜像

  • 换淘宝
    npm config set registry https://registry.npmmirror.com
    
    npm get registry
    
    1
    2
    3
  • 换回来
    npm config set registry https://registry.npmjs.org
    
    1

# 安装vue-devtool

  • 能访问外网直接取扩展程序下载
  • 不能访问外网的情况下:
  • 官网下载
git clone git@github.com:vuejs/devtools.git 
1
  • 使用yarn安装(npm安装会有问题)
npm install -g yarn

# 换淘宝镜像
yarn config set registry https://registry.npm.taobao.org --global
yarn config set disturl https://npm.taobao.org/dist --global

# 检查
yarn config get registry
1
2
3
4
5
6
7
8

安装依赖

yarn install
yarn run build
1
2
  • chrome扩展程序 -> 开发者模式 -> 添加已解压包 -> packages\shell-chrome文件夹

# 工作调试

# 调试手机网页

# chrome插件下载

# mac直达文件

  • 访达 -> shift + command + G

# vscode配置文件

  • commond + shift + p -> default settings

# macAPP清除互联网下载标志

  • 路径换成.app所在路径,在应用程序->显示包内容可以查看
sudo xattr -r -d com.apple.quarantine /path/to/application.app
1

# mac

# mac解压rar

tar -xf xxx.rar
1
上次更新: 9/17/2024