Think before you speak, read before you think.

Category: macOS

  • brew 切换 python 版本

    切换 python 至 3.6.5 brew list python –versions brew switch python 3.6.5 升级 python3 brew install python3 link 切换 ➜ ✗ brew link python Linking /usr/local/Cellar/python/3.7.7… Error: Could not symlink Frameworks/Python.framework/Headers Target /usr/local/Frameworks/Python.framework/Headers is a symlink belonging to python@2. You can unlink it: brew unlink python@2 解除 python@2 link Unlinking /usr/local/Cellar/python@2/2.7.17… 34 symlinks removed To…

  • macOS 屏幕相关

    1. mission control => 触发角 => 启用屏幕保护程序 or 将显示器置入睡眠状态 2. 安全性与隐私 => 进入睡眠或开始屏幕保护程序 立即 要求输入密码 接下来使用触发角就可以立即锁屏了 新版 mac 使用 ctrl + command + q Question: how to quick switch between mirror and extended display in macOS 切换 mirror 和 扩展模式: command + F1 If you need to temporarily see your Dock or your open windows…

  • macOS iCloud Drive path

    The path of iCloud Drive is ~/Library/Mobile\ Documents/com~apple~CloudDocs How to find this path Finder => View => Show Path Bar => Open iCloud Drive, in the bottom, right click, we can Copy “iCloud Drive” as Pathname We can create a symbolic link for the path ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs icloud Or an alias, cdi equals…

  • brew安装多版本 清理包和 img

    by

    in

    brew 安装多版本 例子,当前 gradle 5.2.1 ,想将 4.10.2 装上,找到 formula 的 git 目录,切到对应 4.10.2 的 commit,安装,安装完之后再切回 master $ brew list gradle –versions gradle 5.2.1 $ cd “$(brew –repo homebrew/core)” $ pwd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core $ git log master — Formula/gradle.rb … commit 01e0511df2c37b052a9659797f3c09df3f20d533 Author: Jerome Lapostolet Date: Thu Sep 20 08:51:53 2018 +0100 gradle 4.10.2 … $ git…

  • git notes

    level 6 rebase git fetch只获取,并不合并 本地与远端使用git rebase git rebase进行了三步操作 把所有master的改变放到一个临时区域里面 运行所有origin/master的提交 运行在临时区域的commits 本地两个分支间的rebase,master和  develop均有提交 在develop分支下, git rebase master 然后再git checkout master 把develp合并过来 git merge develop conflicts本地master和远端origin/master都修改了同一个文件,并在本地提交 解决冲突 在master上git fetch 然后git rebase,这样保证在master上有最新的代码 这里会提示有冲突 当解决了问题,则用git rebase –continue level 7 git log sha hash git config –global color.ui true git log –pretty=oneline git log –oneline –stat 当前分支与 master…

  • mac terminal 查词典

    在 mac 的 terminal 下打开词典并查 blog open dict://blog 要输入的命令有点长,于是在 ~/.zshrc 中添加函数 dict(){ open dict://$1 } 在 terminal 中可以这样查 dict blog