Mac日常使用tricks
Published on 2024-03-30 19:57 in 分类: 环境配置 with 真真夜夜
分类: 环境配置

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来处理合并冲突。

posted @   真真夜夜  阅读(21)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
点击右上角即可分享
微信分享提示