Skip to content

Instantly share code, notes, and snippets.

@Letbeauty
Forked from BB9z/macOS reinstall.md
Created May 11, 2014 06:22
Show Gist options
  • Save Letbeauty/af0c572f3365c8d56cfd to your computer and use it in GitHub Desktop.
Save Letbeauty/af0c572f3365c8d56cfd to your computer and use it in GitHub Desktop.

迁移文件,powertoys,system,config

顺序安装,恢复环境

终端

  • 首先安装 brew,中间可能会提示安装 Command line tool,必须先安装。命令
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
brew install zsh
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
# 还原我的配置
echo "\nsource \"\$HOME/.config/zsh/my.sh\"" >> ~/.zshrc
brew install python
pip install shadowsocks
brew openssl swig libevent
pip install m2crypto gevent
~/bin/cfw.command

输入设备

  • 触控板更多手势,只留前三个
  • 导入BTT预设

等待安装下载可以做的

asepsisctl diagnose
asepsisctl make_dscage
asepsisctl migratein
  • Evernote 账本恢复
  • 修改系统字体,TinkerTool,安装 XHei、禁用 XHei SimSun
  • 恢复 Quick Look 插件,安装高亮插件依赖、恢复文字选中:
brew install highlight
defaults write com.apple.finder QLEnableTextSelection -bool true;
  • zsh 后续配置
brew install zsh-syntax-highlighting autojump zsh-completions
echo "\nsource /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
source-zsh
# 修改开启的插件:autojump brew colored-man forklift gem history-substring-search pod
  • polipo 配置
brew install polipo

# 修改日志权限
sudo touch /var/log/polipo
sudo chown $USER /var/log/polipo

# 检查配置
polipo -v -c ~/.config/polipo/conf
  • 恢复文件关联
m ~/Library/Preferences/com.apple.LaunchServices.plist

添加

{	LSHandlerContentType = "public.folder";
	LSHandlerRoleAll = "com.binarynights.forklift2";
},
{	LSHandlerContentType = "public.unix-executable";
	LSHandlerRoleShell = "com.googlecode.iterm2";
},
{	LSHandlerContentType = "com.apple.terminal.shell-script";
	LSHandlerRoleViewer = "com.googlecode.iterm2";
},
{	LSHandlerContentType = "public.plain-text";
	LSHandlerRoleAll = "com.macromates.textmate.preview";
},
{	LSHandlerContentType = "net.daringfireball.markdown";
	LSHandlerRoleAll = "com.mouapp.mou";
},
{	LSHandlerContentTag = "mk";
	LSHandlerContentTagClass = "public.filename-extension";
	LSHandlerRoleAll = "com.mouapp.mou";
},

  • Time Machine 忽略路径

打开配置文件:

open /Library/Preferences/com.apple.TimeMachine.plist

恢复:

/Applications
~BB9z/.cocoapods
~BB9z/Downloads
~BB9z/Music/iTunes/iTunes Media/Downloads
~BB9z/Music/iTunes/iTunes Media/iTunes U
~BB9z/Music/iTunes/iTunes Media/Mobile Applications
~BB9z/Library/Saved Application State
~BB9z/Library/Developer/Xcode/DerivedData
~BB9z/Library/Developer/Xcode/iOS Device Logs
~BB9z/Library/Developer/Xcode/iOS DeviceSupport
~BB9z/Library/Developer/Shared/Documentation/DocSets
~BB9z/Library/Containers/com.tencent.qq/Data/Library/Application Support/QQ/Logs

另参: http://apple.stackexchange.com/questions/25779/on-lion-what-files-are-excluded-by-rule-from-a-time-machine-backup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment