MacOS Catalina 系统偏好设置


显示 系统偏好设置 安全与隐私 任何来源

sudo spctl --master-disable

配置 iTerm2

  • General => Closing => Confirm closing multiple sessions
  • General => Closing => Confirm "Quit iTerm2(⌘Q)" command
  • Profiles => Colors => Color Presets => Solarized Dark
  • Profiles => Text => Font => Chanage Font => Meslo LG M for Powerline

安装 Maven 和 Redis

cd /usr/local/
tar -zxvf apache-maven-3.6.3-bin.tar.gz # 解包 maven

tar -zxvf redis-6.2.1.tar.gz # 解包 redis
cd redis-6.2.1/
make # 安装 redis
vim redis.conf # 配置 redis
# 注释 bind
# bind 127.0.0.1
# 修改 protected-mode
protected-mode no
# 释放注释 requirepass 并修改密码
requirepass 'your_password'
# 保存退出

# 启动 redis(待配置完 redis 的全局变量后继续)
nohup redis-server /usr/local/redis-6.2.1/redis.conf &
# 关闭 redis
redis-cli shutdown
# redis-cli 连接 redis
redis-cli # 回车
auth 'your_password' # 指定密码

配置 MacOS

# 当前操作目录
/Users/liu3193

# Oh My ZSH 配置
# 打开 https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh 复制文件内容
# 创建 shell 脚本文件 install.sh
vim install.sh # 粘贴文件内容保存并退出
sudo chmod -R a+x ./install.sh # 设置脚本文件可执行权限
./install.sh # 执行
rm -f install.sh # 删除

vim .zshrc # 粘贴或修改以下内容保存并退出
export MAVEN_HOME="/usr/local/apache-maven-3.6.3" # maven
export REDIS_HOME="/usr/local/redis-6.2.1" # redis
export PATH="$MAVEN_HOME/bin:$REDIS_HOME/src:$PATH"

ZSH_THEME="agnoster"
DEFAULT_USER="liu3193"
# .zshrc end
# 输入 source .zshrc, 即时生效配置

# Solarized 配置
git clone https://github.com/altercation/vim-colors-solarized.git
mkdir -p .vim/colors
cp vim-colors-solarized/colors/solarized.vim .vim/colors
rm -rf vim-colors-solarized

vim .vimrc # 粘贴以下内容保存并退出
set nu!
syntax enable
set background=dark
colorscheme solarized
# .vimrc end

# Git 配置
git config --global user.name "liu3193"
git config --global user.email "liu31936@163.com"

ssh-keygen -t rsa -C "liu31936@163.com"
cat ~/.ssh/id_rsa.pub

# NPM 淘宝镜像
npm config set registry https://registry.npm.taobao.org
npm config get registry

# NPM
sudo npm install -g @vue/cli
sudo npm install -g gitbook-cli
sudo npm install -g yarn
sudo npm install -g http-server

# Nodejs 10.x.x (GitBook 3.2.3 所支持的最高 Nodejs 版本)
# GitBook version: 3.2.3
gitbook -V # 安装 GitBook

# 修改用户权限
sudo chown -R $USER:$GROUP ~/.config # $USER 当前用户, $GROUP 当前群组

IntelliJ IDEA 配置 Maven

  • 打开 IntelliJ IDEA -> Preferences -> 构建, 执行, 部署 -> 构建工具 -> Maven
  • Maven home directory: /usr/local/apache-maven-3.6.3/

修改 Maven 国内镜像

mkdir .m2
cp /usr/local/apache-maven-3.6.3/conf/settings.xml ~/.m2/
vim .m2/settings.xml # 查找替换以下代码
  <mirrors>
     <!-- mirror
      | Specifies a repository mirror site to use instead of a given reposito    ry. The repository that
      | this mirror serves has an ID that matches the mirrorOf element of thi    s mirror. IDs are used
      | for inheritance and direct lookup purposes, and must be unique across     the set of mirrors.
      |
      -->
     <mirror>
       <id>alimaven</id>
       <mirrorOf>central</mirrorOf>
       <name>aliyun maven</name>
       <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
     </mirror>
   </mirrors>

IntelliJ IDEA 插件

  1. AceJump
  2. CodeGlance
  3. Free MyBatis plugin
  4. google-java-format
  5. IdeaVim
  6. Key Promoter
  7. Lombok
  8. Material Theme UI
  9. Relative Line Numbers

Visual Studio Code 配置

# 复制插件包 VSCode-extensions.zip 到 ~/.vscode 目录
unzip ~/.vscode/VSCode-extensions.zip

# 打开软件(选择)Code => Preferences => Settings =>(搜索)Line Numbers =>(选择)relative
# 打开软件(选择)Code => Preferences => Settings =>(搜索)Font Size =>(修改)14

Chrome 扩展

  1. cVim
  2. JSON Viewer
  3. Vue.js devtools
  4. Axure RP Extension for Chrome

results matching ""

    No results matching ""