whoru

学习、分享、交流、沉淀

Hexo 是一个快速、简洁且高效的博客框架。

基于 Markdown 解析出文章内容,快速生成静态页面文件。

本文以当前博客为例,介绍 Hexo 如何快速建立一个静态博客,并部署在 Github Pages 上(如果是部署在 Gitee 或 Coding 上,可自行修改本文中不一样的地方)。

关于 Hexo 的更多信息,详见官网:https://hexo.io/zh-cn

阅读全文 »

推荐直接使用一键切换脚本:一键切换brew国内镜像源

1. 基本镜像 formula

1.1. 替换

1
2
3
4
5
6
7
# 参见官网:https://mirror.tuna.tsinghua.edu.cn/help/homebrew
➜ git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
➜ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
➜ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git

# 更新
➜ brew update

1.2. 还原

1
2
3
4
5
➜  git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
➜ git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
➜ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git

➜ brew update

2. 二进制预编译包 bottles

1
2
3
4
# 参见官网:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew-bottles
# 如果你使用的不是 zsh,则替换 .zshrc 为 .bash_profile 或对应的文件
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc