Mac日常使用tricks
MACOS
1. 破解软件绕过签名的办法,应用已损坏
sudo xattr -rd com.apple.quarantine /Applications/xxxxxx.app
2. mac终端在粘贴时有多余字符:00~ ~01之类的
printf '\e[?2004l'
3. Mac 终端滚轮不滚页面,而是滚历史命令
tput rmcup
Homebrew
1. 安装 homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Homebrew是一款自由及开放源代码的软件包管理系统,用以简化macOS系统上的软件安装过程。
如果网络不好,可以使用镜像源
"$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"
2. homebrew 降级软件包
$brew unlink node
$brew link --overwrite --force node@20
Oh My Zsh
1. 安装 oh-my-zsh 并开启自动补全
# curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# wegt
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
# 国内镜像加速
wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh && sudo chmod a+x install.sh && ./install.sh
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
vim ~/.zshrc
# 加入插件列表
plugins=(git zsh-autosuggestions zsh-completions)
source ~/.zshrc
git
当其他人已经修改并提交仓库之后,我们可以使用git pull --rebase
来拉取最新的修改,git会先将我们的修改放在一边,并尝试在最新修改的基础上进行合并,这保持了git分支的线性。如果遇到了合并冲突,我们需要git rebase --abort
来撤销修改,并使用git pull
来处理合并冲突。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探