{"action":"created","issue":{"url":"https://api.github.com/repos/jsw0528/MrZhang.me/issues/3","repository_url":"https://api.github.com/repos/jsw0528/MrZhang.me","labels_url":"https://api.github.com/repos/jsw0528/MrZhang.me/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/jsw0528/MrZhang.me/issues/3/comments","events_url":"https://api.github.com/repos/jsw0528/MrZhang.me/issues/3/events","html_url":"https://github.com/jsw0528/MrZhang.me/issues/3","id":65446787,"number":3,"title":"重装系统之后","user":{"login":"jsw0528","id":197375,"avatar_url":"https://avatars.githubusercontent.com/u/197375?v=3","gravatar_id":"","url":"https://api.github.com/users/jsw0528","html_url":"https://github.com/jsw0528","followers_url":"https://api.github.com/users/jsw0528/followers","following_url":"https://api.github.com/users/jsw0528/following{/other_user}","gists_url":"https://api.github.com/users/jsw0528/gists{/gist_id}","starred_url":"https://api.github.com/users/jsw0528/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsw0528/subscriptions","organizations_url":"https://api.github.com/users/jsw0528/orgs","repos_url":"https://api.github.com/users/jsw0528/repos","events_url":"https://api.github.com/users/jsw0528/events{/privacy}","received_events_url":"https://api.github.com/users/jsw0528/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jsw0528","id":197375,"avatar_url":"https://avatars.githubusercontent.com/u/197375?v=3","gravatar_id":"","url":"https://api.github.com/users/jsw0528","html_url":"https://github.com/jsw0528","followers_url":"https://api.github.com/users/jsw0528/followers","following_url":"https://api.github.com/users/jsw0528/following{/other_user}","gists_url":"https://api.github.com/users/jsw0528/gists{/gist_id}","starred_url":"https://api.github.com/users/jsw0528/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsw0528/subscriptions","organizations_url":"https://api.github.com/users/jsw0528/orgs","repos_url":"https://api.github.com/users/jsw0528/repos","events_url":"https://api.github.com/users/jsw0528/events{/privacy}","received_events_url":"https://api.github.com/users/jsw0528/received_events","type":"User","site_admin":false},"assignees":[{"login":"jsw0528","id":197375,"avatar_url":"https://avatars.githubusercontent.com/u/197375?v=3","gravatar_id":"","url":"https://api.github.com/users/jsw0528","html_url":"https://github.com/jsw0528","followers_url":"https://api.github.com/users/jsw0528/followers","following_url":"https://api.github.com/users/jsw0528/following{/other_user}","gists_url":"https://api.github.com/users/jsw0528/gists{/gist_id}","starred_url":"https://api.github.com/users/jsw0528/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsw0528/subscriptions","organizations_url":"https://api.github.com/users/jsw0528/orgs","repos_url":"https://api.github.com/users/jsw0528/repos","events_url":"https://api.github.com/users/jsw0528/events{/privacy}","received_events_url":"https://api.github.com/users/jsw0528/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2015-03-31T13:10:20Z","updated_at":"2016-07-13T15:40:01Z","closed_at":null,"body":"## 系统偏好设置\r\n\r\n* 更改电脑名称\r\n\r\n  > Sharing\r\n\r\n* 允许安装任何来源的 APP\r\n\r\n  > Security & Privacy --&gt; General\r\n\r\n* 设置快捷键\r\n\r\n  > Keyboard --&gt; Shortcuts\r\n\r\n* 允许 tab 键切换窗口按钮\r\n\r\n  > Keyboard --&gt; Shortcuts --&gt; Full Keyboard Access\r\n\r\n## 编辑 /etc/paths\r\n\r\n```\r\n/usr/local/bin\r\n/usr/local/sbin\r\n/usr/bin\r\n/usr/sbin\r\n/bin\r\n/sbin\r\n```\r\n\r\n## 通过 App Store 安装 [Xcode](https://developer.apple.com/xcode/)\r\n\r\n## 安装 Command Line Tools\r\n\r\n```\r\n$ xcode-select --install\r\n```\r\n\r\n## 安装 [Oh My Zsh](http://ohmyz.sh/)\r\n\r\n```\r\n$ sh -c \"$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)\"\r\n```\r\n\r\n自定义主题：`~/.oh-my-zsh/themes/^_^.zsh-theme`\r\n\r\n```\r\n# Symbols:\r\n# ☀ ✹ ☄ ♆ ♀ ♁ ♐ ♇ ♈ ♉ ♚ ♛ ♜ ♝ ♞ ♟ ♠ ♣ ⚢ ⚲ ⚳ ⚴ ⚥ ⚤ ⚦ ⚒ ⚑ ⚐ ♺ ♻ ♼ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷\r\n# ✡ ✔ ✖ ✚ ✱ ✤ ✦ ❤ ➜ ➟ ➼ ✂ ✎ ✐ ⨀ ⨁ ⨂ ⨍ ⨎ ⨏ ⨷ ⩚ ⩛ ⩡ ⩱ ⩲ ⩵  ⩶ ⨠\r\n# ⬅ ⬆ ⬇ ⬈ ⬉ ⬊ ⬋ ⬒ ⬓ ⬔ ⬕ ⬖ ⬗ ⬘ ⬙ ⬟  ⬤ 〒 ǀ ǁ ǂ ĭ Ť Ŧ     \r\n\r\nZSH_THEME_GIT_PROMPT_PREFIX=\"%{$fg[cyan]%}git:(%{$fg[magenta]%}\"\r\nZSH_THEME_GIT_PROMPT_SUFFIX=\"\"\r\nZSH_THEME_GIT_PROMPT_DIRTY=\"%{$fg[cyan]%}) %{$fg[yellow]%}✗\"\r\nZSH_THEME_GIT_PROMPT_CLEAN=\"%{$fg[cyan]%})\"\r\n\r\nZSH_THEME_NVM_PROMPT_PREFIX=\"%{$fg[cyan]%}node:(%{$fg[magenta]%}\"\r\nZSH_THEME_NVM_PROMPT_SUFFIX=\"%{$fg[cyan]%})\"\r\n\r\nPROMPT='\r\n%{$fg_bold[green]%}⬊ %~ %{$reset_color%} $(nvm_prompt_info) $(git_prompt_info)\r\n%{$fg[red]%}❤︎%{$reset_color%} '\r\n```\r\n\r\n## 配置墙内源\r\n\r\n编辑 `~/.zshrc`：\r\n\r\n```\r\nexport HOMEBREW_BOTTLE_DOMAIN=\"https://mirrors.ustc.edu.cn/homebrew-bottles\"\r\nexport NVM_NODEJS_ORG_MIRROR=\"https://npm.taobao.org/mirrors/node\"\r\nexport ELECTRON_MIRROR=\"https://npm.taobao.org/mirrors/electron/\"\r\nexport PHANTOMJS_MIRROR=\"https://npm.taobao.org/mirrors/phantomjs\"\r\n```\r\n\r\n## 安装 [Homebrew](http://brew.sh/)\r\n\r\n```\r\n$ ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\r\n```\r\n\r\n## 安装 git, [autojump](https://github.com/joelthelion/autojump), [httpie](https://github.com/jkbrzt/httpie), tree\r\n\r\n```\r\n$ brew install git autojump httpie tree\r\n```\r\n\r\ne.g.\r\n\r\n```\r\n$ tree -L 2 -I node_modules     # 打印目录结构\r\n$ http -h https://baidu.com     # 获取 HTTP 请求的相应头\r\n```\r\n\r\n## 生成 SSH 公钥\r\n\r\n```\r\n$ ssh-keygen -t rsa\r\n```\r\n\r\n## 安装 [nvm](https://github.com/creationix/nvm)\r\n\r\n```\r\n$ curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash\r\n```\r\n\r\n## 安装 node.js\r\n\r\n```\r\n$ nvm i 4\r\n$ nvm alias default node\r\n```\r\n\r\n## 安装 [rbenv](https://github.com/sstephenson/rbenv)\r\n\r\n```\r\n$ brew install rbenv ruby-build rbenv-gemset\r\n$ echo 'eval \"$(rbenv init -)\"' >> ~/.zshrc\r\n```\r\n\r\n## 安装 Ruby\r\n\r\n> OS X 10.9+ 自带 Ruby 2.0.0，使用时加 `sudo` 即可\r\n\r\n```\r\n$ rbenv install -l     # list all available versions\r\n$ rbenv install 2.3.0  # install a Ruby version\r\n$ rbenv global 2.3.0   # set the global version\r\n$ rbenv versions       # list all installed Ruby versions\r\n```\r\n\r\n## 配置 gem 墙内源\r\n\r\n```\r\n$ gem sources -a http://gems.ruby-china.org -r https://rubygems.org/\r\n$ echo 'gem: --no-document' >> ~/.gemrc\r\n```\r\n\r\n替换掉源之后，执行 `gem sources -l`，确保只有 `http://gems.ruby-china.org`\r\n\r\n> 还有个阿里云的源 http://mirrors.aliyun.com/rubygems/ ，哪个速度快就用哪个。\r\n\r\n如果你使用 Gemfile 和 Bundle (例如：Rails 项目)，你可以用 Bundler 的 [Gem 源代码镜像命令](http://bundler.io/v1.5/bundle_config.html#gem-source-mirrors)：\r\n\r\n```\r\n$ bundle config mirror.https://rubygems.org http://gems.ruby-china.org\r\n```\r\n\r\n这样使用 bundle 安装 gems 时，就会以此为准，忽略 Gemfile 里的配置。\r\n\r\n## 安装 MongoDB, MySQL\r\n\r\n```\r\n$ brew install mongodb mysql\r\n```\r\n\r\n设置开机自启动「可选」：\r\n\r\n```\r\n$ mkdir -p ~/Library/LaunchAgents\r\n$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents\r\n$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents\r\n```\r\n\r\n## `~/.zshrc` 全貌\r\n\r\n```\r\n# mirrors\r\nexport HOMEBREW_BOTTLE_DOMAIN=\"https://mirrors.ustc.edu.cn/homebrew-bottles\"\r\nexport NVM_NODEJS_ORG_MIRROR=\"https://npm.taobao.org/mirrors/node\"\r\nexport ELECTRON_MIRROR=\"https://npm.taobao.org/mirrors/electron/\"\r\nexport PHANTOMJS_MIRROR=\"https://npm.taobao.org/mirrors/phantomjs\"\r\n\r\n# zsh\r\nZSH=$HOME/.oh-my-zsh\r\nZSH_THEME=\"^_^\"\r\nplugins=(autojump nvm sublime)\r\nsource $ZSH/oh-my-zsh.sh\r\n\r\n# ruby\r\neval \"$(rbenv init -)\"\r\n\r\n# PATH\r\nexport JAVA_HOME=`/usr/libexec/java_home -v 1.8`\r\nexport MAVEN_HOME=\"/usr/local/Cellar/maven/3.2.5\"\r\nexport ANDROID_HOME=$HOME/Library/Android/sdk\r\nexport PATH=${PATH}:${JAVA_HOME}/bin:${MAVEN_HOME}/bin\r\nexport NODE_PATH=`npm root -g`\r\n\r\n# alias\r\nalias mongod=\"mongod --config /usr/local/etc/mongod.conf\"\r\nalias sm=subl\r\nalias xb=xcodebuild\r\nalias lap=\"ls -lap\"\r\nalias gb=\"git branch\"\r\nalias gc=\"git checkout\"\r\nalias mk=\"make\"\r\nalias hh=\"http -h\"\r\nalias x=sofax\r\nalias ti=\"tnpm ii\"\r\nalias tig=\"tnpm ii -g\"\r\nalias tls=\"tnpm ls -g --depth=0\"\r\nalias adb=$ANDROID_HOME/platform-tools/adb\r\nalias tree2=\"tree -L 2 -I node_modules\"\r\nalias tree3=\"tree -L 3 -I node_modules\"\r\nalias tree4=\"tree -L 4 -I node_modules\"\r\n\r\nfanqiang() {\r\n  export http_proxy=\"http://localhost:10086\"\r\n  export https_proxy=\"http://localhost:10086\"\r\n  echo \"👌\"\r\n}\r\n```\r\n\r\n## [Sublime Text 3](http://www.sublimetext.com/3)\r\n\r\n[__Package Control__](https://sublime.wbond.net/installation)\r\n\r\n> `Babel`、`Console API`、`Velocity`、`LESS`、`SCSS`\r\n> `ConvertToUTF8`、`Codecs33`、`BracketHighlighter`\r\n> `Terminal`\r\n\r\n__Settings__\r\n\r\n```\r\n{\r\n  \"default_line_ending\": \"unix\",\r\n  \"ensure_newline_at_eof_on_save\": true,\r\n  \"file_exclude_patterns\": [ \".DS_Store\", \"*.zip\" ],\r\n  \"folder_exclude_patterns\": [ \".git\", \".svn\" ],\r\n  \"font_size\": 18,\r\n  \"highlight_line\": true,\r\n  \"highlight_modified_tabs\": true,\r\n  \"line_padding_top\": 5,\r\n  \"open_files_in_new_window\": false,\r\n  \"show_encoding\": true,\r\n  \"tab_size\": 2,\r\n  \"translate_tabs_to_spaces\": true,\r\n  \"trim_automatic_white_space\": false,\r\n  \"trim_trailing_white_space_on_save\": true,\r\n  \"word_separators\": \"./\\\\()\\\"':,.;<>~!@#$%^&*|+=[]{}`~?\"\r\n}\r\n```\r\n\r\n__Key Bindings__\r\n\r\n```\r\n[\r\n  // Add folder to project\r\n  { \"keys\": [\"super+shift+o\"], \"command\": \"prompt_add_folder\" },\r\n  // Match with `ctrl+shift+k`\r\n  { \"keys\": [\"ctrl+shift+d\"], \"command\": \"duplicate_line\" },\r\n  { \"keys\": [\"alt+up\", \"alt+1\"], \"command\": \"fold_by_level\", \"args\": {\"level\": 1} },\r\n  { \"keys\": [\"alt+up\", \"alt+2\"], \"command\": \"fold_by_level\", \"args\": {\"level\": 2} },\r\n  { \"keys\": [\"alt+up\", \"alt+3\"], \"command\": \"fold_by_level\", \"args\": {\"level\": 3} },\r\n  { \"keys\": [\"alt+up\", \"alt+4\"], \"command\": \"fold_by_level\", \"args\": {\"level\": 4} },\r\n  { \"keys\": [\"alt+up\", \"alt+5\"], \"command\": \"fold_by_level\", \"args\": {\"level\": 5} },\r\n  { \"keys\": [\"alt+up\", \"alt+6\"], \"command\": \"fold_by_level\", \"args\": {\"level\": 6} },\r\n  { \"keys\": [\"alt+up\", \"alt+7\"], \"command\": \"fold_by_level\", \"args\": {\"level\": 7} },\r\n  { \"keys\": [\"alt+up\", \"alt+8\"], \"command\": \"fold_by_level\", \"args\": {\"level\": 8} },\r\n  { \"keys\": [\"alt+up\", \"alt+9\"], \"command\": \"fold_by_level\", \"args\": {\"level\": 9} },\r\n  { \"keys\": [\"alt+down\"], \"command\": \"unfold_all\" },\r\n  { \"keys\": [\"alt+up\",\"alt+up\"], \"command\": \"sftp_upload_file\" },\r\n  // Go to left bracket\r\n  {\r\n    \"keys\": [\"ctrl+alt+super+up\"],\r\n    \"command\": \"bh_key\",\r\n    \"args\": {\r\n      \"no_outside_adj\": true,\r\n      \"lines\" : true,\r\n      \"plugin\": {\r\n        \"type\": [\"__all__\"],\r\n        \"command\": \"bh_modules.bracketselect\",\r\n        \"args\": {\"select\": \"left\"}\r\n      }\r\n    }\r\n  },\r\n  // Go to right bracket\r\n  {\r\n    \"keys\": [\"ctrl+alt+super+down\"],\r\n    \"command\": \"bh_key\",\r\n    \"args\": {\r\n      \"no_outside_adj\": true,\r\n      \"lines\": true,\r\n      \"plugin\": {\r\n        \"type\": [\"__all__\"],\r\n        \"command\": \"bh_modules.bracketselect\",\r\n        \"args\": {\"select\": \"right\"}\r\n      }\r\n    }\r\n  }\r\n]\r\n```"},"comment":{"url":"https://api.github.com/repos/jsw0528/MrZhang.me/issues/comments/232395512","html_url":"https://github.com/jsw0528/MrZhang.me/issues/3#issuecomment-232395512","issue_url":"https://api.github.com/repos/jsw0528/MrZhang.me/issues/3","id":232395512,"user":{"login":"xudafeng","id":1011681,"avatar_url":"https://avatars.githubusercontent.com/u/1011681?v=3","gravatar_id":"","url":"https://api.github.com/users/xudafeng","html_url":"https://github.com/xudafeng","followers_url":"https://api.github.com/users/xudafeng/followers","following_url":"https://api.github.com/users/xudafeng/following{/other_user}","gists_url":"https://api.github.com/users/xudafeng/gists{/gist_id}","starred_url":"https://api.github.com/users/xudafeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xudafeng/subscriptions","organizations_url":"https://api.github.com/users/xudafeng/orgs","repos_url":"https://api.github.com/users/xudafeng/repos","events_url":"https://api.github.com/users/xudafeng/events{/privacy}","received_events_url":"https://api.github.com/users/xudafeng/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T15:40:01Z","updated_at":"2016-07-13T15:40:01Z","body":":+1"}}
{"actor":{"display_login":"xudafeng"}}