├── .gitignore ├── .gitmodules ├── Chrome ├── README.md └── 插件列表.md ├── JetBrains ├── .ideavimrc ├── README.md ├── code-style.md ├── ideavim设置.md ├── keygen.zip ├── webstorm2017-key.txt ├── 代码配色.md └── 使用.md ├── README.md ├── atom ├── .apmrc ├── README.md ├── apm.md ├── keymaps管理.md ├── 主题配色推荐.md ├── 推荐的插件.md └── 设置详解.md ├── autohotkey ├── README.md ├── TODO.md ├── fast-open.ahk ├── keymaps.ahk └── osx-keybinding.ahk ├── command ├── README.md ├── alias.md ├── autojump │ └── README.md ├── clink │ └── README.md ├── emulators │ ├── README.md │ └── windows.md └── windows-bash-command │ └── README.md ├── dotfiles ├── Mac │ ├── RIME │ │ ├── default-config │ │ │ ├── cangjie5.prism.bin │ │ │ ├── cangjie5.reverse.bin │ │ │ ├── cangjie5.schema.yaml │ │ │ ├── cangjie5.table.bin │ │ │ ├── default.yaml │ │ │ ├── installation.yaml │ │ │ ├── luna_pinyin.prism.bin │ │ │ ├── luna_pinyin.reverse.bin │ │ │ ├── luna_pinyin.schema.yaml │ │ │ ├── luna_pinyin.table.bin │ │ │ ├── luna_pinyin.userdb │ │ │ │ ├── 000005.ldb │ │ │ │ ├── CURRENT │ │ │ │ ├── LOCK │ │ │ │ ├── LOG │ │ │ │ ├── LOG.old │ │ │ │ └── MANIFEST-000007 │ │ │ ├── luna_pinyin_fluency.prism.bin │ │ │ ├── luna_pinyin_fluency.schema.yaml │ │ │ ├── luna_pinyin_simp.prism.bin │ │ │ ├── luna_pinyin_simp.schema.yaml │ │ │ ├── luna_pinyin_tw.prism.bin │ │ │ ├── luna_pinyin_tw.schema.yaml │ │ │ ├── squirrel.custom.yaml │ │ │ ├── squirrel.yaml │ │ │ ├── stroke.prism.bin │ │ │ ├── stroke.reverse.bin │ │ │ ├── stroke.schema.yaml │ │ │ ├── stroke.table.bin │ │ │ ├── symbols.yaml │ │ │ └── user.yaml │ │ ├── leo-custom │ │ │ ├── default.custom.yaml │ │ │ ├── double_pinyin.custom.yaml │ │ │ ├── luna_pinyin.custom.yaml │ │ │ ├── luna_pinyin_simp.custom.yaml │ │ │ └── squirrel.custom.yaml │ │ └── sync.zip │ ├── git │ │ ├── .gitconfig │ │ ├── .gitignore_global │ │ └── .stCommitMsg │ ├── hyper │ │ ├── .hyper.js │ │ └── .hyper_plugins │ │ │ └── package.json │ ├── iTerm2 │ │ ├── com.googlecode.iterm2.plist │ │ └── ocean-next.itermcolors │ ├── npm │ │ └── .npmrc │ ├── setup.sh │ ├── sublimetext │ │ └── User │ │ │ ├── Default (OSX).sublime-keymap │ │ │ ├── Package Control.sublime-settings │ │ │ ├── Preferences.sublime-settings │ │ │ ├── Terminal.sublime-settings │ │ │ ├── snippet │ │ │ ├── CSS │ │ │ │ └── comment.sublime-snippet │ │ │ ├── HTML │ │ │ │ └── html5mobile.sublime-snippet │ │ │ └── JavaScript │ │ │ │ ├── JavaScript │ │ │ │ └── log.sublime-snippet │ │ │ │ └── jQuery │ │ │ │ └── jqi.sublime-snippet │ │ │ └── theme │ │ │ ├── Made_of_Code.tmtheme │ │ │ ├── Monokai (SL).tmTheme │ │ │ └── Peacock (SL).tmTheme │ ├── webStorm │ │ ├── .ideavimrc │ │ └── webstorm-settings-mac.jar │ ├── yarn │ │ ├── package.json │ │ └── yarn.lock │ └── zsh │ │ ├── .zshrc │ │ ├── README.md │ │ └── theme │ │ └── my-cloud-theme.zsh-theme ├── README.md └── Windows │ ├── Bin │ └── alias.bat │ ├── ConEmu │ ├── config.xml │ └── user-profile.ps1 │ ├── Intellij IDEA │ └── settings.jar │ ├── WebStorm │ └── settings-0528.jar │ ├── autoHotKey │ └── fast-open.ahk │ ├── git │ └── at-work │ │ └── .gitconfig │ ├── node │ ├── npm │ │ ├── README.md │ │ └── at-work │ │ │ ├── .cnpmrc │ │ │ └── .npmrc │ ├── nvm │ │ ├── README.md │ │ └── settings.txt │ └── yarn │ │ ├── .yarnrc │ │ └── README.md │ ├── sublimetext │ └── User │ │ ├── CSS.sublime-settings │ │ ├── Default (Windows).sublime-keymap │ │ ├── Package Control.sublime-settings │ │ ├── Preferences.sublime-settings │ │ ├── snippet │ │ ├── CSS │ │ │ └── comment.sublime-snippet │ │ ├── HTML │ │ │ └── html5.sublime-snippet │ │ └── JavaScript │ │ │ ├── JavaScript │ │ │ └── log.sublime-snippet │ │ │ └── jQuery │ │ │ └── jqi.sublime-snippet │ │ └── theme │ │ ├── Made_of_Code.tmtheme │ │ ├── Monokai (SL).tmTheme │ │ └── Peacock (SL).tmTheme │ ├── webstorm-settings-windows.jar │ └── yaheiconsolashybrid_1.2.ttf ├── emacs ├── .spacemacs.d │ ├── .gitignore │ ├── README.md │ ├── custom.el │ ├── init.el │ ├── layers │ │ └── leohxj │ │ │ ├── README.org │ │ │ ├── keybindings.el │ │ │ └── packages.el │ └── snippets │ │ └── README.md └── README.md ├── front-end ├── eslint │ ├── .eslintrc-es5-recommand.js │ └── .eslintrc-es6-recommand.js ├── gulp │ ├── gulp-with-es6.md │ └── gulp插件.md ├── jsdoc-demo │ └── jsdoc-demos.js ├── json-server │ ├── README.md │ ├── ajax-cors.json │ ├── ajax-json.json │ ├── ajax-jsonp.json │ ├── json-server.json │ └── public │ │ └── index.html └── webpack │ ├── README.md │ ├── loader.md │ └── plugin.md ├── git ├── README.md ├── gitignore │ ├── .gitignore-tpl │ └── README.md └── git相关命令.md ├── nodejs ├── README.md ├── cnpm与npm镜像.md ├── node的安装与升级.md ├── npm命令使用.md ├── npm安装与升级.md ├── npm推荐模块.md ├── npm配置.md ├── packagejson配置讲解.md ├── windows下难安装的包.md ├── yarn │ ├── README.md │ └── global-6.9.2 │ │ ├── package.json │ │ └── yarn.lock ├── 包管理工具-yarn.md └── 模块的使用.md ├── proxy ├── README.md ├── SwitchyOmega │ ├── OmegaOptions-work-leo.bak │ ├── OmegaOptions-work-sn.bak │ ├── README.md │ └── SwitchyOmega.crx ├── pac │ └── README.md ├── proxifier │ ├── README.md │ ├── key.md │ └── profile │ │ ├── Default.ppx │ │ ├── SuningOfficeDefault.ppx │ │ └── atSuningOffice.ppx └── shadowsocks │ └── README.md ├── recommend-software ├── README.md ├── android.md ├── category │ ├── bookmarket.md │ ├── data-sync.md │ ├── developer.md │ ├── download.md │ ├── editor-and-IDE.md │ ├── fast-operate.md │ ├── fonts.md │ ├── games.md │ ├── mindmap.md │ ├── record.md │ ├── system-manager.md │ ├── time-master.md │ ├── white-noise.md │ ├── windows-split.md │ └── writer.md ├── ios.md ├── linux.md ├── mac.md └── windows │ ├── README.md │ ├── developer.md │ └── productivity.md ├── sublimetext3 ├── README.md └── 插件列表.md └── vim-mode ├── .gvimrc.local ├── .vimrc.before.local ├── .vimrc.bundles.local ├── .vimrc.local ├── README.md ├── cheat-sheet.md ├── how-to-copy-paste.md ├── vim-tutor.md └── vundle-plugins.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/macos,windows,node 3 | 4 | ### macOS ### 5 | *.DS_Store 6 | .AppleDouble 7 | .LSOverride 8 | 9 | # Icon must end with two \r 10 | Icon 11 | 12 | 13 | # Thumbnails 14 | ._* 15 | 16 | # Files that might appear in the root of a volume 17 | .DocumentRevisions-V100 18 | .fseventsd 19 | .Spotlight-V100 20 | .TemporaryItems 21 | .Trashes 22 | .VolumeIcon.icns 23 | .com.apple.timemachine.donotpresent 24 | 25 | # Directories potentially created on remote AFP share 26 | .AppleDB 27 | .AppleDesktop 28 | Network Trash Folder 29 | Temporary Items 30 | .apdisk 31 | 32 | 33 | ### Windows ### 34 | # Windows image file caches 35 | Thumbs.db 36 | ehthumbs.db 37 | 38 | # Folder config file 39 | Desktop.ini 40 | 41 | # Recycle Bin used on file shares 42 | $RECYCLE.BIN/ 43 | 44 | # Windows Installer files 45 | *.cab 46 | *.msi 47 | *.msm 48 | *.msp 49 | 50 | # Windows shortcuts 51 | *.lnk 52 | 53 | 54 | ### Node ### 55 | # Logs 56 | logs 57 | *.log 58 | npm-debug.log* 59 | 60 | # Runtime data 61 | pids 62 | *.pid 63 | *.seed 64 | *.pid.lock 65 | 66 | # Directory for instrumented libs generated by jscoverage/JSCover 67 | lib-cov 68 | 69 | # Coverage directory used by tools like istanbul 70 | coverage 71 | 72 | # nyc test coverage 73 | .nyc_output 74 | 75 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 76 | .grunt 77 | 78 | # node-waf configuration 79 | .lock-wscript 80 | 81 | # Compiled binary addons (http://nodejs.org/api/addons.html) 82 | build/Release 83 | 84 | # Dependency directories 85 | node_modules 86 | jspm_packages 87 | 88 | # Optional npm cache directory 89 | .npm 90 | 91 | # Optional REPL history 92 | .node_repl_history 93 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "emacs/spacemacs-private"] 2 | path = emacs/spacemacs-private 3 | url = https://github.com/zilongshanren/spacemacs-private.git 4 | -------------------------------------------------------------------------------- /Chrome/README.md: -------------------------------------------------------------------------------- 1 | Chome浏览器相关设置和插件。 -------------------------------------------------------------------------------- /Chrome/插件列表.md: -------------------------------------------------------------------------------- 1 | - [29个前端工程师和设计师必备的Chrome插件](http://get.ftqq.com/8215.get/) 2 | - [更改Chrome 开发者工具外观](http://www.kazaff.me/2012/10/25/%E6%9B%B4%E6%94%B9chrome-%E5%BC%80%E5%8F%91%E8%80%85%E5%B7%A5%E5%85%B7%E5%A4%96%E8%A7%82/) 3 | 4 | ## 提示体验 5 | - [SwitchyOmega](https://github.com/FelisCatus/SwitchyOmega): Chrome的一个扩展插件,提供代理管理和切换功能。 6 | - [uBlock Origin](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm/related): 广告拦截 7 | - [Adblock Plus](https://chrome.google.com/webstore/detail/adblock-plus/cfhdojbkjhnklbpkdaibdccddilifddb): 广告拦截 8 | - [Vimium](https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?utm_source=chrome-app-launcher-info-dialog) 9 | - [The Great Suspender](https://chrome.google.com/webstore/detail/the-great-suspender/klbibkeccnjlkjkiokjodocebajanakg): 挂起长期不使用的页面 10 | - [One Tab](https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall?utm_source=chrome-app-launcher-info-dialog): 一键收纳标签页 11 | - [Ghostery](https://chrome.google.com/webstore/detail/ghostery/mlomiejdfkolichcflejclcbmpeaniij): 显示网站跟踪信息 12 | - [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo/related): “油猴”,自定义脚本 13 | - [Speed Dial 2](): chrome 启动页 14 | - [Grammarly for Chrome](): 英语语法和拼写检测 15 | 16 | ## 前端开发插件 17 | - [DevTools Theme: Zero Dark Matrix](https://chrome.google.com/webstore/detail/devtools-theme-zero-dark/bomhdjeadceaggdgfoefmpeafkjhegbo?hl=en-US) 18 | - [Accessibility Developer Tools](https://chrome.google.com/webstore/detail/accessibility-developer-t/fpkknkljclfencbdbgkenhalefipecmb?utm_source=chrome-app-launcher-info-dialog): 查看网页用什么架构 19 | - [DOM Monster](https://chrome.google.com/webstore/detail/dom-monster/hlimphkgopfdlelabkioalhfjfblnclk?utm_source=chrome-app-launcher-info-dialog) 20 | - [EditThisCookie](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?utm_source=chrome-app-launcher-info-dialog) 21 | - [Emmet LiveStyle](https://chrome.google.com/webstore/detail/emmet-livestyle/diebikgmpmeppiilkaijjbdgciafajmg?utm_source=chrome-app-launcher-info-dialog) 22 | - [Emmet Re:View](https://chrome.google.com/webstore/detail/emmet-review/epejoicbhllgiimigokgjdoijnpaphdp?utm_source=chrome-app-launcher-info-dialog) 23 | - [Flip the Script](https://chrome.google.com/webstore/detail/flip-the-script/bmkpjhjogcjpioeffjmdgclmeiiofcjp?utm_source=chrome-app-launcher-info-dialog) 24 | - [JetBrains IDE Support](https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji?utm_source=chrome-app-launcher-info-dialog) 25 | - [jQuery Debugger](https://chrome.google.com/webstore/detail/jquery-debugger/dbhhnnnpaeobfddmlalhnehgclcmjimi?utm_source=chrome-app-launcher-info-dialog) 26 | - [JSON Format](https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?utm_source=chrome-app-launcher-info-dialog) 27 | - [JSON Viewer](https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh?utm_source=chrome-app-launcher-info-dialog) 28 | - [Pinboard Tools](https://chrome.google.com/webstore/detail/pinboard-tools/dpaohcncbmkojcpcjaojcehdlnjfbjkl?utm_source=chrome-app-launcher-info-dialog) 29 | - [Save to Pocket](https://chrome.google.com/webstore/detail/save-to-pocket/niloccemoadcdkdjlinkgdfekeahmflj?utm_source=chrome-app-launcher-info-dialog) 30 | - [Visual Event](https://chrome.google.com/webstore/detail/visual-event/pbmmieigblcbldgdokdjpioljjninaim?utm_source=chrome-app-launcher-info-dialog) 31 | - [Wappalyzer](https://chrome.google.com/webstore/detail/wappalyzer/gppongmhjkpfnbhagpmjfkannfbllamg?utm_source=chrome-app-launcher-info-dialog) 32 | - [Web Developer](https://chrome.google.com/webstore/detail/web-developer/bfbameneiokkgbdmiekhjnmfkcnldhhm?utm_source=chrome-app-launcher-info-dialog) 33 | - [Web Tracing Framework](https://chrome.google.com/webstore/detail/web-tracing-framework/gmdhhnlkjmknaopofnadmoamhmnlicme?utm_source=chrome-app-launcher-info-dialog) 34 | - [WhatFont](https://chrome.google.com/webstore/detail/whatfont/jabopobgcpjmedljpbcaablpmlmfcogm?utm_source=chrome-app-launcher-info-dialog) 35 | - [YSlow](https://chrome.google.com/webstore/detail/yslow/ninejjcohidippngpapiilnmkgllmakh?utm_source=chrome-app-launcher-info-dialog) 36 | - [jessepollak/command](https://github.com/jessepollak/command): 输入框内插入emoji, gifs 37 | 38 | ## github 优化 39 | - [OctoLinker](https://github.com/OctoLinker/browser-extension): 识别 require 之类的依赖关系,进行跳转 40 | - [refined-github](https://github.com/sindresorhus/refined-github): 优化 github 展示 41 | - [Octotree](): 右侧显示 github 代码结构 42 | - [ZenHub for GitHub](): github 项目管理插件 43 | -------------------------------------------------------------------------------- /JetBrains/.ideavimrc: -------------------------------------------------------------------------------- 1 | set clipboard=unnamed 2 | set surround 3 | 4 | nnoremap x "_x 5 | vnoremap x "_x 6 | 7 | let mapleader = " " 8 | map a :action $SelectAll 9 | -------------------------------------------------------------------------------- /JetBrains/README.md: -------------------------------------------------------------------------------- 1 | 一家专注于开发工具研发的公司,使用较多的是 `IntelliJ IDEA` 和 `WebStorm`。 -------------------------------------------------------------------------------- /JetBrains/code-style.md: -------------------------------------------------------------------------------- 1 | # 代码格式 2 | 内置的 `Code Style` 可以根据文件,设置不同的代码格式,估计和 [editorconfig](http://editorconfig.org/) 有点类似。 3 | 4 | ## JavaScript 5 | 设置变量对齐方式。选择 `Editor -> Code Style -> JavaScript -> Other`,设置其中的: 6 | 7 | - Align object properties: on Colon 8 | - Align 'var' statement and assignments: Align multiple 'var' statements and assignments 9 | 10 | -------------------------------------------------------------------------------- /JetBrains/ideavim设置.md: -------------------------------------------------------------------------------- 1 | # IdeaVim 设置 2 | vim 快捷键与 WebStrom 自带的快捷键会有冲突,需要进行设置,决定在 vim-mode 下,冲突的快捷键,具体制定什么操作,具体的设置在 `Settings -> Other Settings -> Vim Emulation` 中。 3 | 4 | - `Ctrl + a/b/e/f/p/n` 保留为系统的光标移动。 5 | - `ctrl + h/o/d/u` 作为 vim 方式 6 | - `Ctrl + a/c/x/v` 保留系统操作方式,全选,复制,粘贴 7 | 8 | 9 | ## 使用 tips 10 | - 可以在 `tools->Vim Emulation` 关闭/开启 vim 模式。 11 | - 善用 `.ideavim` 配置 vim 12 | 13 | ## 开启插件 14 | `set `, 目前支持 `vim-surround`, 在配置中写入 `set surround` 即可使用 `ys,cs,ds,S` 命令。 15 | 16 | 17 | 18 | ## 参考 19 | - [IdeaVim插件施用技巧](https://my.oschina.net/pureboys/blog/182211) 20 | - [Escape to IntelliJ IDEA shortcuts from IdeaVim](http://stackoverflow.com/questions/31970413/escape-to-intellij-idea-shortcuts-from-ideavim/33988035) 21 | - [JetBrains/ideavim](https://github.com/JetBrains/ideavim) -------------------------------------------------------------------------------- /JetBrains/keygen.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/JetBrains/keygen.zip -------------------------------------------------------------------------------- /JetBrains/webstorm2017-key.txt: -------------------------------------------------------------------------------- 1 | 4UXNY6NKFS-eyJsaWNlbnNlSWQiOiI0VVhOWTZOS0ZTIiwibGljZW5zZWVOYW1lIjoiVXNlciBDb2RlciIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkFDIiwicGFpZFVwVG8iOiIyMDE4LTAyLTE0In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMTgtMDItMTQifSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAxOC0wMi0xNCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAxOC0wMi0xNCJ9LHsiY29kZSI6IldTIiwicGFpZFVwVG8iOiIyMDE4LTAyLTE0In0seyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDE4LTAyLTE0In0seyJjb2RlIjoiUkMiLCJwYWlkVXBUbyI6IjIwMTgtMDItMTQifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAxOC0wMi0xNCJ9LHsiY29kZSI6IkRDIiwicGFpZFVwVG8iOiIyMDE4LTAyLTE0In0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMTgtMDItMTQifSx7ImNvZGUiOiJSTSIsInBhaWRVcFRvIjoiMjAxOC0wMi0xNCJ9LHsiY29kZSI6IlBDIiwicGFpZFVwVG8iOiIyMDE4LTAyLTE0In0seyJjb2RlIjoiQ0wiLCJwYWlkVXBUbyI6IjIwMTgtMDItMTQifV0sImhhc2giOiI1Mjk5NjU1LzAiLCJncmFjZVBlcmlvZERheXMiOjAsImF1dG9Qcm9sb25nYXRlZCI6ZmFsc2UsImlzQXV0b1Byb2xvbmdhdGVkIjpmYWxzZX0=-vaN2LDXEHZhJuA6ty/l8gqzoAfnxXdgWVDw8boMp8HzNP9J573xXWOy9THOjEgl0350zGrLyU5Yfb3FLCBbKCIQaVyKES1Y32ykO7oAPg74zikYTCfP582HB0pzgvr7jsFFxgyCYvwU+UavEcCyOV0/iF3WJIuP5l013w6xcpcCVS9TvarpFFExKilKzyg1295t8Cki1Y6uJkW3ZcexPfED/iEkhdb5CMfYeuTZ2DvC/+b0Ec7N0gitBxIQsJwRZvVGXcd2GVG+Tersgygk0rZwGoVmdXh5k58Y3ZWkkKGfeBomZwrdx0ONo6GWtrL2sEIl0LKpjA5EKrxxHxsN6kA==-MIIEPjCCAiagAwIBAgIBBTANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBMB4XDTE1MTEwMjA4MjE0OFoXDTE4MTEwMTA4MjE0OFowETEPMA0GA1UEAwwGcHJvZDN5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxcQkq+zdxlR2mmRYBPzGbUNdMN6OaXiXzxIWtMEkrJMO/5oUfQJbLLuMSMK0QHFmaI37WShyxZcfRCidwXjot4zmNBKnlyHodDij/78TmVqFl8nOeD5+07B8VEaIu7c3E1N+e1doC6wht4I4+IEmtsPAdoaj5WCQVQbrI8KeT8M9VcBIWX7fD0fhexfg3ZRt0xqwMcXGNp3DdJHiO0rCdU+Itv7EmtnSVq9jBG1usMSFvMowR25mju2JcPFp1+I4ZI+FqgR8gyG8oiNDyNEoAbsR3lOpI7grUYSvkB/xVy/VoklPCK2h0f0GJxFjnye8NT1PAywoyl7RmiAVRE/EKwIDAQABo4GZMIGWMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGEpG9oZGcfLMGNBkY7SgHiMGgTcMEgGA1UdIwRBMD+AFKOetkhnQhI2Qb1t4Lm0oFKLl/GzoRykGjAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBggkA0myxg7KDeeEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgWgMA0GCSqGSIb3DQEBCwUAA4ICAQC9WZuYgQedSuOc5TOUSrRigMw4/+wuC5EtZBfvdl4HT/8vzMW/oUlIP4YCvA0XKyBaCJ2iX+ZCDKoPfiYXiaSiH+HxAPV6J79vvouxKrWg2XV6ShFtPLP+0gPdGq3x9R3+kJbmAm8w+FOdlWqAfJrLvpzMGNeDU14YGXiZ9bVzmIQbwrBA+c/F4tlK/DV07dsNExihqFoibnqDiVNTGombaU2dDup2gwKdL81ua8EIcGNExHe82kjF4zwfadHk3bQVvbfdAwxcDy4xBjs3L4raPLU3yenSzr/OEur1+jfOxnQSmEcMXKXgrAQ9U55gwjcOFKrgOxEdek/Sk1VfOjvS+nuM4eyEruFMfaZHzoQiuw4IqgGc45ohFH0UUyjYcuFxxDSU9lMCv8qdHKm+wnPRb0l9l5vXsCBDuhAGYD6ss+Ga+aDY6f/qXZuUCEUOH3QUNbbCUlviSz6+GiRnt1kA9N2Qachl+2yBfaqUqr8h7Z2gsx5LcIf5kYNsqJ0GavXTVyWh7PYiKX4bs354ZQLUwwa/cG++2+wNWP+HtBhVxMRNTdVhSm38AknZlD+PTAsWGu9GyLmhti2EnVwGybSD2Dxmhxk3IPCkhKAK+pl0eWYGZWG3tJ9mZ7SowcXLWDFAk0lRJnKGFMTggrWjV8GYpw5bq23VmIqqDLgkNzuoog== -------------------------------------------------------------------------------- /JetBrains/代码配色.md: -------------------------------------------------------------------------------- 1 | ## IDEA 2 | - [Base Ocean](http://color-themes.com/?view=theme&id=563a1a7880b4acf11273ae9b) 3 | - Deacura 4 | - Spacegray 5 | - tomorrow 6 | 7 | 个人目前使用的是 `Base16 Ocean`, 在其基础上,修改了: 8 | - 全局变量的颜色 9 | - 搜索结果颜色 10 | -------------------------------------------------------------------------------- /JetBrains/使用.md: -------------------------------------------------------------------------------- 1 | WebStorm 是 JetBrains 出品的一个针对前端开发的 IDE,它们家的 IDE 插件系统其实是公用的,IDEA 通过插件也可以完成 前端开发。 2 | 3 | 4 | ## 配色设置 5 | 其实内置的配色也不错,只是我个人喜欢灰蓝系列的,且和其他几个编辑器配色保持了统一,我使用的是: [Base16 Ocean](http://color-themes.com/?view=theme&id=563a1a7880b4acf11273ae9b)。下载后,通过 `import settings` 导入,一般字体默认会比较小,我们需要再对这个配色方案 `Save As..` 存为一个自定义的配色,然后修改里面的字体,字号,以及比如 js 文件下全局变量名颜色(有的默认颜色比较刺眼)。字体推荐 `Source Code Pro`, 字号选择 16。 6 | 7 | ## 插件安装 8 | IDE 自身带了很大插件,不需要特殊安装就以及很好使用了。但是我是个折腾的人,比较注重效率问题,所以我安装了这样几个插件: 9 | 10 | - [.ignore](https://github.com/hsz/idea-gitignore): 管理 ignore 文件 11 | - [AceJump](https://github.com/johnlindquist/AceJump): 光标快速跳转 12 | - [Dash](https://github.com/gdelmas/IntelliJDashPlugin): 调用 Dash 或 Zeal 文档查询工具 13 | - [IdeaVim](https://github.com/JetBrains/ideavim): vim-mode, 需要共享剪切板的话,配置`~/.ideavimrc` 14 | - [Markdown Support](http://www.jetbrains.com/): 支持 Markdown 语法与预览 15 | 16 | 17 | ## 安装设置 18 | ### 自定义快捷键 19 | 默认的快捷键,可以从 [WebStorm_ReferenceCard](https://resources.jetbrains.com/assets/products/webstorm/WebStorm_ReferenceCard.pdf) 查看。 20 | 21 | 但是针对个人,我们可以优化这些快捷键,我优化了以下内容: 22 | 23 | - Search Everything: `Alt+p` 24 | - Find Action: `Ctrl+Shift+p` 25 | - Close: `Ctrl+w` 26 | - Select Next Tab: `Ctrl+Tab` 27 | - Select Previous Tab: `Ctrl+Shift+Tab` 28 | 29 | ### 常用快捷键 30 | - Recent File: `cmd+e` 31 | - `gd`: find definition 32 | 33 | ## 配置管理 34 | 通过 `Export Settings` 即可导出配置,然后下次通过 `Import Settings` 完成导入。 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 一些提高效率的工具集合。喜欢的可以点波 `Star`, 有问题交流,可以提 `Issues` ~ 2 | 3 | ## atom 4 | atom编辑器相关。 5 | 6 | ## AutoHotkey 7 | Windows平台下自动化处理工具。 8 | 9 | ## Chrome 10 | Chrome浏览器相关。 11 | 12 | ## command 13 | 命令行下相关。 14 | 15 | ## dotfiles 16 | 一些配置文件 17 | 18 | ## git 19 | git的使用。 20 | 21 | ## nodejs 22 | nodejs相关。 23 | 24 | ## proxy 25 | 代理设置相关。 26 | 27 | ## sublimetext 28 | sublimetext3编辑器相关。 29 | 30 | ## recommend-software 31 | 各平台下推荐的软件。 32 | -------------------------------------------------------------------------------- /atom/.apmrc: -------------------------------------------------------------------------------- 1 | strict-ssl=false 2 | http-proxy =http://10.19.110.55:8080/ 3 | https-proxy=http://10.19.110.55:8080/ 4 | registry=https://registry.npm.taobao.org 5 | -------------------------------------------------------------------------------- /atom/README.md: -------------------------------------------------------------------------------- 1 | Atom是github出品的一款文本编辑器。 2 | 3 | 如果你开发 React 相关内容的话,推荐安装: [Nuclide: Facebook 推出的一套基于 Atom 的开发工具集](https://nuclide.io/) 4 | 5 | 6 | windows 下, 还请配置好 [node-gyp](https://github.com/nodejs/node-gyp). 7 | 8 | 如果安装插件失败,检查是否需要进行代理配置。 -------------------------------------------------------------------------------- /atom/apm.md: -------------------------------------------------------------------------------- 1 | apm, Atom Package Manager。用来安装和管理 Atom 相关插件。 2 | 3 | > You can configure apm by using the apm config command line option (recommended) or by manually editing the `~/.atom/.apmrc` file as per the npm config. 4 | 5 | 6 | ## 查看配置 7 | `apm config list` 查看当前 `apm` 配置。 8 | 9 | 10 | ## proxy设置 11 | 通过 `apm config get http-proxy` 或 `apm config get https-proxy` 可查看目前设置的代理。 12 | 13 | 通过 `apm config set http-proxy https://9.0.2.1:0` 或 `apm config set https-proxy https://9.0.2.1:0` 设置。 14 | 15 | 16 | 17 | ## 手动安装插件 18 | 插件最终下载到的目录是`~/.atom/packages`中,所以我们也可以下载对应的插件,防止到此目录下。 19 | 20 | 21 | -------------------------------------------------------------------------------- /atom/keymaps管理.md: -------------------------------------------------------------------------------- 1 | ## vim-mode-plus 2 | 保留了系统的一些快捷键,后续慢慢还是使用 vim 的对应方式把。 3 | 4 | 5 | ``` 6 | # disable some key in vim-mode-plus 7 | 'atom-text-editor.vim-mode-plus': 8 | 'ctrl-a': 'core:select-all' 9 | 'ctrl-c': 'core:copy' 10 | 'ctrl-x': 'core:cut' 11 | 'ctrl-v': 'core:paste' 12 | 'ctrl-f': 'native!' 13 | ``` -------------------------------------------------------------------------------- /atom/主题配色推荐.md: -------------------------------------------------------------------------------- 1 | ## UI 2 | - [One Dark](https://atom.io/themes/one-dark-ui): 深色系列 3 | - [nucleus-dark-ui](https://atom.io/themes/nucleus-dark-ui): facebook Nucleus, 好看, 但是对于的编码配色,需要有syntax-vaiables.less, 且内容较全,下面的 base16-ocean-dark-spacegray 就不行,会编译 less 报错 4 | 5 | ## syntax 6 | - [one-dark-syntax](https://atom.io/themes/one-dark-syntax): 和 one dark 搭配 7 | - [Dark Fusion Syntax](https://atom.io/themes/atom-dark-fusion-syntax): 深灰系列 8 | - [base16-tomorrow-dark-theme](https://atom.io/themes/base16-tomorrow-dark-theme): 比较冷淡 9 | - [base16-ocean-dark-spacegray](https://atom.io/themes/base16-ocean-dark-spacegray): 灰蓝背景,也不错 10 | - [spacegray-atom-dark-syntax](https://atom.io/themes/spacegray-atom-dark-syntax): 深蓝背景,个人比较喜欢 -------------------------------------------------------------------------------- /atom/推荐的插件.md: -------------------------------------------------------------------------------- 1 | atom 官方自带了一些插件,可以在 `Settings->Package->Core Package` 中查看,比如 `linter`, `language-html` 等都自带安装了。 2 | 3 | # language 4 | 5 | - [language-markdown](https://atom.io/packages/language-markdown) 6 | - [language-babel](https://atom.io/packages/language-babel) 7 | - [language-vue](https://atom.io/packages/language-vue): Adds syntax highlighting and snippets to Vue component files in Atom. 8 | 9 | # linter 10 | 11 | - [linter](https://atom.io/packages/linter) 12 | - [All linter](http://atomlinter.github.io/): 列举了所有的 linter 13 | - [linter-markdown](https://atom.io/packages/linter-markdown) 14 | - [linter-csslint](https://atom.io/packages/linter-csslint) 15 | - [linter-eslint](https://atom.io/packages/linter-eslint) 16 | - [linter-htmlhint](https://atom.io/packages/linter-htmlhint) 17 | - [linter-markdown](https://atom.io/packages/linter-markdown) 18 | 19 | 20 | # autocomplete 21 | 22 | - [atom-ternjs](https://atom.io/packages/atom-ternjs) 23 | - [emmet](https://atom.io/packages/emmet) 24 | - [autocomplete-paths](https://atom.io/packages/autocomplete-paths): 文件路径补全 25 | - [autocomplete-modules](https://atom.io/packages/autocomplete-modules) 26 | 27 | # markdown 28 | 29 | - [markdown-preview](https://atom.io/packages/markdown-preview): atom 自带的预览插件,可以用下面的替换 30 | - [markdown-preview-plus](https://atom.io/packages/markdown-preview-plus): Markdown Preview Plus (MPP) is a fork of Markdown Preview that provides a real-time preview of markdown documents. 31 | - [markdown-writer](https://atom.io/packages/markdown-writer): 提供书写时的一些辅助特性 32 | - [Tidy Markdown](https://atom.io/packages/tidy-markdown): 文件保存的时候,帮助纠正书写错误 33 | - [markdown-assistant](https://atom.io/packages/markdown-assistant): 拖拽图片,自动上传云服务上。 34 | - [markdown-scroll-sync](https://atom.io/packages/markdown-scroll-sync): 编辑和预览同步滚动 35 | - [markdown-pdf](https://atom.io/packages/markdown-pdf): 生成pdf, png, jpeg 图片 36 | 37 | # 代码书写辅助类 38 | 39 | - [dash](https://atom.io/packages/dash): Simple Dash documentation integration for Atom.可在 windows 下使用,客户端用 zeal 即可。 40 | - [docblockr](https://atom.io/packages/docblockr): 注释书写插件 41 | - [atom-beautify](https://atom.io/packages/atom-beautify): 代码格式化 42 | - [color-picker](https://atom.io/packages/color-picker): 颜色选取插件 43 | - [pigments](https://atom.io/packages/pigments): 颜色可视化插件 44 | - [elastic-tabstops](https://atom.io/packages/elastic-tabstops): An experimental implementation of Elastic tabstops for Atom 45 | - [hyperclick](https://atom.io/packages/hyperclick): Pluggable text-clicking UI for Atom. 46 | - [js-hyperclick](https://atom.io/packages/js-hyperclick): 配合上面一个插件使用 47 | - [regex-railroad-diagram](https://atom.io/packages/regex-railroad-diagram): 正则表达式可视化 48 | - [align-regexp](https://atom.io/packages/align-regexp): 根据整个对齐 49 | - [atom-alignment](https://atom.io/packages/atom-alignment): 对齐工具 50 | 51 | 52 | 53 | # 适合前端的 54 | 55 | - [atom-html-preview](https://atom.io/packages/atom-html-preview) 56 | - [open-in-browsers](https://atom.io/packages/open-in-browsers) 57 | - [css-comb](https://atom.io/packages/css-comb): 这个插件支持读取 `.csscomb.json` 58 | 59 | # git 相关 60 | - [git-time-machine](https://atom.io/packages/git-time-machine): 可视化查看提交记录 61 | 62 | # 编辑器辅助类 63 | 64 | - [sync-settings](https://atom.io/packages/sync-settings): 通过 gist 同步 Atom 配置 65 | - [autoupdate-packages](https://atom.io/packages/autoupdate-packages): 自动升级插件 66 | - [open-recent](https://atom.io/packages/open-recent): 查看最近打开的文件 67 | - [project-plus](https://atom.io/packages/project-plus): 快速切换 project 68 | - [advanced-open-file](https://atom.io/packages/advanced-open-file): Open and create files and directories easily. 69 | - [file-icons](https://atom.io/packages/file-icons): 增加文件图标的显示 70 | - [file-icon-supplement](https://atom.io/packages/file-icon-supplement): file-icons 的提升 71 | - [minimap](https://atom.io/packages/minimap): 增加右侧代码预览 72 | - [minimal-highlight-selected](https://atom.io/packages/minimap-highlight-selected): 在右侧minimap视图中标明高亮部分 73 | - [tool-bar](https://atom.io/packages/tool-bar): 增加快速导航栏,类似vs code 右侧那个 74 | - [tool-bar plugin](https://atom.io/packages/search?utf8=%E2%9C%93&q=keyword%3Atool-bar): 上面的插件只是提供功能,还需要安装对应的插件,展示具体的内容 75 | - [typewriter](https://atom.io/packages/typewriter): A better writing experience for Atom 76 | - [Zen](https://atom.io/packages/Zen): 书写的勿扰模式 77 | - [highlight-selected](https://atom.io/packages/highlight-selected): 高亮所选择内容 78 | - [highlight-line](https://atom.io/packages/highlight-line): 高亮当前行 79 | - [editorconfig](https://atom.io/packages/editorconfig): 编辑器格式统一插件,借助 `.editorconfig` 文件,团队开发必备 80 | - [vim-mode-plus](https://atom.io/packages/vim-mode-plus): vim-mode improved. 替代官方的 vim-mode 81 | - [vim-mode-plus-ex-mode](https://atom.io/packages/vim-mode-plus-ex-mode): 提供`:w` 类似功能,按键快捷键需要自己定义 82 | - [smalls](https://atom.io/packages/smalls): 光标快速跳转插件 83 | - [easy-motion-redux](https://atom.io/packages/easy-motion-redux): 可是区域内光标快速跳转插件 84 | - [wakatime](https://atom.io/packages/wakatime): 记录使用编辑器的时间,很多编辑器或IDE都有这个插件 85 | - [package-generator](https://atom.io/packages/package-generator): Generates and opens a new sample package or syntax theme in Atom. 86 | - [spacemacs-evil-keys](https://atom.io/packages/spacemacs-evil-keys): 模拟 spacemacs evil 模式, 不建议使用,如果喜欢还是直接使用spacemacs 吧 87 | - [proton-mode](https://atom.io/packages/proton-mode): spacemacs and sublimious style editing in Atom. (效果和上面类似,功能应该更强大),不建议使用,如果喜欢还是直接使用spacemacs 吧。因为这个插件会建立自己的插件系统,对你以后的配置会做修改。 88 | 89 | # funny 90 | 91 | - [Activate Power Mode](https://github.com/JoelBesada/activate-power-mode): 打字效果,配合tickeys音效,不用买机械键盘了。 92 | 93 | # 优秀的插件开发者 94 | 95 | - [atom](https://atom.io/users/atom): atom 官方, 应该基本都是内置的插件 96 | - [atom-community](https://atom.io/users/atom-community): atom 社区 97 | - [steelbrain's Packages](https://atom.io/users/steelbrain/packages): linter 98 | - [t9md](https://atom.io/users/t9md): vim-mode-plus 99 | 100 | 101 | # 管理配置 102 | ## 配置同步 103 | 使用上述提到的 [sync-settings](https://atom.io/packages/sync-settings) 插件完成。步骤如下: 104 | 105 | - 安装 sync-settings 插件 106 | - 打开 [Create a new personal access token](https://github.com/settings/tokens/new), 填入 `Token description` (如果快捷键或者某些配置在不同系统下不一致,建议分开多套备份), 勾选 `gist`, 点击 `Generate token`, 完成后界面上有一串字符,可以拷贝。就是你的 `Personal Access Token` 107 | - 打开 [Create new gist](https://gist.github.com/), 在输入框中随便填入内容。点击 `Create secret gist`. (如果你想要分享你的配置,也可以点击 publish)。完成后,选择生成文件的后缀字符,`gitst:xxxxx`, `xxxxx` 就是你的 `Gist Id`。 108 | - 将上述两个内容,填入 `sync-settings` 中对应字段 109 | - 通过 `Command Palette` 打开 `sync-settings:backup` 完成备份,其他功能也都是在 `sync-settings:` 命令下。 110 | - 备份成功,Atom 右上角会有绿色弹框提示,如果失败,可以打开 `Toggle Developer Tools` 查看控制台,看是否是网络原因报错,可能需要设置代理,可以参考: [issue: Uncaught SyntaxError: Unexpected token c ](https://github.com/atom-community/sync-settings/issues/273) , 其中有人提及。 111 | 112 | 如果你有多套配置,也可以在插件的 Settings 中,添加 描述。 113 | 114 | ## 配置恢复 115 | 安装 [sync-settings](https://atom.io/packages/sync-settings) 插件完成后,将 settings 设置完成,通过命令 `sync settings: restore` 即可开始恢复配置,在其恢复过程中,可切换开启 `Toggle Developer Tools` 查看过程,以及是否有 package 安装失败。 116 | 117 | 118 | ## Atom 默认的配置文件 119 | - init.coffee 120 | - config.cson 121 | - keymap.cson 122 | - snippets.cson 123 | - style.less 124 | 125 | 但是其实还有些是插件自身的配置,比如: 126 | 127 | - projects.cson: 管理切换 project 的 128 | - toolbar.cson: toolbar 管理 129 | - project.json: sync-settings 添加的 -------------------------------------------------------------------------------- /atom/设置详解.md: -------------------------------------------------------------------------------- 1 | # 设置详解 2 | `Settings` 中即打开了设置。这里讲一下需要对默认设置做哪些处理。 3 | 4 | ## Core 5 | - Allow Pending Pane Items: 单击文件,直接打开,关掉。双击打开 6 | - Open Empty Editor on Start: 打开 atom 时,不带出上次退出的时候文件,默认空文件 7 | 8 | ## Editor 9 | - Font Family: 设置字体,可以逗号间隔,windows 下,适合使用 `Source Code Pro, Micsoft Yahei` 同时配置中英文 10 | - Font Size: 16px 正好 11 | - show Indent Guide: 根据缩进层级垂直展示的一条线,不用选择,一般代码都能看出来 12 | - Show Invisibles: 显示隐藏字符,针对多系统直接的操作的时候,比较适合大开,显示的具体字符,在这个设置页面的上方有显示。主要是eol, space, tab 13 | - soft wrap: 下方针对 tab 的设置如果为 auto, 且没有其他指示当前文本应该将 tab 处理为何种字符的时候(空格或tab),默认当作空格。 14 | - Soft Wrap: 窗口缩小的时候,自动折行,避免出现横向滚动条, 勾选上 15 | - Zoom Font When Ctrl Scrolling: 按住ctrl加鼠标滚动时,是否放大或缩小字号,不勾选 16 | 17 | 18 | ## Keybindings 19 | 可模糊搜索关键字。点击 `your keymap file` 即可跳转自己的映射文件。 20 | 21 | 22 | ## Package 23 | 查看和管理安装的插件 24 | 25 | ## Themes 26 | 查看和管理主题以及代码配色。注意有些配色无法在特定主题下显示,因为缺少符合主题的样式文件,会编译报错,直接进不了 settings 了。这时需要手动修改 `config.cson` 去除对于的主题或者配色。 27 | 28 | 29 | ## Updates 30 | 管理更新配置 31 | 32 | 33 | ## Install 34 | 包管理工具 35 | -------------------------------------------------------------------------------- /autohotkey/README.md: -------------------------------------------------------------------------------- 1 | - [AutoHotKey](http://ahkscript.org/): 官网,目前稳定版本是 1.1x 2 | 3 | 4 | ## 模拟键位 5 | - [stroebjo/autohotkey-windows-mac-keyboard](https://github.com/stroebjo/autohotkey-windows-mac-keyboard) 6 | 7 | ## 窗口管理 8 | 9 | ## 参考 10 | - [来聊一聊 AutoHotKey 有哪些实用技巧呗](https://www.v2ex.com/t/263023) -------------------------------------------------------------------------------- /autohotkey/TODO.md: -------------------------------------------------------------------------------- 1 | - double click alt, disable/enable fase-open 2 | -------------------------------------------------------------------------------- /autohotkey/fast-open.ahk: -------------------------------------------------------------------------------- 1 | ; Fast open application using alt on Windows 2 | ; List custom keymap 3 | ; customkey: Meta(win) 4 | ;----------------------------------------------------- 5 | ; | q: zeal | w: sublime | e: ConEmu64 | 6 | ; | a: | s: | d: | 7 | ; | z: | x: | c: | 8 | ;----------------------------------------------------- 9 | 10 | !q:: 11 | DetectHiddenWindows, on 12 | IfWinNotExist ahk_class Qt5QWindowIcon ahk_exe zeal.exe 13 | Run "D:\Program Files (x86)\Zeal\zeal.exe" 14 | Else 15 | IfWinNotActive ahk_class Qt5QWindowIcon ahk_exe zeal.exe 16 | WinActivate 17 | Else 18 | WinMinimize 19 | Return 20 | 21 | !w:: 22 | DetectHiddenWindows, on 23 | IfWinNotExist ahk_class Chrome_WidgetWin_1 ahk_exe atom.exe 24 | Run "C:\Users\15050107\AppData\Local\atom\bin\atom.cmd" 25 | Else 26 | IfWinNotActive ahk_class Chrome_WidgetWin_1 ahk_exe atom.exe 27 | WinActivate 28 | Else 29 | WinMinimize 30 | Return 31 | 32 | !e:: 33 | DetectHiddenWindows, on 34 | IfWinNotExist ahk_class VirtualConsoleClass 35 | Run "D:\Program Files (x86)\ConEmu\ConEmu64.exe", e: 36 | Else 37 | IfWinNotActive ahk_class VirtualConsoleClass 38 | WinActivate 39 | Else 40 | WinMinimize 41 | Return 42 | 43 | ;----------------------------------------------------- 44 | ;; alt+Num -> win+Num 45 | 46 | !1::Send {LWin down}{1}{LWin up} 47 | !2::Send {LWin down}{2}{LWin up} 48 | !3::Send {LWin down}{3}{LWin up} 49 | !4::Send {LWin down}{4}{LWin up} 50 | 51 | ;----------------------------------------------------- -------------------------------------------------------------------------------- /autohotkey/keymaps.ahk: -------------------------------------------------------------------------------- 1 | ;Notes: #==win !==Alt ^==Ctr +==shift 2 | 3 | SetCapsLockState, AlwaysOff ; 设置大写锁定为永远为关闭状态(本脚未触发时不会起作用) 4 | 5 | CapsLock:: 6 | CapsLock2:=CapsLock:=1 7 | KeyWait, CapsLock 8 | if CapsLock2 9 | SendInput,!{s} ; 替换快捷键- alt + S 10 | CapsLock2:=CapsLock:="" 11 | Return 12 | 13 | 14 | ;=====================================================================o 15 | ; CapsLock Switcher: ;| 16 | ;---------------------------------o-----------------------------------o 17 | ; CapsLock + ` | {CapsLock} ;| 18 | ;---------------------------------o-----------------------------------o 19 | CapsLock & `:: ;| 20 | GetKeyState, CapsLockState, CapsLock, T ;| 21 | if CapsLockState = D ;| 22 | SetCapsLockState, AlwaysOff ;| 23 | else ;| 24 | SetCapsLockState, AlwaysOn ;| 25 | KeyWait, `` ;| 26 | return ;| 27 | ;---------------------------------------------------------------------o 28 | -------------------------------------------------------------------------------- /autohotkey/osx-keybinding.ahk: -------------------------------------------------------------------------------- 1 | ;----------------------------------------- 2 | ; Mac keyboard to Windows Key Mappings 3 | ;========================================= 4 | 5 | ; -------------------------------------------------------------- 6 | ; NOTES 7 | ; -------------------------------------------------------------- 8 | ; ! = ALT 9 | ; ^ = CTRL 10 | ; + = SHIFT 11 | ; # = WIN 12 | ;=============================================================== 13 | 14 | 15 | 16 | ; -------------------------------------------------------------- 17 | ; Programs which use Widnows key map 18 | ; -------------------------------------------------------------- 19 | 20 | GroupAdd, Terminal, ahk_class Emacs 21 | ; GroupAdd, Terminal, ahk_class SunAwtDialog 22 | ; GroupAdd, Terminal, ahk_class SunAwtFrame 23 | 24 | GroupAdd, Jetbrains, ahk_class SunAwtDialog 25 | GroupAdd, Jetbrains, ahk_class SunAwtFrame 26 | 27 | InTerminal() { 28 | return WinActive("ahk_group Terminal") 29 | } 30 | 31 | InJetbrainsIDE() { 32 | return WinActive("ahk_group Jetbrains") 33 | } 34 | 35 | InSecureCRT() { 36 | return WinActive("ahk_class VanDyke Software - SecureCRT") 37 | } 38 | ;=============================================================== 39 | 40 | ; -------------------------------------------------------------- 41 | ; map Caps to Ctrl 42 | ; -------------------------------------------------------------- 43 | SetCapsLockState , AlwaysOff 44 | 45 | Capslock:: 46 | Gui, 93:+Owner ; prevent display of taskbar button 47 | Gui, 93:Show, y-99999 NA, Enable nav-hotkeys: emacs 48 | Send {LCtrl Down} 49 | KeyWait, Capslock ; wait until the Capslock button is released 50 | Gui, 93:Cancel 51 | Send, {LCtrl Up} 52 | Return 53 | 54 | #IfWinExist, Enable nav-hotkeys: emacs 55 | 56 | ;; mock emacs move 57 | ;; caps+a => begin of line 58 | *a:: 59 | GetKeyState, state, Shift 60 | if state = D 61 | Send +^a 62 | else 63 | If InTerminal() 64 | Send ^a 65 | Else 66 | Send {Blind}{LCtrl Up}{Home}{LCtrl Down} 67 | Return 68 | 69 | ;; caps+e => end of line 70 | *e:: 71 | GetKeyState, state, Shift 72 | if state = D 73 | Send +^e 74 | else 75 | If InTerminal() 76 | Send ^e 77 | Else 78 | Send {Blind}{LCtrl Up}{End}{LCtrl Down} 79 | Return 80 | 81 | ;; caps+b => left(back) 82 | *b:: 83 | GetKeyState, state, Shift 84 | if state = D 85 | Send +^b 86 | else 87 | If InTerminal() 88 | Send ^b 89 | Else 90 | Send {Blind}{LCtrl Up}{Left}{LCtrl Down} 91 | Return 92 | 93 | ;; caps+f => right(forward) 94 | *f:: 95 | GetKeyState, state, Shift 96 | if state = D 97 | Send +^f 98 | else 99 | If InTerminal() 100 | Send ^f 101 | Else 102 | Send {Blind}{LCtrl Up}{Right}{LCtrl Down} 103 | Return 104 | 105 | ;; caps+n => down(next) 106 | *n:: 107 | GetKeyState, state, Shift 108 | if state = D 109 | Send +^n 110 | else 111 | If InTerminal() 112 | Send ^n 113 | Else 114 | Send {Blind}{LCtrl Up}{Down}{LCtrl Down} 115 | Return 116 | 117 | ;; caps+p => up(previous) 118 | *p:: 119 | GetKeyState, state, Shift 120 | if state = D 121 | Send +^p 122 | else 123 | If InTerminal() 124 | Send ^p 125 | Else 126 | Send {Blind}{LCtrl Up}{Up}{LCtrl Down} 127 | Return 128 | 129 | ;; caps + alt + p => ctrl + alt + p 130 | *!p::^!p 131 | 132 | ;; caps + [ => ecs (more usefull in vim-mode) 133 | *[:: 134 | GetKeyState, state, Shift 135 | if state = D 136 | Send +^[ 137 | else 138 | If InTerminal() 139 | Send ^[ 140 | Else 141 | Send {Blind}{LCtrl Up}{Esc}{LCtrl Down} 142 | Return 143 | 144 | #IfWinExist, ; end context-sensitive block 145 | ;=============================================================== 146 | 147 | ; -------------------------------------------------------------- 148 | ; OS X system shortcuts 149 | ; using SharpKeys swip alt and win 150 | ; so we can mock win + {key} => cmd + {key} 151 | ; -------------------------------------------------------------- 152 | 153 | ;; disable win 154 | LWin:: 155 | RWin:: 156 | Return 157 | #Up::Send {LWin} 158 | 159 | ; Win + C => ctrl+c(copy) 160 | WinC() { 161 | Send ^c 162 | } 163 | <#c::WinC() 164 | 165 | ; Win + V => ctrl + v (paster) 166 | WinV() { 167 | Send ^v 168 | } 169 | <#v::WinV() 170 | 171 | ; Win + X => ctrl + x (cut) 172 | WinX() { 173 | Send ^x 174 | } 175 | <#x::WinX() 176 | 177 | ; Win + z => ctrl + z (undo) 178 | WinZ() { 179 | Send ^z 180 | } 181 | <#z::WinZ() 182 | 183 | 184 | ; Win + F => ctrl + f (find) 185 | WinF() { 186 | Send ^f 187 | } 188 | <#f::WinF() 189 | 190 | ; Win + A => ctrl + a (sellect all) 191 | WinA() { 192 | Send ^a 193 | } 194 | <#a::WinA() 195 | 196 | ; Win + N => ctrl + n (create new file) 197 | WinN() { 198 | Send ^n 199 | } 200 | <#n::WinN() 201 | 202 | ; Win + T => ctrl + t (create new tab) 203 | WinT() { 204 | Send ^t 205 | } 206 | <#t::WinT() 207 | 208 | ; Win + W => ctrl + w (close a tab) 209 | WinW() { 210 | Send ^w 211 | } 212 | <#w::WinW() 213 | 214 | ; Win + R => ctrl + r (refush) 215 | WinR() { 216 | Send ^r 217 | } 218 | <#r::WinR() 219 | 220 | ; Win + S => ctrl + s (save) 221 | WinS() { 222 | Send ^s 223 | } 224 | <#s::WinS() 225 | 226 | ; win + e => ctrl + e (in IDEA, open recent files) 227 | winE() { 228 | Send ^e 229 | } 230 | <#e::WinE() 231 | 232 | ;; win + space => ctrl + space (change differ input source) 233 | #Space::Send ^{Space} 234 | 235 | ;; win + tab => alt + tab (switch apps) 236 | LWin & Tab::AltTab 237 | 238 | ; Win + ` => alt + ~ (switch windows in one app, base on VistaSwitcher) 239 | WinPonit() { 240 | Send !~ 241 | } 242 | <#`::WinPonit() 243 | 244 | ;; caps + win + {key} => ctrl + alt + {key} 245 | #^x::Send !^x 246 | #^c::Send !^c 247 | #^z::Send !^z 248 | #^a::Send !^a 249 | #^s::Send !^s 250 | 251 | ;; shift + win(alt) + key => shift + alt + {key} 252 | #+v::Send !+v 253 | 254 | ;=============================================================== 255 | -------------------------------------------------------------------------------- /command/README.md: -------------------------------------------------------------------------------- 1 | 介绍命令行下相关内容。 2 | 3 | # autojump 4 | 命令行下跳转目录的快捷方式。 5 | 6 | ## clink 7 | [clink](https://github.com/mridgers/clink): 为cmd提供增强的工具,自动补齐之类的。 8 | 9 | 直接下载安装,可安装在自定义的目录中,它会自动添加环境变量。 10 | 11 | ## windows-bash-command 12 | 在windows下,增加一些Uinx命令 13 | 14 | 15 | ## emulators 16 | 仿真器。用来替代原生的cmd 或 terminal。 17 | 18 | 19 | ## zsh 20 | -------------------------------------------------------------------------------- /command/alias.md: -------------------------------------------------------------------------------- 1 | 别名,用于简化常用输入。我们在使用命令行的时候,可以将常用的命令通过`alias`方式简化。 2 | 3 | # git 4 | git提供了`alias`命令,比如我们可以在配置文件中设置: 5 | 6 | ``` 7 | [alias] 8 | st = status 9 | gi = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi" 10 | ``` 11 | 12 | 以后我们输入`git st` 替代 `git status` 13 | 14 | # npm 15 | npm没有直接提供配置`alias`方式,它内置了一些, 比如 `npm ls` 为 `npm list`。 16 | 17 | 我们可以使用[run script](https://docs.npmjs.com/cli/run-script),但是需要在项目的`package.json`中,配置: 18 | ``` 19 | { 20 | "scripts" : { 21 | "preinstall" : "./configure", 22 | "install" : "make && make install", 23 | "test" : "make test" 24 | } 25 | } 26 | ``` 27 | 28 | 之后变可以通过`npm xxx`运行,npm也提供我们指定自定义的名称,比如: 29 | 30 | ``` 31 | { 32 | "scripts" : { 33 | "xxx" : "echo 'xxx'" 34 | } 35 | } 36 | ``` 37 | 38 | 之后通过 `npm run xxx` 运行。 39 | 40 | 41 | # windows下封装 42 | ## bat文件 43 | 有些命令无法提供配置,我们可以自己建立一个`.bat`文件封装,将文件的路径放置到系统环境变量中,比如`C:\Bin`目录。 44 | 45 | 我将在命令行下打开资源管理器的命令封装为`open`, 新建一个`open.bat`文件,内容: 46 | 47 | ``` 48 | @echo off 49 | explorer.exe %* 50 | ``` 51 | 52 | 在命令行下,使用`open .` 即可在资源管理器中打开当前目录。**注意:**这里我们使用的是 `%`, 而不是下面的 `$` 。 53 | 54 | ## doskey 55 | windows批处理提供一个`doskey`命令,相当于`alias`,比如我们建立一个`alias.bat`文件,内容为: 56 | 57 | ``` 58 | @echo off 59 | doskey ls=dir $* 60 | ``` 61 | 62 | 然后在命令行下运行此批处理文件,在当前的命令行上下文中,即可使用`ls`简化`dir`命令。但是,当我们新开命令行的时候,实际创建了新的上下文,就不能直接使用了。 63 | 64 | 解决方案,也就是想办法在启动`cmd.exe`的时候,增加一个参数,让其启动的时候先执行`alias.bat`文件,就能为打开的命令行上下文添加`alias`了。 65 | 66 | **更新**: doskey配合下面的`clink autorun`,可以将`alias`直接添加到命令行上下文中。 67 | 68 | 69 | 参考: 70 | - [Microsoft DOS doskey command](http://www.computerhope.com/doskeyhl.htm) 71 | - [Permanent Windows command-line aliases with doskey and AutoRun](http://darkforge.blogspot.com/2010/08/permanent-windows-command-line-aliases.html) 72 | - [How to set aliases for the command prompt in Windows](http://winaero.com/blog/how-to-set-aliases-for-the-command-prompt-in-windows/) 73 | - [Adding an alias in Windows 7 or making ls = dir in a command prompt](http://www.rhyous.com/2010/10/20/adding-an-alias-in-windows-7-or-making-ls-dir-in-a-command-prompt/) 74 | 75 | ## clink 76 | 通过`clink`命令的`autorun`可以增加注入,我们利用这个命令,向命令行的上下文中注入相关`alias`,详见`clink`介绍。`alias.bat`文件如下: 77 | 78 | ``` 79 | @echo off 80 | set HOME="C:\Users\15050107" 81 | set EXPLORER_EXE="explorer.exe" 82 | set SUBLIME_EXE="D:\Program Files (x86)\Sublime Text 3\sublime_text.exe" 83 | 84 | doskey ls=dir $* 85 | doskey open=%EXPLORER_EXE% $* 86 | doskey cnpm=npm --registry=https://registry.npm.taobao.org --cache=%HOME%\.npm\.cache\cnpm --disturl=https://npm.taobao.org/dist --userconfig=%HOME%\.cnpmrc $* 87 | doskey st=%SUBLIME_EXE% $* 88 | doskey z=j $* 89 | ``` 90 | 91 | 如此,我们就可以维护一个`alias.bat`用来管理所有的别名了。避免了使用多个`bat`文件的情况。 -------------------------------------------------------------------------------- /command/autojump/README.md: -------------------------------------------------------------------------------- 1 | 命令行下跳转目录的快捷方式。 2 | 3 | # 安装 4 | 5 | ## windows下 6 | windows下我使用的是: [wting/autojump](https://github.com/wting/autojump) 7 | 8 | 需要先确保安装clink, 再下载autojump,手动安装。 9 | 10 | ## mac下 11 | mac下,最好先安装`oh-my-zsh`,这个是个很强的命令行增强工具。 12 | 13 | mac下对应的工具有: 14 | - [wting/autojump](https://github.com/wting/autojump):`brew install autojump`即可 15 | - [clvv/fasd](https://github.com/clvv/fasd) 16 | - [rupa/z](https://github.com/rupa/z): z is the new j, yo 17 | 18 | 19 | 目前我在Mac下使用的也是z。 20 | 21 | # 使用 22 | 23 | 因为我在Mac下使用的是`z`,为了保持一致,在windows平台下,我设置了一个`z.bat`转换`j`命令: 24 | 25 | ``` 26 | @echo off 27 | j %* 28 | ``` 29 | 30 | 直接`z 常用目录名称`,即可直达对应目录。目录名称可以是简写。 31 | -------------------------------------------------------------------------------- /command/clink/README.md: -------------------------------------------------------------------------------- 1 | [clink](https://github.com/mridgers/clink): 为cmd提供增强的工具,自动补齐之类的。 2 | 3 | # 安装 4 | 直接下载安装,可安装在自定义的目录中,它会自动添加环境变量。 5 | 6 | # autorun 7 | 自动安装之后,默认应该打开cmd就会自动先加载了`clink`, 命令行中就可以直接使用`clink`了。如果没有自动带出,需要执行`clink autorun install`。 8 | 9 | 通过 `clink autorun show` 也可以查看当前的配置。比如我这里展示的是: 10 | 11 | ``` 12 | clink autorun set \"D:\Program Files (x86)\clink\0.4.8\clink.bat\" inject --autorun --profile ~/clink 13 | ``` 14 | 15 | 底层算是调用了windows的`autorun`命令,在启动`cmd`之前注入`clink`,这里`--profile ~/clink` 我不知道在windows下有何作用。 16 | 17 | 利用这个条件,我们可以配合`doskey`,完成`alias`命令。比如我在`C:\Bin`下创建一个`alias.bat`文件,里面写入: 18 | 19 | ``` 20 | @echo off 21 | doskey ls=dir $* 22 | ``` 23 | 24 | 通过`clink autorun set \"C:\Bin\alias.bat\" "&&" \"D:\Program Files (x86)\clink\0.4.8\clink.bat\" inject --autorun` ,我将这个`alias.bat`也注入到命令行上下文中,这样就可以在命令行中,使用`ls`代替`dir`了。 25 | 26 | -------------------------------------------------------------------------------- /command/emulators/README.md: -------------------------------------------------------------------------------- 1 | emulators,仿真器。用来替代原生的cmd 或 terminal。 2 | 3 | -------------------------------------------------------------------------------- /command/emulators/windows.md: -------------------------------------------------------------------------------- 1 | windows平台下的emulators。 2 | 3 | # ConEmu 4 | - [ConEmu](https://conemu.github.io/) 5 | 6 | 支持多标签,美观,目前我在windows下用来替代原生的`cmd.exe`,命令增强的话,还是需要自己安装`clink`。 7 | 8 | 9 | # Cmder 10 | [Cmder](http://cmder.net/) 11 | 12 | 内置了`clink`工具。 13 | 14 | 15 | # Babun 16 | - [babun](https://babun.github.io/) 17 | 18 | 内置 cygwin, oh-my-zsh 等工具,比较适合使用 linux 环境的人,但是 node 支持不够友好。 19 | -------------------------------------------------------------------------------- /command/windows-bash-command/README.md: -------------------------------------------------------------------------------- 1 | # Cygwin 2 | [cygwin](http://www.cygwin.com/) 3 | 4 | cygwin可以简单的认为是在Windows上提供了一个Linux环境。是一个提供大量POSIX API功能的DLL(cygwin1.dll)。 5 | 6 | # Gow 7 | [Gow](https://github.com/bmatzelle/gow): Unix command line utilities installer for Windows. 8 | 9 | Gow是Cygwin的一个轻量级替换,一个10MB大小的安装包可以安装约130个从Unix移植到Windows下的原生Win32程序。命令的执行在cmd.exe中。Gow提供了一个右键点击文件夹“Command Prompt Here”的菜单项。在文件夹内可以Shift+右键,选择“在此处打开命令行窗口”代替。 10 | 11 | # msysgit 12 | [msysgit](http://msysgit.github.io/)。 13 | 14 | msysgit是一个windows下Git的构建环境。尽管该工具是Windows下的Git,但由于基于MinGW的,可在其命令行下执行一些Linux命令。右键->Git Bash,即可进入bash环境。 -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/cangjie5.prism.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/cangjie5.prism.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/cangjie5.reverse.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/cangjie5.reverse.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/cangjie5.schema.yaml: -------------------------------------------------------------------------------- 1 | # Rime schema settings 2 | # encoding: utf-8 3 | 4 | schema: 5 | schema_id: cangjie5 6 | name: 倉頡五代 7 | version: "0.24" 8 | author: 9 | - 發明人 朱邦復先生 10 | description: | 11 | 第五代倉頡輸入法 12 | 碼表源自倉頡之友發佈的《五倉世紀版》 13 | www.chinesecj.com 14 | dependencies: 15 | - luna_pinyin 16 | 17 | switches: 18 | - name: ascii_mode 19 | reset: 0 20 | states: [ 中文, 西文 ] 21 | - name: full_shape 22 | states: [ 半角, 全角 ] 23 | - name: simplification 24 | states: [ 漢字, 汉字 ] 25 | - name: extended_charset 26 | states: [ 常用, 增廣 ] 27 | - name: ascii_punct 28 | states: [ 。,, ., ] 29 | 30 | engine: 31 | processors: 32 | - ascii_composer 33 | - recognizer 34 | - key_binder 35 | - speller 36 | - punctuator 37 | - selector 38 | - navigator 39 | - express_editor 40 | segmentors: 41 | - ascii_segmentor 42 | - matcher 43 | - abc_segmentor 44 | - punct_segmentor 45 | - fallback_segmentor 46 | translators: 47 | - punct_translator 48 | - reverse_lookup_translator 49 | - table_translator 50 | filters: 51 | - simplifier 52 | - uniquifier 53 | - single_char_filter 54 | 55 | speller: 56 | alphabet: zyxwvutsrqponmlkjihgfedcba 57 | delimiter: " ;'" 58 | #max_code_length: 5 # 五碼頂字上屏 59 | 60 | translator: 61 | dictionary: cangjie5 62 | enable_charset_filter: true 63 | enable_sentence: true 64 | enable_encoder: true 65 | encode_commit_history: true 66 | max_phrase_length: 5 67 | preedit_format: 68 | - xform/^([a-z]*)$/$1|\U$1\E/ 69 | - "xlit|ABCDEFGHIJKLMNOPQRSTUVWXYZ|日月金木水火土竹戈十大中一弓人心手口尸廿山女田難卜符|" 70 | comment_format: 71 | - "xlit|abcdefghijklmnopqrstuvwxyz~|日月金木水火土竹戈十大中一弓人心手口尸廿山女田難卜符~|" 72 | disable_user_dict_for_patterns: 73 | - "^z.*$" 74 | - "^yyy.*$" 75 | 76 | abc_segmentor: 77 | extra_tags: 78 | - reverse_lookup # 與拼音(反查碼)混打 79 | 80 | reverse_lookup: 81 | dictionary: luna_pinyin 82 | prefix: "`" 83 | suffix: "'" 84 | tips: 〔拼音〕 85 | preedit_format: 86 | - xform/([nl])v/$1ü/ 87 | - xform/([nl])ue/$1üe/ 88 | - xform/([jqxy])v/$1u/ 89 | comment_format: 90 | - "xlit|abcdefghijklmnopqrstuvwxyz|日月金木水火土竹戈十大中一弓人心手口尸廿山女田難卜符|" 91 | 92 | simplifier: 93 | tips: all # 簡化字模式下提示對應的傳統漢字 94 | 95 | punctuator: 96 | import_preset: symbols 97 | 98 | key_binder: 99 | import_preset: default 100 | 101 | recognizer: 102 | import_preset: default 103 | patterns: 104 | punct: "^/[0-9]*[a-z]*$" 105 | reverse_lookup: "`[a-z]*'?$" 106 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/cangjie5.table.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/cangjie5.table.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/default.yaml: -------------------------------------------------------------------------------- 1 | # Rime default settings 2 | # encoding: utf-8 3 | 4 | config_version: "0.36" 5 | 6 | schema_list: 7 | - schema: luna_pinyin 8 | - schema: cangjie5 9 | - schema: luna_pinyin_fluency 10 | - schema: luna_pinyin_simp 11 | - schema: luna_pinyin_tw 12 | 13 | switcher: 14 | caption: 〔方案選單〕 15 | hotkeys: 16 | - Control+grave 17 | - Control+Shift+grave 18 | - F4 19 | save_options: 20 | - full_shape 21 | - ascii_punct 22 | - simplification 23 | - extended_charset 24 | fold_options: true 25 | abbreviate_options: true 26 | option_list_separator: '/' 27 | 28 | menu: 29 | page_size: 5 30 | 31 | punctuator: 32 | full_shape: 33 | ' ' : { commit: ' ' } 34 | ',' : { commit: , } 35 | '.' : { commit: 。 } 36 | '<' : [ 《, 〈, «, ‹ ] 37 | '>' : [ 》, 〉, », › ] 38 | '/' : [ /, ÷ ] 39 | '?' : { commit: ? } 40 | ';' : { commit: ; } 41 | ':' : { commit: : } 42 | '''' : { pair: [ '‘', '’' ] } 43 | '"' : { pair: [ '“', '”' ] } 44 | '\' : [ 、, \ ] 45 | '|' : [ ·, |, '§', '¦' ] 46 | '`' : ` 47 | '~' : ~ 48 | '!' : { commit: ! } 49 | '@' : [ @, ☯ ] 50 | '#' : [ #, ⌘ ] 51 | '%' : [ %, '°', '℃' ] 52 | '$' : [ ¥, '$', '€', '£', '¥', '¢', '¤' ] 53 | '^' : { commit: …… } 54 | '&' : & 55 | '*' : [ *, ·, ・, ×, ※, ❂ ] 56 | '(' : ( 57 | ')' : ) 58 | '-' : - 59 | '_' : —— 60 | '+' : + 61 | '=' : = 62 | '[' : [ 「, 【, 〔, [ ] 63 | ']' : [ 」, 】, 〕, ] ] 64 | '{' : [ 『, 〖, { ] 65 | '}' : [ 』, 〗, } ] 66 | half_shape: 67 | ',' : { commit: , } 68 | '.' : { commit: 。 } 69 | '<' : [ 《, 〈, «, ‹ ] 70 | '>' : [ 》, 〉, », › ] 71 | '/' : [ 、, '/', /, ÷ ] 72 | '?' : { commit: ? } 73 | ';' : { commit: ; } 74 | ':' : { commit: : } 75 | '''' : { pair: [ '‘', '’' ] } 76 | '"' : { pair: [ '“', '”' ] } 77 | '\' : [ 、, '\', \ ] 78 | '|' : [ ·, '|', |, '§', '¦' ] 79 | '`' : '`' 80 | '~' : [ '~', ~ ] 81 | '!' : { commit: ! } 82 | '@' : '@' 83 | '#' : '#' 84 | '%' : [ '%', %, '°', '℃' ] 85 | '$' : [ ¥, '$', '€', '£', '¥', '¢', '¤' ] 86 | '^' : { commit: …… } 87 | '&' : '&' 88 | '*' : [ '*', *, ·, ・, ×, ※, ❂ ] 89 | '(' : ( 90 | ')' : ) 91 | '-' : '-' 92 | '_' : —— 93 | '+' : '+' 94 | '=' : '=' 95 | '[' : [ 「, 【, 〔, [ ] 96 | ']' : [ 」, 】, 〕, ] ] 97 | '{' : [ 『, 〖, { ] 98 | '}' : [ 』, 〗, } ] 99 | 100 | key_binder: 101 | bindings: 102 | # Emacs style 103 | - { when: composing, accept: Control+p, send: Up } 104 | - { when: composing, accept: Control+n, send: Down } 105 | - { when: composing, accept: Control+b, send: Left } 106 | - { when: composing, accept: Control+f, send: Right } 107 | - { when: composing, accept: Control+a, send: Home } 108 | - { when: composing, accept: Control+e, send: End } 109 | - { when: composing, accept: Control+d, send: Delete } 110 | - { when: composing, accept: Control+k, send: Shift+Delete } 111 | - { when: composing, accept: Control+h, send: BackSpace } 112 | - { when: composing, accept: Control+g, send: Escape } 113 | - { when: composing, accept: Control+bracketleft, send: Escape } 114 | - { when: composing, accept: Alt+v, send: Page_Up } 115 | - { when: composing, accept: Control+v, send: Page_Down } 116 | # paging keys 117 | - { when: composing, accept: ISO_Left_Tab, send: Page_Up } 118 | - { when: composing, accept: Shift+Tab, send: Page_Up } 119 | - { when: composing, accept: Tab, send: Page_Down } 120 | - { when: has_menu, accept: minus, send: Page_Up } 121 | - { when: has_menu, accept: equal, send: Page_Down } 122 | - { when: paging, accept: comma, send: Page_Up } 123 | - { when: has_menu, accept: period, send: Page_Down } 124 | # hotkey switch 125 | - { when: always, accept: Control+Shift+1, select: .next } 126 | - { when: always, accept: Control+Shift+2, toggle: ascii_mode } 127 | - { when: always, accept: Control+Shift+3, toggle: full_shape } 128 | - { when: always, accept: Control+Shift+4, toggle: simplification } 129 | - { when: always, accept: Control+Shift+5, toggle: extended_charset } 130 | - { when: always, accept: Control+Shift+exclam, select: .next } 131 | - { when: always, accept: Control+Shift+at, toggle: ascii_mode } 132 | - { when: always, accept: Control+Shift+numbersign, toggle: full_shape } 133 | - { when: always, accept: Control+Shift+dollar, toggle: simplification } 134 | - { when: always, accept: Control+Shift+percent, toggle: extended_charset } 135 | - { when: always, accept: Shift+space, toggle: full_shape } 136 | - { when: always, accept: Control+period, toggle: ascii_punct } 137 | 138 | recognizer: 139 | patterns: 140 | email: "^[A-Za-z][-_.0-9A-Za-z]*@.*$" 141 | uppercase: "[A-Z][-_+.'0-9A-Za-z]*$" 142 | url: "^(www[.]|https?:|ftp[.:]|mailto:|file:).*$|^[a-z]+[.].+$" 143 | 144 | ascii_composer: 145 | good_old_caps_lock: true 146 | switch_key: 147 | Shift_L: inline_ascii 148 | Shift_R: commit_text 149 | Control_L: noop 150 | Control_R: noop 151 | Caps_Lock: clear 152 | Eisu_toggle: clear 153 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/installation.yaml: -------------------------------------------------------------------------------- 1 | distribution_code_name: Squirrel 2 | distribution_name: "鼠鬚管" 3 | distribution_version: 0.9.26.1 4 | install_time: "Sat Nov 18 21:52:08 2017" 5 | installation_id: "b26b240d-eea7-41e9-bfeb-b31ca10d811f" 6 | rime_version: 1.2.9 -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.prism.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/luna_pinyin.prism.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.reverse.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/luna_pinyin.reverse.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.schema.yaml: -------------------------------------------------------------------------------- 1 | # Rime schema 2 | # encoding: utf-8 3 | 4 | schema: 5 | schema_id: luna_pinyin 6 | name: 朙月拼音 7 | version: "0.22" 8 | author: 9 | - 佛振 10 | description: | 11 | Rime 預設的拼音輸入方案。 12 | 參考以下作品而創作: 13 | * CC-CEDICT 14 | * Android open source project 15 | * Chewing - 新酷音 16 | * opencc - 開放中文轉換 17 | dependencies: 18 | - stroke 19 | 20 | switches: 21 | - name: ascii_mode 22 | reset: 0 23 | states: [ 中文, 西文 ] 24 | - name: full_shape 25 | states: [ 半角, 全角 ] 26 | - name: simplification 27 | states: [ 漢字, 汉字 ] 28 | - name: ascii_punct 29 | states: [ 。,, ., ] 30 | 31 | engine: 32 | processors: 33 | - ascii_composer 34 | - recognizer 35 | - key_binder 36 | - speller 37 | - punctuator 38 | - selector 39 | - navigator 40 | - express_editor 41 | segmentors: 42 | - ascii_segmentor 43 | - matcher 44 | - abc_segmentor 45 | - punct_segmentor 46 | - fallback_segmentor 47 | translators: 48 | - punct_translator 49 | - table_translator@custom_phrase 50 | - reverse_lookup_translator 51 | - script_translator 52 | filters: 53 | - simplifier 54 | - uniquifier 55 | 56 | speller: 57 | alphabet: zyxwvutsrqponmlkjihgfedcba 58 | delimiter: " '" 59 | algebra: 60 | - erase/^xx$/ 61 | - abbrev/^([a-z]).+$/$1/ 62 | - abbrev/^([zcs]h).+$/$1/ 63 | - derive/^([nl])ve$/$1ue/ 64 | - derive/^([jqxy])u/$1v/ 65 | - derive/un$/uen/ 66 | - derive/ui$/uei/ 67 | - derive/iu$/iou/ 68 | - derive/([aeiou])ng$/$1gn/ 69 | - derive/([dtngkhrzcs])o(u|ng)$/$1o/ 70 | - derive/ong$/on/ 71 | - derive/ao$/oa/ 72 | - derive/([iu])a(o|ng?)$/a$1$2/ 73 | 74 | translator: 75 | dictionary: luna_pinyin 76 | preedit_format: 77 | - xform/([nl])v/$1ü/ 78 | - xform/([nl])ue/$1üe/ 79 | - xform/([jqxy])v/$1u/ 80 | 81 | custom_phrase: 82 | dictionary: "" 83 | user_dict: custom_phrase 84 | db_class: stabledb 85 | enable_completion: false 86 | enable_sentence: false 87 | initial_quality: 1 88 | 89 | reverse_lookup: 90 | dictionary: stroke 91 | enable_completion: true 92 | prefix: "`" 93 | suffix: "'" 94 | tips: 〔筆畫〕 95 | preedit_format: 96 | - xlit/hspnz/一丨丿丶乙/ 97 | comment_format: 98 | - xform/([nl])v/$1ü/ 99 | 100 | punctuator: 101 | import_preset: symbols 102 | 103 | key_binder: 104 | import_preset: default 105 | 106 | recognizer: 107 | import_preset: default 108 | patterns: 109 | # hack: to enable "/fh" style symbols, '/' must be mapped to a [list]. 110 | # so those who have customized '/' for direct commit won't be affected by 111 | # this change. 112 | punct: "^/([0-9]+[a-z]*|[a-z]+)$" 113 | reverse_lookup: "`[a-z]*'?$" 114 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.table.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/luna_pinyin.table.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.userdb/000005.ldb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/dotfiles/Mac/RIME/default-config/luna_pinyin.userdb/000005.ldb -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.userdb/CURRENT: -------------------------------------------------------------------------------- 1 | MANIFEST-000007 2 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.userdb/LOCK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/dotfiles/Mac/RIME/default-config/luna_pinyin.userdb/LOCK -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.userdb/LOG: -------------------------------------------------------------------------------- 1 | 2017/11/18-22:22:11.677344 7fff9fb74340 Recovering log #6 2 | 2017/11/18-22:22:11.677658 7fff9fb74340 Level-0 table #8: started 3 | 2017/11/18-22:22:11.677739 7fff9fb74340 Level-0 table #8: 0 bytes OK 4 | 2017/11/18-22:22:11.679024 7fff9fb74340 Delete type=0 #6 5 | 2017/11/18-22:22:11.679276 7fff9fb74340 Delete type=3 #4 6 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.userdb/LOG.old: -------------------------------------------------------------------------------- 1 | 2017/11/18-21:57:46.524778 7fff9afc9340 Recovering log #3 2 | 2017/11/18-21:57:46.524914 7fff9afc9340 Level-0 table #5: started 3 | 2017/11/18-21:57:46.525620 7fff9afc9340 Level-0 table #5: 589 bytes OK 4 | 2017/11/18-21:57:46.527426 7fff9afc9340 Delete type=0 #3 5 | 2017/11/18-21:57:46.527603 7fff9afc9340 Delete type=3 #2 6 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin.userdb/MANIFEST-000007: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/dotfiles/Mac/RIME/default-config/luna_pinyin.userdb/MANIFEST-000007 -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin_fluency.prism.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/luna_pinyin_fluency.prism.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin_fluency.schema.yaml: -------------------------------------------------------------------------------- 1 | # Rime schema 2 | # encoding: utf-8 3 | 4 | schema: 5 | schema_id: luna_pinyin_fluency 6 | name: 朙月拼音·語句流 7 | version: "0.25" 8 | author: 9 | - 佛振 10 | description: | 11 | 朙月拼音·語句流錄入! 12 | 以空格分詞、標點或回車上屏。 13 | dependencies: 14 | - stroke 15 | 16 | switches: 17 | - name: ascii_mode 18 | reset: 0 19 | states: [ 中文, 西文 ] 20 | - name: full_shape 21 | states: [ 半角, 全角 ] 22 | - name: simplification 23 | states: [ 漢字, 汉字 ] 24 | - name: ascii_punct 25 | states: [ 。,, ., ] 26 | 27 | engine: 28 | processors: 29 | - ascii_composer 30 | - recognizer 31 | - key_binder 32 | - speller 33 | - punctuator 34 | - selector 35 | - navigator 36 | - fluency_editor 37 | segmentors: 38 | - ascii_segmentor 39 | - matcher 40 | - abc_segmentor 41 | - punct_segmentor 42 | - fallback_segmentor 43 | translators: 44 | - punct_translator 45 | - table_translator@custom_phrase 46 | - reverse_lookup_translator 47 | - script_translator 48 | filters: 49 | - simplifier 50 | - uniquifier 51 | 52 | speller: 53 | alphabet: zyxwvutsrqponmlkjihgfedcba 54 | delimiter: " '" 55 | algebra: 56 | - erase/^xx$/ 57 | - abbrev/^([a-z]).+$/$1/ 58 | - abbrev/^([zcs]h).+$/$1/ 59 | - derive/^([nl])ve$/$1ue/ 60 | - derive/^([jqxy])u/$1v/ 61 | - derive/un$/uen/ 62 | - derive/ui$/uei/ 63 | - derive/iu$/iou/ 64 | - derive/([aeiou])ng$/$1gn/ 65 | - derive/([dtngkhrzcs])o(u|ng)$/$1o/ 66 | - derive/ong$/on/ 67 | - derive/ao$/oa/ 68 | - derive/([iu])a(o|ng?)$/a$1$2/ 69 | 70 | translator: 71 | dictionary: luna_pinyin 72 | prism: luna_pinyin_fluency 73 | preedit_format: 74 | - xform/([nl])v/$1ü/ 75 | - xform/([nl])ue/$1üe/ 76 | - xform/([jqxy])v/$1u/ 77 | 78 | custom_phrase: 79 | dictionary: "" 80 | user_dict: custom_phrase 81 | db_class: stabledb 82 | enable_completion: false 83 | enable_sentence: false 84 | initial_quality: 1 85 | 86 | reverse_lookup: 87 | dictionary: stroke 88 | enable_completion: true 89 | prefix: "`" 90 | suffix: "'" 91 | tips: 〔筆畫〕 92 | preedit_format: 93 | - xlit/hspnz/一丨丿丶乙/ 94 | comment_format: 95 | - xform/([nl])v/$1ü/ 96 | 97 | punctuator: 98 | import_preset: symbols 99 | 100 | key_binder: 101 | import_preset: default 102 | 103 | recognizer: 104 | import_preset: default 105 | patterns: 106 | number: "^[-+]?[0-9][.:0-9]*[%]?$" 107 | punct: "^/[0-9]*[a-z]*$" 108 | reverse_lookup: "`[a-z]*'?$" 109 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin_simp.prism.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/luna_pinyin_simp.prism.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin_simp.schema.yaml: -------------------------------------------------------------------------------- 1 | # Rime schema 2 | # encoding: utf-8 3 | 4 | schema: 5 | schema_id: luna_pinyin_simp 6 | name: 朙月拼音·简化字 7 | version: "0.22" 8 | author: 9 | - 佛振 10 | description: | 11 | 朙月拼音,簡化字輸出模式。 12 | 13 | switches: 14 | - name: ascii_mode 15 | reset: 0 16 | states: [ 中文, 西文 ] 17 | - name: full_shape 18 | states: [ 半角, 全角 ] 19 | - name: zh_simp 20 | reset: 1 21 | states: [ 漢字, 汉字 ] 22 | - name: ascii_punct 23 | states: [ 。,, ., ] 24 | 25 | engine: 26 | processors: 27 | - ascii_composer 28 | - recognizer 29 | - key_binder 30 | - speller 31 | - punctuator 32 | - selector 33 | - navigator 34 | - express_editor 35 | segmentors: 36 | - ascii_segmentor 37 | - matcher 38 | - abc_segmentor 39 | - punct_segmentor 40 | - fallback_segmentor 41 | translators: 42 | - punct_translator 43 | - table_translator@custom_phrase 44 | - script_translator 45 | filters: 46 | - simplifier 47 | - uniquifier 48 | 49 | speller: 50 | alphabet: zyxwvutsrqponmlkjihgfedcba 51 | delimiter: " '" 52 | algebra: 53 | - erase/^xx$/ 54 | - abbrev/^([a-z]).+$/$1/ 55 | - abbrev/^([zcs]h).+$/$1/ 56 | - derive/^([nl])ve$/$1ue/ 57 | - derive/^([jqxy])u/$1v/ 58 | - derive/un$/uen/ 59 | - derive/ui$/uei/ 60 | - derive/iu$/iou/ 61 | - derive/([aeiou])ng$/$1gn/ 62 | - derive/([dtngkhrzcs])o(u|ng)$/$1o/ 63 | - derive/ong$/on/ 64 | - derive/ao$/oa/ 65 | - derive/([iu])a(o|ng?)$/a$1$2/ 66 | 67 | translator: 68 | dictionary: luna_pinyin 69 | prism: luna_pinyin_simp 70 | preedit_format: 71 | - xform/([nl])v/$1ü/ 72 | - xform/([nl])ue/$1üe/ 73 | - xform/([jqxy])v/$1u/ 74 | 75 | custom_phrase: 76 | dictionary: "" 77 | user_dict: custom_phrase 78 | db_class: stabledb 79 | enable_completion: false 80 | enable_sentence: false 81 | initial_quality: 1 82 | 83 | simplifier: 84 | option_name: zh_simp 85 | 86 | punctuator: 87 | import_preset: default 88 | 89 | key_binder: 90 | import_preset: default 91 | bindings: 92 | - { when: always, accept: Control+Shift+4, toggle: zh_simp } 93 | - { when: always, accept: Control+Shift+dollar, toggle: zh_simp } 94 | 95 | recognizer: 96 | import_preset: default 97 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin_tw.prism.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/luna_pinyin_tw.prism.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/luna_pinyin_tw.schema.yaml: -------------------------------------------------------------------------------- 1 | # Rime schema 2 | # encoding: utf-8 3 | 4 | schema: 5 | schema_id: luna_pinyin_tw 6 | name: 朙月拼音·臺灣正體 7 | version: "0.20" 8 | author: 9 | - 佛振 10 | description: | 11 | 朙月拼音,臺灣正體字形輸出模式。 12 | 13 | switches: 14 | - name: ascii_mode 15 | reset: 0 16 | states: [ 中文, 西文 ] 17 | - name: full_shape 18 | states: [ 半角, 全角 ] 19 | - name: ascii_punct 20 | states: [ 。,, ., ] 21 | - name: zh_tw 22 | reset: 1 23 | # 啓用opencc字形轉換,但不在選單中顯示 24 | 25 | engine: 26 | processors: 27 | - ascii_composer 28 | - recognizer 29 | - key_binder 30 | - speller 31 | - punctuator 32 | - selector 33 | - navigator 34 | - express_editor 35 | segmentors: 36 | - ascii_segmentor 37 | - matcher 38 | - abc_segmentor 39 | - punct_segmentor 40 | - fallback_segmentor 41 | translators: 42 | - punct_translator 43 | - table_translator@custom_phrase 44 | - script_translator 45 | filters: 46 | - simplifier 47 | - uniquifier 48 | 49 | speller: 50 | alphabet: zyxwvutsrqponmlkjihgfedcba 51 | delimiter: " '" 52 | algebra: 53 | - erase/^xx$/ 54 | - abbrev/^([a-z]).+$/$1/ 55 | - abbrev/^([zcs]h).+$/$1/ 56 | - derive/^([nl])ve$/$1ue/ 57 | - derive/^([jqxy])u/$1v/ 58 | - derive/un$/uen/ 59 | - derive/ui$/uei/ 60 | - derive/iu$/iou/ 61 | - derive/([aeiou])ng$/$1gn/ 62 | - derive/([dtngkhrzcs])o(u|ng)$/$1o/ 63 | - derive/ong$/on/ 64 | - derive/ao$/oa/ 65 | - derive/([iu])a(o|ng?)$/a$1$2/ 66 | 67 | translator: 68 | dictionary: luna_pinyin 69 | prism: luna_pinyin_tw 70 | preedit_format: 71 | - xform/([nl])v/$1ü/ 72 | - xform/([nl])ue/$1üe/ 73 | - xform/([jqxy])v/$1u/ 74 | 75 | custom_phrase: 76 | dictionary: "" 77 | user_dict: custom_phrase 78 | db_class: stabledb 79 | enable_completion: false 80 | enable_sentence: false 81 | initial_quality: 1 82 | 83 | simplifier: 84 | opencc_config: t2tw.json 85 | option_name: zh_tw 86 | 87 | punctuator: 88 | import_preset: default 89 | 90 | key_binder: 91 | import_preset: default 92 | 93 | recognizer: 94 | import_preset: default 95 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/squirrel.custom.yaml: -------------------------------------------------------------------------------- 1 | patch: 2 | show_notifications_via_notification_center: true 3 | us_keyboard_layout: true # 美式键盘布局 4 | show_notifications_when: appropriate # 状态通知,适当,也可设为全开(always)全关(never) 5 | 6 | style: 7 | color_scheme: light # 配色方案名称 8 | #alpha: 0.99 # 透明度 9 | 10 | preset_color_schemes: 11 | light: 12 | name: register # 作者名 13 | author: "register " # 作者 14 | 15 | horizontal: true # 候选条横向显示 16 | inline_preedit: true # 启用内嵌编码模式,候选条首行不显示拼音 17 | candidate_format: "%c.\u2005%@\u2005" # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间。 18 | 19 | corner_radius: 5 # 候选条圆角半径 20 | border_height: 7 # 窗口边界高度,大于圆角半径才生效 21 | border_width: 7 # 窗口边界宽度,大于圆角半径才生效 22 | back_color: 0xFFFFFF # 候选条背景色 23 | border_color: 0xE0B693 # 边框色 24 | font_face: "PingFangSC-Regular" # 候选词字体 25 | font_point: 18 # 预选栏文字字号 26 | label_font_face: "PingFangSC-Light" # 候选词编号字体 27 | label_font_point: 14 # 预选栏编号字号 28 | label_color: 0x999999 # 预选栏编号颜色 29 | candidate_text_color: 0x000000 # 预选项文字颜色 30 | text_color: 0x000000 # 拼音行文字颜色,24位色值,16进制,BGR顺序 31 | comment_text_color: 0x999999 # 拼音等提示文字颜色 32 | hilited_text_color: 0xFF6941 # 高亮拼音 (需要开启内嵌编码) 33 | hilited_candidate_text_color: 0xFF6941 # 第一候选项文字颜色 34 | hilited_candidate_back_color: 0xFFFFFF # 第一候选项背景背景色 35 | hilited_candidate_label_color: 0xFF6941 # 第一候选项编号颜色 36 | hilited_comment_text_color: 0xFF6941 # 注解文字高亮 37 | 38 | app_options: 39 | com.blacktree.Quicksilver: &a 40 | ascii_mode: false 41 | com.googlecode.iterm2: *a 42 | com.alfredapp.Alfred: *a 43 | com.runningwithcrayons.Alfred-2: *a 44 | org.vim.MacVim: *a 45 | com.apple.Terminal: *a -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/squirrel.yaml: -------------------------------------------------------------------------------- 1 | # Squirrel settings 2 | # encoding: utf-8 3 | 4 | config_version: "0.22" 5 | 6 | us_keyboard_layout: false 7 | 8 | # for veteran chord-typist 9 | chord_duration: 0.1 # seconds 10 | 11 | # options: always | never | appropriate 12 | show_notifications_when: appropriate 13 | 14 | # Show notifications via Notification Center instead of Growl. 15 | # (Only valid if OS version is at least 10.8 and 16 | # 'show_notifications_when' is NOT set to 'never'.) 17 | show_notifications_via_notification_center: false 18 | 19 | style: 20 | color_scheme: native 21 | horizontal: false 22 | inline_preedit: true 23 | corner_radius: 10 24 | border_height: 0 25 | border_width: 0 26 | line_spacing: 1 27 | spacing: 5 # space between preedit and candidates in non-inline mode 28 | #candidate_format: '%c. %@ ' 29 | font_face: 'Lucida Grande' # supporting soft cursor '›' 30 | #font_point: 21 31 | #label_font_face: 'STHeitiTC-Medium' 32 | #label_font_point: 18 33 | 34 | preset_color_schemes: 35 | aqua: 36 | name: 碧水/Aqua 37 | author: 佛振 38 | text_color: 0x606060 39 | back_color: 0xeeeceeee 40 | candidate_text_color: 0x000000 41 | hilited_text_color: 0x000000 42 | hilited_candidate_text_color: 0xffffff 43 | hilited_candidate_back_color: 0xeefa3a0a 44 | comment_text_color: 0x5a5a5a 45 | hilited_comment_text_color: 0xfcac9d 46 | 47 | azure: 48 | name: 青天/Azure 49 | author: 佛振 50 | text_color: 0xcfa677 51 | candidate_text_color: 0xffeacc 52 | back_color: 0xee8b4e01 53 | hilited_text_color: 0xffeacc 54 | hilited_candidate_text_color: 0x7ffeff 55 | hilited_candidate_back_color: 0x00000000 56 | comment_text_color: 0xc69664 57 | 58 | luna: 59 | name: 明月/Luna 60 | author: 佛振 61 | text_color: 0xa5a5a5 62 | back_color: 0xdd000000 63 | candidate_text_color: 0xeceeee 64 | hilited_text_color: 0x7fffff 65 | hilited_candidate_text_color: 0x7fffff 66 | hilited_candidate_back_color: 0x40000000 67 | comment_text_color: 0xa5a5a5 68 | hilited_comment_text_color: 0x449c9d 69 | 70 | ink: 71 | name: 墨池/Ink 72 | author: 佛振 73 | text_color: 0x000000 74 | back_color: 0xeeffffff 75 | candidate_text_color: 0x000000 76 | hilited_text_color: 0x000000 77 | hilited_back_color: 0xdddddd 78 | hilited_candidate_text_color: 0xffffff 79 | hilited_candidate_back_color: 0xcc000000 80 | comment_text_color: 0x5a5a5a 81 | hilited_comment_text_color: 0x808080 82 | 83 | lost_temple: 84 | name: 孤寺/Lost Temple 85 | author: 佛振 , based on ir_black 86 | text_color: 0xe8f3f6 87 | back_color: 0xee303030 88 | hilited_text_color: 0x82e6ca 89 | hilited_candidate_text_color: 0x000000 90 | hilited_candidate_back_color: 0x82e6ca 91 | comment_text_color: 0xbb82e6ca 92 | hilited_comment_text_color: 0xbb203d34 93 | 94 | dark_temple: 95 | name: 暗堂/Dark Temple 96 | author: 佛振 , based on ir_black 97 | text_color: 0x92f6da 98 | back_color: 0x222222 99 | candidate_text_color: 0xd8e3e6 100 | hilited_text_color: 0xffcf9a 101 | hilited_back_color: 0x222222 102 | hilited_candidate_text_color: 0x92f6da 103 | hilited_candidate_back_color: 0x10000000 # 0x333333 104 | comment_text_color: 0x606cff 105 | 106 | starcraft: 107 | name: 星際我爭霸/StarCraft 108 | author: Contralisk , original artwork by Blizzard Entertainment 109 | text_color: 0xccaa88 110 | candidate_text_color: 0x30bb55 111 | back_color: 0xee000000 112 | border_color: 0x1010a0 113 | hilited_text_color: 0xfecb96 114 | hilited_back_color: 0x000000 115 | hilited_candidate_text_color: 0x70ffaf 116 | hilited_candidate_back_color: 0x00000000 117 | comment_text_color: 0xfecb96 118 | 119 | google: 120 | name: 谷歌/Google 121 | author: skoj 122 | text_color: 0x666666 #拼音串 123 | candidate_text_color: 0x000000 #非第一候选项 124 | back_color: 0xFFFFFF #背景 125 | border_color: 0xE2E2E2 #边框 126 | hilited_text_color: 0x000000 #拼音串高亮 127 | hilited_back_color: 0xFFFFFF #拼音串高亮背景 128 | hilited_candidate_text_color: 0xFFFFFF #第一候选项 129 | hilited_candidate_back_color: 0xCE7539 #第一候选项背景 130 | comment_text_color: 0x6D6D6D #注解文字 131 | hilited_comment_text_color: 0xEBC6B0 #注解文字高亮 132 | 133 | solarized_rock: 134 | name: 曬經石/Solarized Rock 135 | author: Aben , based on Ethan Schoonover's Solarized color scheme 136 | back_color: 0x362b00 137 | border_color: 0x362b00 138 | text_color: 0x009985 139 | hilited_text_color: 0x98a12a 140 | candidate_text_color: 0x969483 141 | hilited_candidate_text_color: 0xffffff 142 | hilited_candidate_back_color: 0x8236d3 143 | hilited_comment_text_color: 0x362b00 144 | 145 | clean_white: 146 | name: 简约白/Clean White 147 | author: Chongyu Zhu , based on 搜狗「简约白」 148 | horizontal: true 149 | candidate_format: '%c %@ ' 150 | corner_radius: 6 151 | border_height: 6 152 | border_width: 6 153 | font_point: 16 154 | label_font_point: 12 155 | label_color: 0x888888 156 | text_color: 0x808080 157 | hilited_text_color: 0x000000 158 | candidate_text_color: 0x000000 159 | comment_text_color: 0x808080 160 | back_color: 0xeeeeee 161 | hilited_candidate_label_color: 0xa0c98915 162 | hilited_candidate_text_color: 0xc98915 163 | hilited_candidate_back_color: 0xeeeeee 164 | 165 | app_options: 166 | com.alfredapp.Alfred: 167 | ascii_mode: true 168 | com.runningwithcrayons.Alfred-2: 169 | ascii_mode: true 170 | com.blacktree.Quicksilver: 171 | ascii_mode: true 172 | com.apple.Terminal: 173 | ascii_mode: true 174 | no_inline: true 175 | com.googlecode.iterm2: 176 | ascii_mode: true 177 | org.vim.MacVim: 178 | ascii_mode: true 179 | no_inline: true 180 | #com.apple.dt.Xcode: 181 | # ascii_mode: true 182 | #com.barebones.textwrangler: 183 | # ascii_mode: true 184 | #com.macromates.TextMate.preview: 185 | # ascii_mode: true 186 | #com.sublimetext.2: 187 | # ascii_mode: true 188 | #org.gnu.Aquamacs: 189 | # ascii_mode: true 190 | #org.gnu.Emacs: 191 | # ascii_mode: true 192 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/stroke.prism.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/stroke.prism.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/stroke.reverse.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/stroke.reverse.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/stroke.schema.yaml: -------------------------------------------------------------------------------- 1 | # Rime schema settings 2 | # encoding: utf-8 3 | 4 | schema: 5 | schema_id: stroke 6 | name: "五筆畫" 7 | version: "0.5" 8 | author: 9 | - 四季的風 10 | - 雪齋 11 | - 瑾昀 12 | description: | 13 | 五筆畫 14 | h,s,p,n,z 代表橫、豎、撇、捺、折 15 | dependencies: 16 | - luna_pinyin 17 | 18 | switches: 19 | - name: ascii_mode 20 | reset: 0 21 | states: [ 中文, 西文 ] 22 | - name: full_shape 23 | states: [ 半角, 全角 ] 24 | - name: ascii_punct 25 | states: [ 。,, ., ] 26 | 27 | engine: 28 | processors: 29 | - ascii_composer 30 | - recognizer 31 | - key_binder 32 | - speller 33 | - punctuator 34 | - selector 35 | - navigator 36 | - express_editor 37 | segmentors: 38 | - ascii_segmentor 39 | - matcher 40 | - abc_segmentor 41 | - punct_segmentor 42 | - fallback_segmentor 43 | translators: 44 | - punct_translator 45 | - reverse_lookup_translator 46 | - table_translator 47 | 48 | speller: 49 | alphabet: "abcdefghijklmnopqrstuvwxyz" 50 | delimiter: " '" 51 | 52 | menu: 53 | page_size: 9 54 | 55 | translator: 56 | dictionary: stroke 57 | preedit_format: 58 | - xlit/hspnz/一丨丿丶乙/ 59 | comment_format: 60 | - xform/~// 61 | - xlit/hspnz/一丨丿丶乙/ 62 | 63 | abc_segmentor: 64 | extra_tags: 65 | - reverse_lookup 66 | 67 | reverse_lookup: 68 | dictionary: luna_pinyin 69 | prefix: "`" 70 | suffix: "'" 71 | tips: 〔拼音〕 72 | preedit_format: 73 | - xform/([nl])v/$1ü/ 74 | - xform/([nl])ue/$1üe/ 75 | - xform/([jqxy])v/$1u/ 76 | comment_format: 77 | - xlit/hspnz/一丨丿丶乙/ 78 | 79 | punctuator: 80 | import_preset: default 81 | 82 | key_binder: 83 | import_preset: default 84 | 85 | recognizer: 86 | import_preset: default 87 | patterns: 88 | reverse_lookup: "`[a-z]*'?$" 89 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/stroke.table.bin: -------------------------------------------------------------------------------- 1 | /Library/Input Methods/Squirrel.app/Contents/SharedSupport/stroke.table.bin -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/default-config/user.yaml: -------------------------------------------------------------------------------- 1 | var: 2 | previously_selected_schema: luna_pinyin_simp 3 | schema_access_time: 4 | luna_pinyin_simp: 1511013223 -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/leo-custom/default.custom.yaml: -------------------------------------------------------------------------------- 1 | patch: 2 | switcher: 3 | caption: 〔切换〕 4 | hotkeys: 5 | - "Control+s" # 添加 Ctrl+s 6 | fold_options: true 7 | option_list_separator: '/' 8 | abbreviate_options: true 9 | 10 | menu: 11 | page_size: 9 # 候选词数量 12 | 13 | schema_list: 14 | - schema: double_pinyin 15 | - schema: luna_pinyin 16 | 17 | ascii_composer: 18 | switch_key: 19 | Caps_Lock: noop 20 | Control_L: noop 21 | Control_R: noop 22 | Shift_L: commit_code 23 | Shift_R: commit_code 24 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/leo-custom/double_pinyin.custom.yaml: -------------------------------------------------------------------------------- 1 | # Rime schema 2 | # encoding: utf-8 3 | 4 | patch: 5 | switches: 6 | - name: ascii_mode 7 | reset: 0 8 | states: [ 中文, 西文 ] 9 | - name: full_shape 10 | states: [ 半角, 全角 ] 11 | - name: ascii_punct 12 | reset: 1 13 | states: [ 。,, ., ] 14 | - name: simplification 15 | reset: 1 # 增加這一行:默認啓用「繁→簡」轉換。 16 | states: [ 漢字, 汉字 ] 17 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/leo-custom/luna_pinyin.custom.yaml: -------------------------------------------------------------------------------- 1 | patch: 2 | switches: 3 | - name: ascii_mode 4 | reset: 1 5 | states: [中文, 西文] 6 | - name: full_shape 7 | states: [半角, 全角] 8 | - name: simplification 9 | reset: 1 10 | states: [漢字, 汉字] 11 | - name: ascii_punct 12 | states: [。,, .,] 13 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/leo-custom/luna_pinyin_simp.custom.yaml: -------------------------------------------------------------------------------- 1 | patch: 2 | switches: 3 | - name: ascii_mode 4 | reset: 1 5 | states: [ 中文, 西文 ] 6 | - name: full_shape 7 | states: [ 半角, 全角 ] 8 | - name: zh_simp 9 | reset: 1 10 | states: [ 漢字, 汉字 ] 11 | - name: ascii_punct 12 | states: [ 。,, ., ] 13 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/leo-custom/squirrel.custom.yaml: -------------------------------------------------------------------------------- 1 | patch: 2 | show_notifications_via_notification_center: true 3 | us_keyboard_layout: true # 美式键盘布局 4 | show_notifications_when: appropriate # 状态通知,适当,也可设为全开(always)全关(never) 5 | 6 | style: 7 | color_scheme: light # 配色方案名称 8 | #alpha: 0.99 # 透明度 9 | 10 | preset_color_schemes: 11 | light: 12 | name: register # 作者名 13 | author: "register " # 作者 14 | 15 | horizontal: true # 候选条横向显示 16 | inline_preedit: true # 启用内嵌编码模式,候选条首行不显示拼音 17 | candidate_format: "%c.\u2005%@\u2005" # 用 1/6 em 空格 U+2005 来控制编号 %c 和候选词 %@ 前后的空间。 18 | 19 | corner_radius: 5 # 候选条圆角半径 20 | border_height: 7 # 窗口边界高度,大于圆角半径才生效 21 | border_width: 7 # 窗口边界宽度,大于圆角半径才生效 22 | back_color: 0xFFFFFF # 候选条背景色 23 | border_color: 0xE0B693 # 边框色 24 | font_face: "PingFangSC-Regular" # 候选词字体 25 | font_point: 18 # 预选栏文字字号 26 | label_font_face: "PingFangSC-Light" # 候选词编号字体 27 | label_font_point: 14 # 预选栏编号字号 28 | label_color: 0x999999 # 预选栏编号颜色 29 | candidate_text_color: 0x000000 # 预选项文字颜色 30 | text_color: 0x000000 # 拼音行文字颜色,24位色值,16进制,BGR顺序 31 | comment_text_color: 0x999999 # 拼音等提示文字颜色 32 | hilited_text_color: 0xFF6941 # 高亮拼音 (需要开启内嵌编码) 33 | hilited_candidate_text_color: 0xFF6941 # 第一候选项文字颜色 34 | hilited_candidate_back_color: 0xFFFFFF # 第一候选项背景背景色 35 | hilited_candidate_label_color: 0xFF6941 # 第一候选项编号颜色 36 | hilited_comment_text_color: 0xFF6941 # 注解文字高亮 37 | -------------------------------------------------------------------------------- /dotfiles/Mac/RIME/sync.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/dotfiles/Mac/RIME/sync.zip -------------------------------------------------------------------------------- /dotfiles/Mac/git/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Leo Hui 3 | email = leohxj@gmail.com 4 | [credential] 5 | helper = osxkeychain 6 | [alias] 7 | st = status 8 | ci = commit 9 | co = checkout 10 | br = branch 11 | mm = merge --no-ff 12 | last = "log -1 HEAD" 13 | ll = "log --pretty=oneline --graph" 14 | unstage = "reset HEAD --" 15 | gi = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi" 16 | [commit] 17 | template = /Users/leohxj/.stCommitMsg 18 | [core] 19 | excludesfile = /Users/leohxj/.gitignore_global 20 | [difftool] 21 | prompt = false 22 | [difftool "sourcetree"] 23 | cmd = /usr/local/bin/bcomp \"$LOCAL\" \"$REMOTE\" 24 | [diff] 25 | tool = sourcetree 26 | [mergetool] 27 | prompt = false 28 | keepBackup = false 29 | [mergetool "sourcetree"] 30 | cmd = /usr/local/bin/bcomp \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" 31 | trustExitCode = true 32 | [merge] 33 | tool = sourcetree 34 | 35 | # for github gitconfig 36 | [includeIf "gitdir:~/workspace/github/"] 37 | path = ~/workspace/github/.gitconfig 38 | -------------------------------------------------------------------------------- /dotfiles/Mac/git/.gitignore_global: -------------------------------------------------------------------------------- 1 | *~ 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /dotfiles/Mac/git/.stCommitMsg: -------------------------------------------------------------------------------- 1 | 2 | 3 | # head: (): 4 | # - type: feat, fix, docs, style, refactor, test, chore 5 | # - scope: can be empty (eg. if the change is a global or difficult to assign to a single component) 6 | # - subject: start with verb (such as 'change'), 50-character line 7 | # 8 | # body: 72-character wrapped. This should answer: 9 | # * Why was this change necessary? 10 | # * How does it address the problem? 11 | # * Are there any side effects? 12 | # 13 | # footer: 14 | # - Include a link to the ticket, if any. 15 | # - BREAKING CHANGE 16 | # -------------------------------------------------------------------------------- /dotfiles/Mac/hyper/.hyper.js: -------------------------------------------------------------------------------- 1 | // Future versions of Hyper may add additional config options, 2 | // which will not automatically be merged into this file. 3 | // See https://hyper.is#cfg for all currently supported options. 4 | 5 | module.exports = { 6 | config: { 7 | // choose either `'stable'` for receiving highly polished, 8 | // or `'canary'` for less polished but more frequent updates 9 | updateChannel: "canary", 10 | 11 | // default font size in pixels for all tabs 12 | fontSize: 16, 13 | 14 | // font family with optional fallbacks 15 | fontFamily: 16 | '"Fira Code", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', 17 | 18 | // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) 19 | cursorColor: "rgba(205, 210, 233, .8)", 20 | 21 | // `'BEAM'` for |, `'UNDERLINE'` for _, `'BLOCK'` for █ 22 | cursorShape: "BLOCK", 23 | 24 | // set to `true` (without backticks and without quotes) for blinking cursor 25 | cursorBlink: true, 26 | 27 | // color of the text 28 | foregroundColor: "#fff", 29 | 30 | // terminal background color 31 | // opacity is only supported on macOS 32 | backgroundColor: "#000", 33 | 34 | // border color (window, tabs) 35 | borderColor: "#333", 36 | 37 | // custom CSS to embed in the main window 38 | css: "", 39 | 40 | // custom CSS to embed in the terminal window 41 | termCSS: "", 42 | 43 | // set to `true` (without backticks and without quotes) if you're using a 44 | // Linux setup that doesn't show native menus 45 | // default: `false` on Linux, `true` on Windows, ignored on macOS 46 | showHamburgerMenu: "", 47 | 48 | // set to `false` (without backticks and without quotes) if you want to hide the minimize, maximize and close buttons 49 | // additionally, set to `'left'` if you want them on the left, like in Ubuntu 50 | // default: `true` (without backticks and without quotes) on Windows and Linux, ignored on macOS 51 | showWindowControls: "", 52 | 53 | // custom padding (CSS format, i.e.: `top right bottom left`) 54 | padding: "4px 12px", 55 | 56 | // the full list. if you're going to provide the full color palette, 57 | // including the 6 x 6 color cubes and the grayscale map, just provide 58 | // an array here instead of a color map object 59 | colors: { 60 | black: "#000000", 61 | red: "#ff0000", 62 | green: "#33ff00", 63 | yellow: "#ffff00", 64 | blue: "#0066ff", 65 | magenta: "#cc00ff", 66 | cyan: "#00ffff", 67 | white: "#d0d0d0", 68 | lightBlack: "#808080", 69 | lightRed: "#ff0000", 70 | lightGreen: "#33ff00", 71 | lightYellow: "#ffff00", 72 | lightBlue: "#0066ff", 73 | lightMagenta: "#cc00ff", 74 | lightCyan: "#00ffff", 75 | lightWhite: "#ffffff" 76 | }, 77 | 78 | // the shell to run when spawning a new session (i.e. /usr/local/bin/fish) 79 | // if left empty, your system's login shell will be used by default 80 | // 81 | // Windows 82 | // - Make sure to use a full path if the binary name doesn't work 83 | // - Remove `--login` in shellArgs 84 | // 85 | // Bash on Windows 86 | // - Example: `C:\\Windows\\System32\\bash.exe` 87 | // 88 | // PowerShell on Windows 89 | // - Example: `C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe` 90 | shell: "", 91 | 92 | // for setting shell arguments (i.e. for using interactive shellArgs: `['-i']`) 93 | // by default `['--login']` will be used 94 | shellArgs: ["--login"], 95 | 96 | // for environment variables 97 | env: {}, 98 | 99 | // set to `false` for no bell 100 | bell: "SOUND", 101 | 102 | // if `true` (without backticks and without quotes), selected text will automatically be copied to the clipboard 103 | copyOnSelect: false, 104 | 105 | // if `true` (without backticks and without quotes), on right click selected text will be copied or pasted if no 106 | // selection is present (`true` by default on Windows and disables the context menu feature) 107 | // quickEdit: true, 108 | 109 | // URL to custom bell 110 | // bellSoundURL: 'http://example.com/bell.mp3', 111 | 112 | // for advanced config flags please refer to https://hyper.is/#cfg 113 | 114 | // cwd 115 | hypercwd: { 116 | initialWorkingDirectory: "~/Workspace" 117 | }, 118 | // enhanced-tabs 119 | hyperTabs: { 120 | tabIcons: false, 121 | closeAlign: "right" 122 | } 123 | }, 124 | 125 | // a list of plugins to fetch and install from npm 126 | // format: [@org/]project[#version] 127 | // examples: 128 | // `hyperpower` 129 | // `@company/project` 130 | // `project#1.0.1` 131 | plugins: [ 132 | "hyper-chesterish", 133 | "hyper-statusline", 134 | "hypercwd", 135 | "hyper-tabs-enhanced", 136 | "hyper-search" 137 | ], 138 | 139 | // in development, you can create a directory under 140 | // `~/.hyper_plugins/local/` and include it here 141 | // to load it and avoid it being `npm install`ed 142 | localPlugins: [], 143 | 144 | keymaps: { 145 | // Example 146 | // 'window:devtools': 'cmd+alt+o', 147 | } 148 | }; 149 | -------------------------------------------------------------------------------- /dotfiles/Mac/hyper/.hyper_plugins/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hyper-plugins", 3 | "description": "Auto-generated from `~/.hyper.js`!", 4 | "private": true, 5 | "version": "0.0.1", 6 | "repository": "zeit/hyper", 7 | "license": "MIT", 8 | "homepage": "https://hyper.is", 9 | "dependencies": { 10 | "hyper-chesterish": "latest", 11 | "hyper-statusline": "latest", 12 | "hypercwd": "latest", 13 | "hyper-tabs-enhanced": "latest", 14 | "hyper-search": "latest" 15 | } 16 | } -------------------------------------------------------------------------------- /dotfiles/Mac/npm/.npmrc: -------------------------------------------------------------------------------- 1 | registry=http://registry.npmjs.org/ 2 | -------------------------------------------------------------------------------- /dotfiles/Mac/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################ 3 | # .setup.sh 4 | # This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles 5 | ############################ 6 | 7 | ########## Variables 8 | 9 | dir=~/dotfiles # dotfiles directory 10 | olddir=~/dotfiles_old # old dotfiles backup directory 11 | files="npmrc zshrc gitconfig" # list of files/folders to symlink in homedir 12 | 13 | ########## 14 | 15 | # create dotfiles_old in homedir 16 | echo "Creating $olddir for backup of any existing dotfiles in ~" 17 | mkdir -p $olddir 18 | echo "...done" 19 | 20 | # change to the dotfiles directory 21 | echo "Changing to the $dir directory" 22 | cd $dir 23 | echo "...done" 24 | 25 | # move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks 26 | for file in $files; do 27 | echo "Moving any existing dotfiles from ~ to $olddir" 28 | mv ~/.$file ~/dotfiles_old/ 29 | echo "Creating symlink to $file in home directory." 30 | ln -s $dir/$file ~/.$file 31 | done 32 | -------------------------------------------------------------------------------- /dotfiles/Mac/sublimetext/User/Default (OSX).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | /*============= Emacs Style =============*/ 3 | { "keys": ["ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false} }, 4 | { "keys": ["ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true} }, 5 | { "keys": ["ctrl+p"], "command": "move", "args": {"by": "lines", "forward": 6 | false} }, 7 | { "keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": 8 | true} }, 9 | { "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": false} }, 10 | { "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": false} }, 11 | { "keys": ["ctrl+l"], "command": "show_at_center" }, 12 | /*============= End Emacs Style =============*/ 13 | 14 | /*============= switch tabs =============*/ 15 | { "keys": ["ctrl+1"], "command": "select_by_index", "args": { "index": 0 } }, 16 | { "keys": ["ctrl+2"], "command": "select_by_index", "args": { "index": 1 } }, 17 | { "keys": ["ctrl+3"], "command": "select_by_index", "args": { "index": 2 } }, 18 | { "keys": ["ctrl+4"], "command": "select_by_index", "args": { "index": 3 } }, 19 | { "keys": ["ctrl+5"], "command": "select_by_index", "args": { "index": 4 } }, 20 | { "keys": ["ctrl+6"], "command": "select_by_index", "args": { "index": 5 } }, 21 | { "keys": ["ctrl+7"], "command": "select_by_index", "args": { "index": 6 } }, 22 | { "keys": ["ctrl+8"], "command": "select_by_index", "args": { "index": 7 } }, 23 | { "keys": ["ctrl+9"], "command": "select_by_index", "args": { "index": 8 } }, 24 | { "keys": ["super+shift+t"], "command": "reopen_last_file" }, 25 | /*============= End switch tabs =============*/ 26 | 27 | /*============= Modify Default key-mapping =============*/ 28 | { "keys": ["super+a"], "command": "select_all" }, 29 | { "keys": ["super+t"], "command": "new_file" }, 30 | { "keys": ["f5"], "command": "open_in_browser" }, 31 | // autocomplate 32 | { "keys": ["ctrl+/"], "command": "auto_complete" }, 33 | // paste 34 | { "keys": ["super+v"], "command": "paste_and_indent" }, 35 | { "keys": ["super+shift+v"], "command": "paste" }, 36 | // reindex 37 | { "keys": ["ctrl+i"], "command": "reindent" }, 38 | // find and goto 39 | { "keys": ["super+f"], "command": "show_panel", "args": {"panel": "find"} }, 40 | { "keys": ["super+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }, 41 | { "keys": ["super+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} }, 42 | { "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, 43 | { "keys": ["super+;"], "command": "show_overlay", "args": {"overlay": "goto", "text": "#"} }, 44 | { "keys": ["super+d"], "command": "goto_definition" }, 45 | { "keys": ["super+-"], "command": "jump_back" }, 46 | { "keys": ["super+="], "command": "jump_forward" }, 47 | // keep the shortcut as Windows 48 | { "keys": ["ctrl+d"], "command": "find_under_expand" }, 49 | { "keys": ["ctrl+g"], "command": "find_all_under" }, 50 | { "keys": ["ctrl+j"], "command": "join_lines" }, 51 | { "keys": ["ctrl+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} }, 52 | { "keys": ["ctrl+shift+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} }, 53 | /*============= End Modify Default key-mapping =============*/ 54 | 55 | /*============= Plugin =============*/ 56 | // Emmet expand 57 | {"keys": ["super+e"], "args": {"action": "expand_abbreviation"}, "command": "run_emmet_action", "context": [{"key": "emmet_action_enabled.expand_abbreviation"} ] }, 58 | // js Hint Grunt 59 | {"keys": ["super+j"], "command": "jshint"}, 60 | // markdown preview 61 | { "keys": ["super+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }, 62 | // terminal 63 | { "keys": ["ctrl+super+t"], "command": "open_terminal" }, 64 | { "keys": ["ctrl+shift+super+t"], "command": "open_terminal_project_folder" }, 65 | // Align Tab 66 | {"keys": ["super+ctrl+a"], "command": "align_tab", "args" : {"live_preview" : true} } 67 | /*============= End Plugin =============*/ 68 | ] -------------------------------------------------------------------------------- /dotfiles/Mac/sublimetext/User/Package Control.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "in_process_packages": 3 | [ 4 | ], 5 | "installed_packages": 6 | [ 7 | "AlignTab", 8 | "All Autocomplete", 9 | "AutoFileName", 10 | "BracketHighlighter", 11 | "CSScomb", 12 | "DocBlockr", 13 | "EditorConfig", 14 | "Emmet", 15 | "Git", 16 | "HTML-CSS-JS Prettify", 17 | "JSHint Gutter", 18 | "LESS", 19 | "LiveStyle", 20 | "Markdown Preview", 21 | "Modific", 22 | "MultiEditUtils", 23 | "Package Control", 24 | "SideBarEnhancements", 25 | "SublimeLinter", 26 | "SublimeLinter-contrib-eslint", 27 | "SublimeLinter-csslint", 28 | "Sublimerge Pro", 29 | "Terminal", 30 | "Theme - Phoenix" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /dotfiles/Mac/sublimetext/User/Preferences.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "caret_style": "phase", 3 | "color_scheme": "Packages/User/theme/Peacock (SL).tmTheme", 4 | "default_line_ending": "unix", 5 | "font_face": "Monaco", 6 | "font_size": 18.0, 7 | "highlight_line": true, 8 | "highlight_modified_tabs": true, 9 | "hot_exit": false, 10 | "ignored_packages": 11 | [ 12 | "Vintage" 13 | ], 14 | "original_color_scheme": "Packages/User/theme/Peacock (SL).tmTheme", 15 | "phoenix_color_green": true, 16 | "phoenix_dirty_bottom_bar_red": true, 17 | "phoenix_eighties": true, 18 | "phoenix_highlight_current_tab": true, 19 | "phoenix_sidebar_tree_large": true, 20 | "phoenix_solid_current_tab": true, 21 | "phoenix_tabs_medium": true, 22 | "rulers": 23 | [ 24 | 80, 25 | 100, 26 | 120 27 | ], 28 | "show_encoding": true, 29 | "soda_folder_icons": false, 30 | "tab_size": 4, 31 | "theme": "Phoenix Dark.sublime-theme", 32 | "translate_tabs_to_spaces": true, 33 | "word_separators": "./\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?", 34 | "word_wrap": true, 35 | "wrap_width": 0 36 | } 37 | -------------------------------------------------------------------------------- /dotfiles/Mac/sublimetext/User/Terminal.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | // The command to execute for the terminal, leave blank for the OS default 3 | // On OS X the terminal can be set to iTerm.sh to execute iTerm 4 | "terminal": "iTerm.sh", 5 | 6 | // A list of default parameters to pass to the terminal, this can be 7 | // overridden by passing the "parameters" key with a list value to the args 8 | // dict when calling the "open_terminal" or "open_terminal_project_folder" 9 | // commands 10 | "parameters": [] 11 | } -------------------------------------------------------------------------------- /dotfiles/Mac/sublimetext/User/snippet/CSS/comment.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | === 7 | 8 | source.css, source.js 9 | comment 10 | 11 | -------------------------------------------------------------------------------- /dotfiles/Mac/sublimetext/User/snippet/HTML/html5mobile.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $1 7 | 8 | 9 | $0 10 | 11 | ]]> 12 | html5 13 | text.html 14 | -------------------------------------------------------------------------------- /dotfiles/Mac/sublimetext/User/snippet/JavaScript/JavaScript/log.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | log 7 | 8 | source.js 9 | console.log 10 | 11 | -------------------------------------------------------------------------------- /dotfiles/Mac/sublimetext/User/snippet/JavaScript/jQuery/jqi.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | jqi 7 | 8 | source.js 9 | $('#') 10 | 11 | -------------------------------------------------------------------------------- /dotfiles/Mac/webStorm/.ideavimrc: -------------------------------------------------------------------------------- 1 | set clipboard=unnamed 2 | set surround 3 | set keep-english-in-normal-and-restore-in-insert 4 | 5 | nnoremap x "_x 6 | vnoremap x "_x 7 | 8 | let mapleader = " " 9 | map a :action $SelectAll 10 | -------------------------------------------------------------------------------- /dotfiles/Mac/webStorm/webstorm-settings-mac.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/dotfiles/Mac/webStorm/webstorm-settings-mac.jar -------------------------------------------------------------------------------- /dotfiles/Mac/yarn/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@aweary/alder": "^2.0.0", 4 | "anyproxy": "^4.0.10", 5 | "anywhere": "^1.4.0", 6 | "babel-eslint": "^8.2.2", 7 | "bs-platform": "^2.1.0", 8 | "commitizen": "^2.9.6", 9 | "conventional-changelog-cli": "^1.3.5", 10 | "cz-conventional-changelog": "^2.1.0", 11 | "cz-customizable": "^5.2.0", 12 | "eslint": "^4.10.0", 13 | "express": "^4.15.3", 14 | "flow-bin": "^0.75.0", 15 | "flow-typed": "^2.4.0", 16 | "gatsby-cli": "^1.1.39", 17 | "gitmoji-cli": "^1.8.1", 18 | "global": "^4.3.2", 19 | "gulp-cli": "^1.3.0", 20 | "hpm-cli": "^2.0.1", 21 | "json-server": "^0.14.0", 22 | "lerna": "^2.9.0", 23 | "macaca-cli": "^2.0.13", 24 | "npm": "^6.1.0", 25 | "nrm": "^1.0.2", 26 | "reason-cli": "https://github.com/reasonml/reason-cli/archive/3.0.4-bin-darwin.tar.gz", 27 | "release": "^3.0.3", 28 | "rename-cli": "^5.0.0", 29 | "rimraf": "^2.6.1", 30 | "semantic-release": "^11.0.2", 31 | "semver": "^5.4.1", 32 | "serve": "^9.1.0", 33 | "speed-test": "^2.0.0", 34 | "standard-version": "^4.2.0", 35 | "tslint": "^5.8.0", 36 | "typescript": "^2.6.2", 37 | "vue-cli": "^2.8.2", 38 | "whistle": "^1.10.10" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /dotfiles/Mac/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # If you come from bash you might have to change your $PATH. 2 | # export PATH=$HOME/bin:/usr/local/bin:$PATH 3 | 4 | # Path to your oh-my-zsh installation. 5 | export ZSH=$HOME/.oh-my-zsh 6 | 7 | # Set name of the theme to load. Optionally, if you set this to "random" 8 | # it'll load a random theme each time that oh-my-zsh is loaded. 9 | # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes 10 | ZSH_THEME="my-cloud-theme" 11 | 12 | # Uncomment the following line to use case-sensitive completion. 13 | # CASE_SENSITIVE="true" 14 | 15 | # Uncomment the following line to use hyphen-insensitive completion. Case 16 | # sensitive completion must be off. _ and - will be interchangeable. 17 | # HYPHEN_INSENSITIVE="true" 18 | 19 | # Uncomment the following line to disable bi-weekly auto-update checks. 20 | # DISABLE_AUTO_UPDATE="true" 21 | 22 | # Uncomment the following line to change how often to auto-update (in days). 23 | # export UPDATE_ZSH_DAYS=13 24 | 25 | # Uncomment the following line to disable colors in ls. 26 | # DISABLE_LS_COLORS="true" 27 | 28 | # Uncomment the following line to disable auto-setting terminal title. 29 | # DISABLE_AUTO_TITLE="true" 30 | 31 | # Uncomment the following line to enable command auto-correction. 32 | # ENABLE_CORRECTION="true" 33 | 34 | # Uncomment the following line to display red dots whilst waiting for completion. 35 | # COMPLETION_WAITING_DOTS="true" 36 | 37 | # Uncomment the following line if you want to disable marking untracked files 38 | # under VCS as dirty. This makes repository status check for large repositories 39 | # much, much faster. 40 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 41 | 42 | # Uncomment the following line if you want to change the command execution time 43 | # stamp shown in the history command output. 44 | # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 45 | # HIST_STAMPS="mm/dd/yyyy" 46 | 47 | # Would you like to use another custom folder than $ZSH/custom? 48 | # ZSH_CUSTOM=/path/to/new-custom-folder 49 | 50 | # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) 51 | # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ 52 | # Example format: plugins=(rails git textmate ruby lighthouse) 53 | # Add wisely, as too many plugins slow down shell startup. 54 | plugins=(git osx autojump history thefuck emoji colored-man-pages chucknorris 55 | zsh-nvm zsh-autosuggestions zsh-better-npm-completion zsh-completions zsh-syntax-highlighting) 56 | 57 | source $ZSH/oh-my-zsh.sh 58 | 59 | # User configuration 60 | 61 | # export MANPATH="/usr/local/man:$MANPATH" 62 | 63 | # You may need to manually set your language environment 64 | export LANG=en_US.UTF-8 65 | export LC_CTYPE=en_US.UTF-8 66 | export LC_ALL=en_US.UTF-8 67 | 68 | # Preferred editor for local and remote sessions 69 | # if [[ -n $SSH_CONNECTION ]]; then 70 | # export EDITOR='vim' 71 | # else 72 | # export EDITOR='mvim' 73 | # fi 74 | 75 | # Compilation flags 76 | # export ARCHFLAGS="-arch x86_64" 77 | 78 | # ssh 79 | # export SSH_KEY_PATH="~/.ssh/rsa_id" 80 | 81 | # Set personal aliases, overriding those provided by oh-my-zsh libs, 82 | # plugins, and themes. Aliases can be placed here, though oh-my-zsh 83 | # users are encouraged to define aliases within the ZSH_CUSTOM folder. 84 | # For a full list of active aliases, run `alias`. 85 | # 86 | # Example aliases 87 | # alias zshconfig="mate ~/.zshrc" 88 | # alias ohmyzsh="mate ~/.oh-my-zsh" 89 | alias cat=ccat 90 | # custom added# set https proxy 91 | # export http_proxy=http://127.0.0.1:1087 92 | # export https_proxy=http://127.0.0.1:1087 93 | 94 | export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node 95 | 96 | export PATH=$HOME/.config/yarn/global/node_modules/.bin:$PATH 97 | 98 | eval $(thefuck --alias) 99 | 100 | # cowsay 101 | chuck_cow 102 | 103 | # OPAM configuration 104 | . /Users/ali/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true 105 | -------------------------------------------------------------------------------- /dotfiles/Mac/zsh/README.md: -------------------------------------------------------------------------------- 1 | ## 自定义插件 2 | - zsh-nvm: https://github.com/lukechilds/zsh-nvm.git 3 | - zsh-autosuggestions: https://github.com/zsh-users/zsh-autosuggestions.git 4 | - zsh-better-npm-completion: https://github.com/lukechilds/zsh-better-npm-completion.git 5 | - zsh-completions: https://github.com/zsh-users/zsh-completions.git 6 | - zsh-history-substring-search: https://github.com/zsh-users/zsh-history-substring-search.git 7 | - zsh-syntax-highlighting: https://github.com/zsh-users/zsh-syntax-highlighting.git 8 | -------------------------------------------------------------------------------- /dotfiles/Mac/zsh/theme/my-cloud-theme.zsh-theme: -------------------------------------------------------------------------------- 1 | if [[ -z $ZSH_THEME_CLOUD_PREFIX ]]; then 2 | ZSH_THEME_CLOUD_PREFIX='☀' 3 | fi 4 | 5 | PROMPT='%{$fg_bold[yellow]%}$ZSH_THEME_CLOUD_PREFIX %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' 6 | 7 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" 8 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 9 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}✗%{$reset_color%}" 10 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]" 11 | -------------------------------------------------------------------------------- /dotfiles/README.md: -------------------------------------------------------------------------------- 1 | dotfiles 2 | ======== 3 | 4 | A set of configuration files. 5 | 6 | 7 | ## Why using dofiles 8 | **Backup**, **restore**, and **sync** the prefs and settings for your toolbox. Your dotfiles might be the most important files on your machine. 9 | 10 | 11 | ## Installation 12 | 13 | ```bash 14 | $ git clone https://github.com/leohxj/Arsenal.git ~/Arsenal 15 | $ cd ~/Arsenal/dotfiles/platform 16 | $ chmod +x setup.sh 17 | $ ./setup.sh 18 | ``` 19 | 20 | ### 工具 21 | - [dotbot](https://github.com/anishathalye/dotbot): A tool that bootstraps your dotfiles 22 | 23 | 24 | ## Thanks 25 | - [webpro/awesome-dotfiles](https://github.com/webpro/awesome-dotfiles) 26 | - [mathiasbynens/dotfiles](https://github.com/mathiasbynens/dotfiles) 27 | - [Dotfiles Are Meant to Be Forked](http://zachholman.com/2010/08/dotfiles-are-meant-to-be-forked/) 28 | - [nightire/dotfiles](https://github.com/nightire/dotfiles): 打造极致的开发环境 -------------------------------------------------------------------------------- /dotfiles/Windows/Bin/alias.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set USER_HOME="C:\Users\15050107" 3 | set EXPLORER_EXE="explorer.exe" 4 | set SUBLIME_EXE="D:\Program Files (x86)\Sublime Text 3\sublime_text.exe" 5 | 6 | doskey open=%EXPLORER_EXE% $* 7 | doskey st=%SUBLIME_EXE% $* 8 | doskey z=j $* 9 | doskey cnpm=npm --registry=https://registry.npm.taobao.org --cache=%USER_HOME%\.npm\.cache\cnpm --disturl=https://npm.taobao.org/dist --userconfig=%USER_HOME%\.cnpmrc $* -------------------------------------------------------------------------------- /dotfiles/Windows/ConEmu/user-profile.ps1: -------------------------------------------------------------------------------- 1 | # Use this file to run your own startup commands 2 | 3 | ## Prompt Customization 4 | <# 5 | .SYNTAX 6 | 7 | λ 8 | .EXAMPLE 9 | N:\Documents\src\cmder [master] 10 | λ | 11 | #> 12 | 13 | [ScriptBlock]$PrePrompt = { 14 | 15 | } 16 | 17 | # Replace the cmder prompt entirely with this. 18 | # [ScriptBlock]$CmderPrompt = {} 19 | 20 | [ScriptBlock]$PostPrompt = { 21 | 22 | } 23 | 24 | ## 25 | # custom alias 26 | $sublimeRoot = "D:\Program Files (x86)\Sublime Text 3\sublime_text.exe" 27 | $userHome = "C:\Users\15050107" 28 | 29 | Set-Alias z j 30 | Set-Alias open explorer 31 | Set-Alias st $sublimeRoot 32 | 33 | 34 | function cnpm { 35 | npm --registry=https://registry.npm.taobao.org --cache=$userHome\.npm\.cache\cnpm --disturl=https://npm.taobao.org/dist --userconfig=$userHome\.cnpmrc $args 36 | } 37 | 38 | function mip 39 | { 40 | param([int]$version=4) 41 | $ComputerName = '' 42 | 43 | if ($version -eq 4) 44 | { 45 | "IPV4:" 46 | [System.Net.Dns]::GetHostAddresses($ComputerName) | 47 | Where-Object { 48 | $_.AddressFamily -eq 'InterNetwork' 49 | } | 50 | Select-Object -ExpandProperty IPAddressToString 51 | } 52 | elseif ($version -eq 6) 53 | { 54 | "IPV6:" 55 | [System.Net.Dns]::GetHostAddresses($ComputerName) | 56 | Where-Object { 57 | $_.AddressFamily -eq 'InterNetworkV6' 58 | } | 59 | Select-Object -ExpandProperty IPAddressToString 60 | } 61 | else 62 | { 63 | "IP:" 64 | [System.Net.Dns]::GetHostAddresses($ComputerName).IPAddressToString 65 | } 66 | } 67 | 68 | # Import modules 69 | # Load posh-git example profile 70 | . 'C:\Users\15050107\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1' 71 | 72 | 73 | # Load Jump-Location profile 74 | Import-Module 'C:\Users\15050107\Documents\WindowsPowerShell\Modules\Jump.Location\Jump.Location.psd1' -------------------------------------------------------------------------------- /dotfiles/Windows/Intellij IDEA/settings.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/dotfiles/Windows/Intellij IDEA/settings.jar -------------------------------------------------------------------------------- /dotfiles/Windows/WebStorm/settings-0528.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/dotfiles/Windows/WebStorm/settings-0528.jar -------------------------------------------------------------------------------- /dotfiles/Windows/autoHotKey/fast-open.ahk: -------------------------------------------------------------------------------- 1 | ; Fast open application 2 | ; List custom keymap 3 | ;----------------------------- 4 | ; w: sublime 5 | ; q: zeal 6 | ; z: wizNote 7 | ;----------------------------- 8 | 9 | 10 | #w:: 11 | DetectHiddenWindows, on 12 | IfWinNotExist ahk_exe sublime_text.exe 13 | Run "D:\Program Files (x86)\Sublime Text 3\sublime_text.exe" 14 | Else 15 | IfWinNotActive ahk_exe sublime_text.exe 16 | WinActivate 17 | Else 18 | WinMinimize 19 | Return 20 | 21 | #q:: 22 | DetectHiddenWindows, on 23 | IfWinNotExist ahk_exe zeal.exe 24 | Run "D:\Program Files (x86)\Zeal\zeal.exe" 25 | Else 26 | IfWinNotActive ahk_exe zeal.exe 27 | WinActivate 28 | Else 29 | WinMinimize 30 | Return 31 | 32 | #z:: 33 | DetectHiddenWindows, on 34 | IfWinNotExist ahk_class WizNoteMainFrame 35 | Run "D:\Program Files (x86)\WizNote\Wiz.exe" 36 | Else 37 | IfWinNotActive ahk_class WizNoteMainFrame 38 | WinActivate 39 | Else 40 | WinMinimize 41 | Return -------------------------------------------------------------------------------- /dotfiles/Windows/git/at-work/.gitconfig: -------------------------------------------------------------------------------- 1 | [http "http://github.com/"] 2 | proxy = http://127.0.0.1:8123 3 | [http "https://github.com/"] 4 | proxy = http://127.0.0.1:8123 5 | [http "http://git.coding.net/"] 6 | proxy = http://10.19.110.55:8080 7 | [http "https://git.coding.net/"] 8 | proxy = https://10.19.110.55:8080 9 | [http "http://bitbucket.org/"] 10 | proxy = http://127.0.0.1:8123 11 | [http "https://bitbucket.org/"] 12 | proxy = http://127.0.0.1:8123 13 | [push] 14 | default = simple 15 | [user] 16 | name = Leo Hui 17 | email = leohxj@gmail.com 18 | [alias] 19 | st = status 20 | gi = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi" 21 | [core] 22 | autocrlf = true 23 | [url "https://"] 24 | insteadOf = git:// 25 | [http] 26 | sslVerify = false 27 | [credential] 28 | helper = manager 29 | httpProxy = http://10.19.110.55:8080 30 | -------------------------------------------------------------------------------- /dotfiles/Windows/node/npm/README.md: -------------------------------------------------------------------------------- 1 | 淘宝有 `cnpm` 包,可以使用淘宝国内的镜像,但是它所安装的包是软连接形式,不易针对项目修改。所以建议命令使用 `npm` ,镜像设置为淘宝的 `https://registry.npm.taobao.org`。 2 | 3 | # cnpm 4 | 如果希望使用 `cnpm` 命令,也建议设置一个 alias 使用, 比如: 5 | 6 | ## windows powershell 7 | ``` 8 | $userHome = "C:\Users\15050107" 9 | 10 | function cnpm { 11 | npm --registry=https://registry.npm.taobao.org --cache=$userHome\.npm\.cache\cnpm --disturl=https://npm.taobao.org/dist --userconfig=$userHome\.cnpmrc $args 12 | } 13 | ``` 14 | 15 | ## windows cmd 16 | 17 | ``` 18 | @echo off 19 | set HOME="C:\Users\15050107" 20 | 21 | doskey cnpm=npm --registry=https://registry.npm.taobao.org --cache=%HOME%\.npm\.cache\cnpm --disturl=https://npm.taobao.org/dist --userconfig=%HOME%\.cnpmrc $* 22 | ``` 23 | 24 | ## bash 25 | 26 | ``` 27 | $ echo '\n#alias for cnpm\nalias cnpm="npm --registry=https://registry.npm.taobao.org \ 28 | --cache=$HOME/.npm/.cache/cnpm \ 29 | --disturl=https://npm.taobao.org/dist \ 30 | --userconfig=$HOME/.cnpmrc"' >> ~/.zshrc && source ~/.zshrc 31 | ``` -------------------------------------------------------------------------------- /dotfiles/Windows/node/npm/at-work/.cnpmrc: -------------------------------------------------------------------------------- 1 | proxy = http://10.19.110.55:8080 2 | https_proxy = http://10.19.110.55:8080 3 | msvs_version=2013 4 | loglevel = http -------------------------------------------------------------------------------- /dotfiles/Windows/node/npm/at-work/.npmrc: -------------------------------------------------------------------------------- 1 | proxy=http://10.19.110.55:8080 2 | https_proxy=https://10.19.110.55:8080 3 | loglevel=http 4 | registry=https://registry.npm.taobao.org 5 | 6 | # some mirror 7 | phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs 8 | operadriver_cdnurl=http://npm.taobao.org/mirrors/operadriver 9 | sass_binary_site=http://npm.taobao.org/mirrors/node-sass 10 | electron_mirror=http://npm.taobao.org/mirrors/electron/ 11 | 12 | # https://github.com/cnpm/cnpmjs.org/issues/1106 13 | # chromedriver_cdnurl=https://cdn.npm.taobao.org/dist/chromedriver 14 | chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver 15 | 16 | # sometime mirror occur error, using `proxifier` proxy `node.exe` -------------------------------------------------------------------------------- /dotfiles/Windows/node/nvm/README.md: -------------------------------------------------------------------------------- 1 | nvm 配置文件路径为: `~\AppData\Roaming\nvm` ,修改 `settings.txt` 即可。 2 | 3 | 一般我们会添加镜像,以及代理地址。 -------------------------------------------------------------------------------- /dotfiles/Windows/node/nvm/settings.txt: -------------------------------------------------------------------------------- 1 | root: C:\Users\15050107\AppData\Roaming\nvm 2 | arch: 64 3 | proxy: https://10.19.110.55:8080 4 | originalpath: 5 | originalversion: 6 | node_mirror: https://npm.taobao.org/mirrors/node/ 7 | npm_mirror: https://npm.taobao.org/mirrors/npm/ -------------------------------------------------------------------------------- /dotfiles/Windows/node/yarn/.yarnrc: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | registry "https://registry.npm.taobao.org" 6 | email leohxj@gmail.com 7 | lastUpdateCheck 1483937917209 8 | username leohxj 9 | -------------------------------------------------------------------------------- /dotfiles/Windows/node/yarn/README.md: -------------------------------------------------------------------------------- 1 | Yarn, facebook 开发的包管理工具,可用来替代 npm, 它有自己的配置文件,也继承了 npm 的配置。可通过 `yarn config list` 查看。 2 | -------------------------------------------------------------------------------- /dotfiles/Windows/sublimetext/User/CSS.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": 3 | [ 4 | "scss", 5 | "less" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /dotfiles/Windows/sublimetext/User/Default (Windows).sublime-keymap: -------------------------------------------------------------------------------- 1 | [ 2 | /*============= Emacs Style =============*/ 3 | { "keys": ["ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false} }, 4 | { "keys": ["ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true} }, 5 | { "keys": ["ctrl+p"], "command": "move", "args": {"by": "lines", "forward": false} }, 6 | { "keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true} }, 7 | { "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": false} }, 8 | { "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": false} }, 9 | { "keys": ["ctrl+l"], "command": "show_at_center" }, 10 | { "keys": ["ctrl+alt+b"], "command": "move", "args": {"by": "words", "forward": false} }, 11 | { "keys": ["ctrl+alt+f"], "command": "move", "args": {"by": "word_ends", "forward": true} }, 12 | /*============= End Emacs Style =============*/ 13 | 14 | /*============= Extend ctrl+k =============*/ 15 | { "keys": ["ctrl+k", "ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} }, 16 | { "keys": ["ctrl+k", "ctrl+u"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"} }, 17 | { "keys": ["ctrl+k", "ctrl+d"], "command": "duplicate_line" }, 18 | /*============= End Extend ctrl+k =============*/ 19 | 20 | /*============= switch tabs =============*/ 21 | { "keys": ["ctrl+1"], "command": "select_by_index", "args": { "index": 0 } }, 22 | { "keys": ["ctrl+2"], "command": "select_by_index", "args": { "index": 1 } }, 23 | { "keys": ["ctrl+3"], "command": "select_by_index", "args": { "index": 2 } }, 24 | { "keys": ["ctrl+4"], "command": "select_by_index", "args": { "index": 3 } }, 25 | { "keys": ["ctrl+5"], "command": "select_by_index", "args": { "index": 4 } }, 26 | { "keys": ["ctrl+6"], "command": "select_by_index", "args": { "index": 5 } }, 27 | { "keys": ["ctrl+7"], "command": "select_by_index", "args": { "index": 6 } }, 28 | { "keys": ["ctrl+8"], "command": "select_by_index", "args": { "index": 7 } }, 29 | { "keys": ["ctrl+9"], "command": "select_by_index", "args": { "index": 8 } }, 30 | /*============= End switch tabs =============*/ 31 | 32 | /*============= Modify Default key-mapping =============*/ 33 | { "keys": ["alt+a"], "command": "select_all" }, 34 | { "keys": ["ctrl+t"], "command": "new_file" }, 35 | { "keys": ["ctrl+shift+t"], "command": "reopen_last_file" }, 36 | { "keys": ["f5"], "command": "open_in_browser" }, 37 | // autocomplate 38 | { "keys": ["alt+/"], "command": "auto_complete" }, 39 | // paste 40 | { "keys": ["ctrl+v"], "command": "paste_and_indent" }, 41 | { "keys": ["ctrl+shift+v"], "command": "paste" }, 42 | // reindex 43 | { "keys": ["ctrl+i"], "command": "reindent" }, 44 | // find and goto 45 | { "keys": ["alt+f"], "command": "show_panel", "args": {"panel": "find"} }, 46 | { "keys": ["ctrl+g"], "command": "find_all_under" }, 47 | { "keys": ["alt+p"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }, 48 | { "keys": ["alt+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} }, 49 | { "keys": ["alt+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, 50 | { "keys": ["alt+;"], "command": "show_overlay", "args": {"overlay": "goto", "text": "#"} }, 51 | { "keys": ["alt+d"], "command": "goto_definition" }, 52 | { "keys": ["alt+-"], "command": "jump_back" }, 53 | { "keys": ["alt+="], "command": "jump_forward" }, 54 | /*============= End Modify Default key-mapping =============*/ 55 | 56 | /*============= Plugin =============*/ 57 | // Emmet expand 58 | {"keys": ["alt+e"], "args": {"action": "expand_abbreviation"}, "command": "run_emmet_action", "context": [{"key": "emmet_action_enabled.expand_abbreviation"} ] }, 59 | // js Hint Grunt 60 | {"keys": ["alt+j"], "command": "jshint"}, 61 | // markdown preview 62 | { "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }, 63 | // terminal 64 | { "keys": ["ctrl+alt+t"], "command": "open_terminal" }, 65 | { "keys": ["ctrl+shift+alt+t"], "command": "open_terminal_project_folder" }, 66 | // Align Tab 67 | {"keys": ["ctrl+alt+a"], "command": "align_tab", "args" : {"live_preview" : true} } 68 | /*============= End Plugin =============*/ 69 | ] 70 | -------------------------------------------------------------------------------- /dotfiles/Windows/sublimetext/User/Package Control.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "in_process_packages": 3 | [ 4 | ], 5 | "installed_packages": 6 | [ 7 | "AlignTab", 8 | "All Autocomplete", 9 | "AutoFileName", 10 | "BracketHighlighter", 11 | "ConvertToUTF8", 12 | "CSScomb", 13 | "DocBlockr", 14 | "EditorConfig", 15 | "Emmet", 16 | "EncodingHelper", 17 | "HTML-CSS-JS Prettify", 18 | "JSHint Gutter", 19 | "Markdown Preview", 20 | "Package Control", 21 | "SideBarEnhancements", 22 | "Sublimerge Pro", 23 | "Terminal", 24 | "Theme - Phoenix" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /dotfiles/Windows/sublimetext/User/Preferences.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "caret_style": "phase", 3 | "color_scheme": "Packages/User/theme/Peacock (SL).tmTheme", 4 | "font_face": "YaHei Consolas Hybrid", 5 | "font_size": 16.0, 6 | "highlight_line": true, 7 | "hot_exit": false, 8 | "ignored_packages": 9 | [ 10 | "Vintage" 11 | ], 12 | "phoenix_color_green": true, 13 | "phoenix_dirty_bottom_bar_red": true, 14 | "phoenix_eighties": true, 15 | "phoenix_highlight_current_tab": true, 16 | "phoenix_sidebar_tree_large": true, 17 | "phoenix_solid_current_tab": true, 18 | "phoenix_tabs_medium": true, 19 | "rulers": 20 | [ 21 | 80, 22 | 100, 23 | 120 24 | ], 25 | "show_encoding": true, 26 | "soda_folder_icons": false, 27 | "tab_size": 4, 28 | "theme": "Phoenix Dark.sublime-theme", 29 | "default_line_ending": "unix", 30 | "translate_tabs_to_spaces": true, 31 | "word_wrap": true, 32 | "wrap_width": 0 33 | } 34 | -------------------------------------------------------------------------------- /dotfiles/Windows/sublimetext/User/snippet/CSS/comment.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | === 7 | 8 | source.css, source.js 9 | comment 10 | 11 | -------------------------------------------------------------------------------- /dotfiles/Windows/sublimetext/User/snippet/HTML/html5.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $1 6 | 7 | 8 | $0 9 | 10 | ]]> 11 | html5 12 | text.html 13 | -------------------------------------------------------------------------------- /dotfiles/Windows/sublimetext/User/snippet/JavaScript/JavaScript/log.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | log 7 | 8 | source.js 9 | console.log 10 | 11 | -------------------------------------------------------------------------------- /dotfiles/Windows/sublimetext/User/snippet/JavaScript/jQuery/jqi.sublime-snippet: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | jqi 7 | 8 | source.js 9 | $('#') 10 | 11 | -------------------------------------------------------------------------------- /dotfiles/Windows/webstorm-settings-windows.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/dotfiles/Windows/webstorm-settings-windows.jar -------------------------------------------------------------------------------- /dotfiles/Windows/yaheiconsolashybrid_1.2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/dotfiles/Windows/yaheiconsolashybrid_1.2.ttf -------------------------------------------------------------------------------- /emacs/.spacemacs.d/.gitignore: -------------------------------------------------------------------------------- 1 | snippets/ 2 | !/snippets/README.md 3 | -------------------------------------------------------------------------------- /emacs/.spacemacs.d/README.md: -------------------------------------------------------------------------------- 1 | 这是我的 spacemacs 配置,可将其放置在 `~/.spacemacs.d` 目录中,并且保证移除了 `~/.spacemacs` 文件。 2 | 3 | ## 目录结构 4 | - `init.el`: 配置初始化文件 5 | - `custom.el`: 维护 custom 相关 6 | - `snippets`: auto-completion 自动填充的相关片段 -------------------------------------------------------------------------------- /emacs/.spacemacs.d/custom.el: -------------------------------------------------------------------------------- 1 | ;; Do not write anything past this comment. This is where Emacs will 2 | ;; auto-generate custom variable definitions. 3 | (custom-set-variables 4 | ;; custom-set-variables was added by Custom. 5 | ;; If you edit it by hand, you could mess it up, so be careful. 6 | ;; Your init file should contain only one such instance. 7 | ;; If there is more than one, they won't work right. 8 | '(package-selected-packages 9 | (quote 10 | (ivy-purpose window-purpose imenu-list wgrep ivy-hydra counsel-projectile counsel swiper ivy yaml-mode web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode company-web web-completion-data smeargle orgit mwim mmm-mode markdown-toc markdown-mode magit-gitflow helm-gitignore helm-company helm-c-yasnippet gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link gh-md evil-magit magit magit-popup git-commit with-editor company-statistics company auto-yasnippet yasnippet ac-ispell auto-complete xterm-color shell-pop multi-term eshell-z eshell-prompt-extras esh-help org-projectile pcache org-present org org-pomodoro alert log4e gntp org-download htmlize gnuplot smex ws-butler window-numbering which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint info+ indent-guide ido-vertical-mode hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation hide-comnt help-fns+ helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed dash aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async quelpa package-build spacemacs-theme)))) 11 | (custom-set-faces 12 | ;; custom-set-faces was added by Custom. 13 | ;; If you edit it by hand, you could mess it up, so be careful. 14 | ;; Your init file should contain only one such instance. 15 | ;; If there is more than one, they won't work right. 16 | ) 17 | -------------------------------------------------------------------------------- /emacs/.spacemacs.d/layers/leohxj/README.org: -------------------------------------------------------------------------------- 1 | #+TITLE: leohxj layer 2 | 3 | # The maximum height of the logo should be 200 pixels. 4 | [[img/leohxj.png]] 5 | 6 | # TOC links should be GitHub style anchors. 7 | * Table of Contents :TOC_4_gh:noexport: 8 | - [[#description][Description]] 9 | - [[#install][Install]] 10 | - [[#key-bindings][Key bindings]] 11 | 12 | * Description 13 | This layer does wonderful things: 14 | - thing01 15 | 16 | * Install 17 | To use this configuration layer, add it to your =~/.spacemacs=. You will need to 18 | add =leohxj= to the existing =dotspacemacs-configuration-layers= list in this 19 | file. 20 | 21 | * Key bindings 22 | 23 | | Key Binding | Description | 24 | |-------------+----------------| 25 | | ~SPC x x x~ | Does thing01 | 26 | # Use GitHub URLs if you wish to link a Spacemacs documentation file or its heading. 27 | # Examples: 28 | # [[https://github.com/syl20bnr/spacemacs/blob/master/doc/VIMUSERS.org#sessions]] 29 | # [[https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Bfun/emoji/README.org][Link to Emoji layer README.org]] 30 | # If space-doc-mode is enabled, Spacemacs will open a local copy of the linked file. 31 | -------------------------------------------------------------------------------- /emacs/.spacemacs.d/layers/leohxj/keybindings.el: -------------------------------------------------------------------------------- 1 | ;;; keybindings.el --- leohxj Layer packages File for Spacemacs 2 | ;; 3 | ;; Copyright (c) 2015-2016 leohxj 4 | ;; 5 | ;; Author: leohxj 6 | ;; 7 | ;; This file is not part of GNU Emacs. 8 | ;; 9 | ;;; License: GPLv3 10 | 11 | ;; A complementary binding to the apropos-command (C-h a) 12 | (define-key 'help-command "A" 'apropos) 13 | (define-key 'help-command (kbd "C-f") 'find-function) 14 | (define-key 'help-command (kbd "C-k") 'find-function-on-key) 15 | (define-key 'help-command (kbd "C-v") 'find-variable) 16 | (define-key 'help-command (kbd "C-l") 'find-library) 17 | (define-key 'help-command (kbd "C-i") 'info-display-manual) 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /emacs/.spacemacs.d/layers/leohxj/packages.el: -------------------------------------------------------------------------------- 1 | ;;; packages.el --- leohxj layer packages file for Spacemacs. 2 | ;; 3 | ;; Copyright (c) 2012-2016 Sylvain Benner & Contributors 4 | ;; 5 | ;; Author: <15050107@CNHQ-15050107T> 6 | ;; URL: https://github.com/syl20bnr/spacemacs 7 | ;; 8 | ;; This file is not part of GNU Emacs. 9 | ;; 10 | ;;; License: GPLv3 11 | 12 | ;;; Commentary: 13 | 14 | ;; See the Spacemacs documentation and FAQs for instructions on how to implement 15 | ;; a new layer: 16 | ;; 17 | ;; SPC h SPC layers RET 18 | ;; 19 | ;; 20 | ;; Briefly, each package to be installed or configured by this layer should be 21 | ;; added to `leohxj-packages'. Then, for each package PACKAGE: 22 | ;; 23 | ;; - If PACKAGE is not referenced by any other Spacemacs layer, define a 24 | ;; function `leohxj/init-PACKAGE' to load and initialize the package. 25 | 26 | ;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so 27 | ;; define the functions `leohxj/pre-init-PACKAGE' and/or 28 | ;; `leohxj/post-init-PACKAGE' to customize the package as it is loaded. 29 | 30 | ;;; Code: 31 | 32 | (defconst leohxj-packages 33 | '() 34 | "The list of Lisp packages required by the leohxj layer. 35 | 36 | Each entry is either: 37 | 38 | 1. A symbol, which is interpreted as a package to be installed, or 39 | 40 | 2. A list of the form (PACKAGE KEYS...), where PACKAGE is the 41 | name of the package to be installed or loaded, and KEYS are 42 | any number of keyword-value-pairs. 43 | 44 | The following keys are accepted: 45 | 46 | - :excluded (t or nil): Prevent the package from being loaded 47 | if value is non-nil 48 | 49 | - :location: Specify a custom installation location. 50 | The following values are legal: 51 | 52 | - The symbol `elpa' (default) means PACKAGE will be 53 | installed using the Emacs package manager. 54 | 55 | - The symbol `local' directs Spacemacs to load the file at 56 | `./local/PACKAGE/PACKAGE.el' 57 | 58 | - A list beginning with the symbol `recipe' is a melpa 59 | recipe. See: https://github.com/milkypostman/melpa#recipe-format") 60 | 61 | 62 | ;;; packages.el ends here 63 | -------------------------------------------------------------------------------- /emacs/.spacemacs.d/snippets/README.md: -------------------------------------------------------------------------------- 1 | # Private directory for Yasnippets snippets 2 | 3 | The content of this directory is ignored by Git. This is the default place 4 | where to store your private yasnippets. 5 | 6 | This path will be loaded automatically and used whenever Yasnippets loads. 7 | -------------------------------------------------------------------------------- /emacs/README.md: -------------------------------------------------------------------------------- 1 | # Emacs: 编辑器之神 2 | 这么称呼不是没道理,玩好了绝对是可以 living-in-emacs。 3 | 4 | ## spacemacs 5 | 结合 vim 与 emacs 的配置,也是目前最火的配置,极其容易上手。 6 | 7 | ## .spacemacs.d 8 | 整理自己的 spacemacs 配置,将默认的 `~/.spacemacs` 移动到 `~/.spacemacs.d/init.el` ,然后删除,确保 spacemacs 启动不会读取 `~/.spacemacs`。方便我们将 spacemacs 配置在一个目录中维护,这一点可以参考: [zilongshanren/spacemacs-private](https://github.com/zilongshanren/spacemacs-private) -------------------------------------------------------------------------------- /front-end/eslint/.eslintrc-es5-recommand.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "browser": true 4 | }, 5 | "extends": "eslint:recommended", 6 | "globals": { 7 | // false: only read; true: both write and read 8 | "$": false 9 | }, 10 | "rules": { 11 | "indent": [ 12 | "error", 13 | 4 14 | ], 15 | // keep with .editorconfig 16 | "linebreak-style": [ 17 | "error", 18 | "windows" 19 | ], 20 | "quotes": [ 21 | "error", 22 | "double" 23 | ], 24 | "semi": [ 25 | "error", 26 | "always" 27 | ] 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /front-end/eslint/.eslintrc-es6-recommand.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "env": { 3 | "browser": true, 4 | "es6": true 5 | }, 6 | "extends": "eslint:recommended", 7 | "parserOptions": { 8 | "sourceType": "module" 9 | }, 10 | "rules": { 11 | "indent": [ 12 | "error", 13 | 4 14 | ], 15 | "linebreak-style": [ 16 | "error", 17 | "windows" 18 | ], 19 | "quotes": [ 20 | "error", 21 | "double" 22 | ], 23 | "semi": [ 24 | "error", 25 | "always" 26 | ] 27 | } 28 | }; -------------------------------------------------------------------------------- /front-end/gulp/gulp-with-es6.md: -------------------------------------------------------------------------------- 1 | ## Issue 2 | - [Support ES6](https://github.com/gulpjs/gulp/issues/830) 3 | 4 | 5 | ## Useage 6 | - [Using ES6 with gulp](https://markgoodyear.com/2015/06/using-es6-with-gulp/) 7 | - [Using ES6 with Gulp Medium](https://medium.com/@yabasha/using-es6-with-gulp-18e8dec28f7a#.4a2fjw5ya) 8 | - [使用ES6编写gulp和webpack配置文件](http://finalhome.org/JavaScript/%E4%BD%BF%E7%94%A8es6%E7%BC%96%E5%86%99gulp%E5%92%8Cwebpack%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/) 9 | 10 | ## Example 11 | - [gulpfile es6 demo](https://github.com/jedmao/gulpfile/tree/babel): Example of a working gulpfile.js. 12 | - [google/web-starter-kit](https://github.com/google/web-starter-kit) -------------------------------------------------------------------------------- /front-end/gulp/gulp插件.md: -------------------------------------------------------------------------------- 1 | ## API 2 | - [Gulp Docs](https://github.com/gulpjs/gulp/tree/master/docs) 3 | 4 | ## 基础功能模块 5 | - [gulp](https://www.npmjs.com/package/gulp): gulp总服务 6 | - [gulp-util](https://www.npmjs.com/package/gulp-util): gulp的一些功能扩展 7 | - [gulp-if](https://www.npmjs.com/package/gulp-if): 条件判断 8 | - [gulp-plumber](https://www.npmjs.com/package/gulp-plumber): 阻止文件流报错阻塞任务执行 9 | - [gulp-clean](https://www.npmjs.com/package/gulp-clean): 清空目录,可用rimraf替换 10 | - [gulp-concat](https://www.npmjs.com/package/gulp-concat): 合并文件 11 | - [del](https://www.npmjs.com/package/del): pretty much rimraf with a Promose API 12 | - [stream-combiner2](https://www.npmjs.com/package/stream-combiner2): 合并文件流 13 | - [gulp-cache](https://www.npmjs.com/package/gulp-cache): 缓存文件,比如压缩图片之前,缓存下之前的图片 14 | - [gulp-load-plugins](https://www.npmjs.com/package/gulp-load-plugins): Automatically load any gulp plugins in your package.json, 方便我们直接通过 `$` 引用插件 15 | - [run-sequence](https://www.npmjs.com/package/run-sequence): Run a series of dependent gulp tasks in order 16 | 17 | 18 | ## 预览服务 19 | - [fed-ssi](): 开启ssi加载方式 20 | - [fed-mock](): 数据模拟 21 | - [gulp-connect](): 开启静态服务器 22 | - [browser-sync](https://www.npmjs.com/package/browser-sync): Live CSS Reload & Browser Syncing 23 | - [apache-server-configs](https://www.npmjs.com/package/apache-server-configs): 设置 apache 服务器啥的 24 | 25 | ## watch 26 | gulp提供的watch方法,路径传递相对路径的话,不可监听文件新增和删除。需要使用绝对路径。 27 | 28 | - [gulp-watch](https://www.npmjs.com/package/gulp-watch) 29 | - [Gulps gulp.watch not triggered for new or deleted files](http://stackoverflow.com/questions/22391527/gulps-gulp-watch-not-triggered-for-new-or-deleted-files) 30 | - [gulp-newer](https://www.npmjs.com/package/gulp-newer): Only pass through newer source files 31 | 32 | 33 | ## 预编译处理 34 | - [gulp-header](https://www.npmjs.com/package/gulp-header): 在文件头部添加文本内容 35 | - [gulp-sourcemaps](https://www.npmjs.com/package/gulp-sourcemaps): Source map support for gulp.js 36 | 37 | ### HTML 38 | - [gulp-inline-imgurl](https://www.npmjs.com/package/gulp-inline-imgurl) 39 | - [gulp-useref](https://www.npmjs.com/package/gulp-useref): 在html中写可动态替换的标签, 注意设置 noAssets, 不然会默认拷贝 assets 目录 40 | - [gulp-usemin](https://www.npmjs.com/package/gulp-usemin): 替换html中的动态标签,和上面差不多吧 41 | 42 | ### CSS 43 | - [gulp-sass](https://www.npmjs.com/package/gulp-sass) 44 | - [gulp-autoprefixer](https://www.npmjs.com/package/gulp-autoprefixer): Prefix CSS with Autoprefixer 45 | - [sprity](): css雪碧图拼接 46 | - [sprity-sass](): 如果需要导出sass格式,需添加 47 | - [fas-css-rulversion](): 添加css里面图片的rul时间戳 48 | - [gulp-trimlines](https://www.npmjs.com/package/gulp-trimlines): 去掉行首,行尾的空白字符 49 | 50 | ### JavaScript 51 | - [gulp-tmod](https://www.npmjs.com/package/gulp-tmod): 预编译artTemplate模板 52 | 53 | ### 版本号处理 54 | - [gulp-rev-append](https://www.npmjs.com/package/gulp-rev-append):根据文件内容生成版本号。 55 | - [gulp-rev](https://www.npmjs.com/package/gulp-rev) 56 | 57 | ## 压缩处理 58 | - [gulp-htmlmin](https://www.npmjs.com/package/gulp-htmlmin): minify HTML 59 | - [gulp-clean-css](https://github.com/scniro/gulp-clean-css): Minify css with clean-css. 60 | - [gulp-cssnano](https://www.npmjs.com/package/gulp-cssnano): Minify CSS with cssnano 61 | - [gulp-imagemin](https://www.npmjs.com/package/gulp-imagemin): 图片压缩处理. 62 | - [gulp-uglify](https://www.npmjs.com/package/gulp-uglify): Minify files with UglifyJS, 但不支持直接压缩 es6 语法,需要借助 babel 先转换 63 | 64 | 65 | 66 | ## 代码规范检测 67 | - [gulp-jshint]() 68 | - [jshint-stylish]() 69 | 70 | ## 日志输出 71 | - [gulp-logwarn](https://www.npmjs.com/package/gulp-logwarn): 在终端中显示日志 72 | - [gulp-size](https://www.npmjs.com/package/gulp-size): Display the size of your project 73 | 74 | 75 | ## 性能检测 76 | - [psi](https://www.npmjs.com/package/psi): PageSpeed Insights with reporting 77 | 78 | 79 | ## sw(service worker) 80 | - [sw-precache](https://www.npmjs.com/package/sw-precache): Generates a service worker to cache your local App Shell resources. 81 | - [sw-toolbox](https://www.npmjs.com/package/sw-toolbox): Service Worker Toolbox provides some simple helpers for use in creating your own service workers. 82 | -------------------------------------------------------------------------------- /front-end/jsdoc-demo/jsdoc-demos.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * My namespace. 4 | * @namespace MyNamespace 5 | */ 6 | (function() { 7 | /** 8 | * fff 9 | * 10 | * @memberof MyNamespace 11 | * @param {string} s The skfsl 12 | */ 13 | function fff(s) { 14 | return "xx" 15 | } 16 | })(); 17 | 18 | 19 | /** 20 | * @param {string} somebody 21 | */ 22 | function sayHello(somebody) { 23 | alert('Hello ' + somebody); 24 | } 25 | 26 | var x = 10; 27 | -------------------------------------------------------------------------------- /front-end/json-server/README.md: -------------------------------------------------------------------------------- 1 | [json-server](https://github.com/typicode/json-server): 用于本地模拟数据的工具。 2 | 3 | ## 使用简介 4 | 通过 `npm i -g json-server` 安装为全局依赖的模块。后续可以命令行下使用 `json-server` 命令。 5 | 6 | 接下来,我们需要设置一个 `db.json`, 以 `json` 格式配置我们的本地数据: 7 | 8 | ``` 9 | { 10 | "posts": [ 11 | { "id": 1, "title": "json-server", "author": "typicode" } 12 | ], 13 | "comments": [ 14 | { "id": 1, "body": "some comment", "postId": 1 } 15 | ], 16 | "profile": { "name": "typicode" } 17 | } 18 | ``` 19 | 20 | 通过 `json-server --watch db.json` 启动后,本地就会开启一个 3000(默认端口),我们访问 `http://localhost:3000/posts/` 既可获取数据:`{ "id": 1, "title": "json-server", "author": "typicode" }`, 工具自身支持 CORS 和 JSONP 跨域方式。 21 | 22 | 23 | ## 请求实例 24 | 针对 MVS 项目,我们可以通过 Fiddler 将线上的请求地址隐射为本地模拟数据的服务地址,设置相应的映射规则: 25 | 26 | ``` 27 | 28 | 29 | 30 | 31 | 32 | 33 | ``` 34 | 35 | 36 | ## 同域JSON请求 37 | 数据文件, `ajax-json.json`: 38 | 39 | ``` 40 | { 41 | "cart1show": {} 42 | } 43 | ``` 44 | 45 | 运行 `json-server --watch ajax-json.json` 即可通过 `localhost:3002/cart1show` 访问本地数据。 46 | 47 | ## JSONP 48 | 数据文件, `ajax-jsonp.json`: 49 | 50 | ``` 51 | { 52 | "labs": [] 53 | } 54 | ``` 55 | 56 | 运行 `json-server --watch ajax-jsonp.json` 即可通过 `localhost:3002/labs`。 57 | 58 | 注意: 数据中不需要设置 JSONP 的回调函数名称。 59 | 60 | 61 | ### CORS 62 | 数据文件, `ajax-cors.json`: 63 | 64 | ``` 65 | { 66 | "orderList": [] 67 | } 68 | ``` 69 | 70 | 运行 `json-server --watch ajax-cors.json` 即可通过 `localhost:3002/orderList`。 71 | 72 | 73 | ## 配置简介 74 | - watch: 监听本地数据文件变化,自动更新。 75 | 76 | 我们可以维护一个 `json-server.json` 文件,来写入默认配置,比如: 77 | 78 | ``` 79 | { 80 | "port": 3002, 81 | "watch": true 82 | } 83 | ``` 84 | 85 | 86 | 87 | ## 总结 88 | 这样,我们即可在本地通过文件模拟数据了 :) 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /front-end/json-server/ajax-jsonp.json: -------------------------------------------------------------------------------- 1 | { 2 | "labs": [ 3 | { 4 | "cmmdtyCode": "000000000121347341", 5 | "supplierCode": "0000000000", 6 | "channel": "WAP222", 7 | "labelScene": "07" 8 | }, 9 | { 10 | "cmmdtyCode": "000000000121347746", 11 | "supplierCode": "0000000000", 12 | "channel": "WAP", 13 | "labelScene": "07" 14 | }, 15 | { 16 | "cmmdtyCode": "000000000121347735", 17 | "supplierCode": "0000000000", 18 | "channel": "WAP", 19 | "labelScene": "07" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /front-end/json-server/json-server.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3002, 3 | "watch": true 4 | } 5 | -------------------------------------------------------------------------------- /front-end/json-server/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 |

hello

9 | 10 | -------------------------------------------------------------------------------- /front-end/webpack/README.md: -------------------------------------------------------------------------------- 1 | webpack 使用指南 2 | 3 | 4 | 5 | ## middleware 6 | 7 | - [chimurai/http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware):  Configure proxy middleware with ease for [connect](https://github.com/senchalabs/connect), [express](https://github.com/strongloop/express), [browser-sync](https://github.com/BrowserSync/browser-sync) and [many more](https://github.com/chimurai/http-proxy-middleware#compatible-servers). 8 | - [webpack/webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware): It's a simple wrapper middleware for webpack. It serves the files emitted from webpack over a connect server.**THIS MIDDLEWARE SHOULD ONLY BE USED FOR DEVELOPMENT!** 9 | - [glenjamin/webpack-hot-middleware](https://github.com/glenjamin/webpack-hot-middleware): Webpack hot reloading using only [webpack-dev-middleware](http://webpack.github.io/docs/webpack-dev-middleware.html). This allows you to add hot reloading into an existing server without [webpack-dev-server](http://webpack.github.io/docs/webpack-dev-server.html). 10 | - [webpack/webpack-dev-server](https://github.com/webpack/webpack-dev-server): Use [webpack](http://webpack.github.io/) with a development server that provides live reloading. This should be used for **development only**. It uses [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) under the hood, which provides fast in-memory access to the webpack assets. 11 | 12 | ## other 13 | 14 | - [survivejs/webpack-merge](https://github.com/survivejs/webpack-merge): webpack-merge provides a merge function that concatenates arrays and merges objects creating a new object. 15 | - ​ -------------------------------------------------------------------------------- /front-end/webpack/loader.md: -------------------------------------------------------------------------------- 1 | [loader](http://webpack.github.io/docs/using-loaders.html) 是 webpack 对文件流处理的插件。 2 | 3 | 4 | 5 | ## file 6 | 7 | - [webpack/file-loader](https://github.com/webpack/file-loader) 8 | - [webpack/url-loader](https://github.com/webpack/url-loader) 9 | - [tcoopman/image-webpack-loader](https://github.com/tcoopman/image-webpack-loader) 10 | 11 | 12 | 13 | ## JavaScript 14 | 15 | - [babel/babel-loader](https://github.com/babel/babel-loader) 16 | - [webpack/json-loader](https://github.com/webpack/json-loader) 17 | 18 | ## css 19 | 20 | - [webpack/css-loader](https://github.com/webpack/css-loader) 21 | 22 | 23 | 24 | ## Vue 25 | 26 | - [vuejs/vue-loader](https://github.com/vuejs/vue-loader) 27 | - [vuejs/vue-html-loader](https://github.com/vuejs/vue-html-loader) 28 | - [vuejs/vue-style-loader](https://github.com/vuejs/vue-style-loader) 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /front-end/webpack/plugin.md: -------------------------------------------------------------------------------- 1 | [docs/plugins](https://webpack.github.io/docs/plugins.html): plugins 是对 loader 处理完的内容的进一步处理,比如压缩文件。Webpack 也内置了一些插件, 比如 `HotModuleReplacementPlugin`。 2 | 3 | 4 | 5 | 更多的 plugins 可以查看 [list-of-plugins](http://webpack.github.io/docs/list-of-plugins.html) 6 | 7 | 8 | 9 | ## List 10 | 11 | - [ampedandwired/html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin): simplifies creation of HTML files to serve your webpack bundles. 12 | - ​ 13 | 14 | -------------------------------------------------------------------------------- /git/README.md: -------------------------------------------------------------------------------- 1 | git相关 -------------------------------------------------------------------------------- /git/gitignore/.gitignore-tpl: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/windows,macos,node 3 | 4 | ### Windows ### 5 | # Windows image file caches 6 | Thumbs.db 7 | ehthumbs.db 8 | 9 | # Folder config file 10 | Desktop.ini 11 | 12 | # Recycle Bin used on file shares 13 | $RECYCLE.BIN/ 14 | 15 | # Windows Installer files 16 | *.cab 17 | *.msi 18 | *.msm 19 | *.msp 20 | 21 | # Windows shortcuts 22 | *.lnk 23 | 24 | 25 | ### macOS ### 26 | *.DS_Store 27 | .AppleDouble 28 | .LSOverride 29 | 30 | # Icon must end with two \r 31 | Icon 32 | 33 | 34 | # Thumbnails 35 | ._* 36 | 37 | # Files that might appear in the root of a volume 38 | .DocumentRevisions-V100 39 | .fseventsd 40 | .Spotlight-V100 41 | .TemporaryItems 42 | .Trashes 43 | .VolumeIcon.icns 44 | .com.apple.timemachine.donotpresent 45 | 46 | # Directories potentially created on remote AFP share 47 | .AppleDB 48 | .AppleDesktop 49 | Network Trash Folder 50 | Temporary Items 51 | .apdisk 52 | 53 | 54 | ### Node ### 55 | # Logs 56 | logs 57 | *.log 58 | npm-debug.log* 59 | 60 | # Runtime data 61 | pids 62 | *.pid 63 | *.seed 64 | *.pid.lock 65 | 66 | # Directory for instrumented libs generated by jscoverage/JSCover 67 | lib-cov 68 | 69 | # Coverage directory used by tools like istanbul 70 | coverage 71 | 72 | # nyc test coverage 73 | .nyc_output 74 | 75 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 76 | .grunt 77 | 78 | # node-waf configuration 79 | .lock-wscript 80 | 81 | # Compiled binary addons (http://nodejs.org/api/addons.html) 82 | build/Release 83 | 84 | # Dependency directories 85 | node_modules 86 | jspm_packages 87 | 88 | # Optional npm cache directory 89 | .npm 90 | 91 | # Optional eslint cache 92 | .eslintcache 93 | 94 | # Optional REPL history 95 | .node_repl_history 96 | -------------------------------------------------------------------------------- /git/gitignore/README.md: -------------------------------------------------------------------------------- 1 | `.gitigore`是为git指定需要忽略的文件。它是一个文本文件,里面包含忽略规则。详见: [docs/gitignore](https://git-scm.com/docs/gitignore) 2 | 3 | ## 模版文件 4 | github上有维护一个常用的gitignore模版,见: [github/gitignore](https://github.com/github/gitignore), 我们需要的时候可以去这里查询对应的模版。 5 | 6 | ## 自动生成工具 7 | 既然是模版,那就有人会工具化,这里提供两个自动生成的工具: 8 | - [gitignore.io](https://www.gitignore.io/): 既有web界面,又有命令行工具,推荐! 9 | - [joe](http://karan.goel.io/joe/): 命令行工具。 10 | 11 | 12 | ## gitignore.io 命令 13 | 在`.gitconfig`中配置: 14 | 15 | ``` 16 | [alias] 17 | st = status 18 | gi = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi" 19 | ``` 20 | 21 | 命令行中通过 `git gi` 即可使用。 -------------------------------------------------------------------------------- /git/git相关命令.md: -------------------------------------------------------------------------------- 1 | # init 2 | 初始化一个git仓库。 3 | 4 | # add 5 | 添加内容到git仓库中 6 | 7 | # commit 8 | 提交内容到本地仓库中 9 | 10 | # push 11 | 推送到远程服务器 12 | 13 | # pull 14 | 从远程服务器拉取内容 15 | 16 | # rm 17 | 删除文件或者目录,如果是非空目录,添加参数`-r` 18 | 19 | -------------------------------------------------------------------------------- /nodejs/README.md: -------------------------------------------------------------------------------- 1 | 记录node.js相关内容。 2 | -------------------------------------------------------------------------------- /nodejs/cnpm与npm镜像.md: -------------------------------------------------------------------------------- 1 | 国内的网络环境,可能会导致我们通过`npm install`安装模块时遇到网络问题。比较出名的解决方案就是 [淘宝NPM镜像](https://npm.taobao.org/), 相对于的提供一个`cnpm`命令。 2 | 3 | ## cnpm 4 | 提供2种使用方式: 5 | - cnpm模块 6 | - alias方式 7 | 8 | ### cnpm 方式 9 | 通过`npm install -g cnpm --registry=https://registry.npm.taobao.org` 来安装`cnpm`模块。 10 | 11 | **注意**:`cnpm`模块,对`node`版本有依赖,可通过 [package.json](https://github.com/cnpm/cnpm/blob/master/package.json) 查看,比如`4.3.1`版本,依赖的node需要 `"node": ">= 4.3.2"` 12 | 13 | cnpm 方式,在有些环境下存在一些问题,比如: 14 | - [用淘宝的 cnpm 遇到的一些问题](https://www.v2ex.com/t/302778#reply14) 15 | - [淘宝 NPM 镜像证书有问题?](https://www.v2ex.com/t/302554) 16 | 17 | ## alias 方式 18 | windows下,可以在系统环境变量的某个目录,比如我指定添加了一个`C:\Bin`目录,存放自己定义的一些方法,在其中添加 `cnpm.bat`, 文件内容为: 19 | 20 | ``` 21 | @echo off 22 | set HOME="C:\Users\15050107" 23 | 24 | npm --registry=https://registry.npm.taobao.org --cache=%HOME%\.npm\.cache\cnpm --disturl=https://npm.taobao.org/dist --userconfig=%HOME%\.cnpmrc %* 25 | ``` 26 | 27 | **注意**: windows下,需要设置内部环境变量`HOME`, 然后通过`%HOME%`形式获取,文件路径分隔符使用`\`。 28 | 29 | 30 | mac, linux 下,可设置: 31 | 32 | ``` 33 | alias cnpm="npm --registry=https://registry.npm.taobao.org \ 34 | --cache=$HOME/.npm/.cache/cnpm \ 35 | --disturl=https://npm.taobao.org/dist \ 36 | --userconfig=$HOME/.cnpmrc" 37 | # Or alias it in .bashrc or .zshrc 38 | $ echo '\n#alias for cnpm\nalias cnpm="npm --registry=https://registry.npm.taobao.org \ 39 | --cache=$HOME/.npm/.cache/cnpm \ 40 | --disturl=https://npm.taobao.org/dist \ 41 | --userconfig=$HOME/.cnpmrc"' >> ~/.zshrc && source ~/.zshrc 42 | ``` 43 | 44 | 这样,命令行下一样可以使用 `cnpm` 命令了。 45 | 46 | ## 镜像 47 | - [淘宝](https://npm.taobao.org/) 48 | - [中科大](https://lug.ustc.edu.cn/wiki/mirrors/help/npm) -------------------------------------------------------------------------------- /nodejs/node的安装与升级.md: -------------------------------------------------------------------------------- 1 | # 官方方式 2 | 访问 [node.js官网](https://nodejs.org/en/), 选择`Downloads`进入下载页面,选择对应的平台和版本,通常我们下载的是直接安装包,下载后直接安装,命令行即可使用`node`与`npm`了。 3 | 4 | ## 版本说明 5 | - LTS: Long Term Support 简称,长期稳定发行版本。更多信息可查看: [LTS schedule](https://github.com/nodejs/LTS#lts_schedule) 6 | - Current: 最新版本,包含许多新特性的版本。 7 | 8 | 关于node与npm版本的对应关系以及历史版本,可查看: [Previous Releases](https://nodejs.org/en/download/releases/) 9 | 10 | # 版本管理方式 11 | 官方提供的方式,安装完成后系统保留唯一的node版本,如果我们存在项目使用不用版本node的时候,或者我想要试验不同版本的时候,需要重新全局安装,相关node_modules都会被重置。极其不方法,所以我推荐大家使用基于版本管理方式的安装。 12 | 13 | ## Windows平台 14 | 推荐两个工具: 15 | - [nvm-windows](https://github.com/coreybutler/nvm-windows): A node.js version management utility for Windows. Ironically written in Go. 16 | - [hakobera/nvmw](https://github.com/hakobera/nvmw) 17 | 18 | ### nvm-windows 19 | 这是我在windows下使用的node版本管理工具。直接下载安装包,默认选项安装即可,升级也是再次安装。 20 | 21 | 需要注意的是环境变量中,确保有`NVM_HOME`和`NVM_SYMLINK`, 在这两个之前应该还有一个`C:\Program Files\nodejs;`(如果之前安装过node应该是这样,默认nvm会安装对应版本的npm,但是也会安装失败,有一个这个路径,方便npm有默认值) 22 | 23 | 原理应该是这样的: 24 | > nvm会在~/user目录下,比如我当前`~\AppData\Roaming`创建一个nvm目录,所有node版本都在这里安装。同时`~\AppData\Roaming`下也会有一个默认的npm目录,管理npm。而`C:\Program Files\nodejs`目录是一个软链接,被nvm操作,指向当前版本的node。 25 | 26 | 但是每一个npm安装的模块,都会在nvm目录下对应的node里面的node_modules里。 27 | 28 | node模块寻找的路径,应该是优先查找`C:\Program Files\nodejs`目录下,再查找`~\AppData\Roaming\npm`目录。 29 | 30 | **注意**: 系统的环境变量顺序,`C:\Program Files\nodejs` 应该在 `~\AppData\Roaming\npm` 之前,这样才能确保我们安装的npm被使用到,不然走的还是固定的`~\AppData\Roaming\npm`下版本。 31 | 32 | #### 安装注意事项 33 | 如果我们已经安装过了`node`,需要先卸载掉node,同时删除`~/User/AppData/Roaming/npm`目录。方便nvm进行npm的设置。 34 | 35 | #### nvm-windows配置 36 | 通常我们会设置三个配置: 37 | - proxy: 代理服务器,用于内网设置了网络权限的情况,或者需要翻墙的情况 38 | - node_mirror: node镜像 39 | - npm_mirror: npm镜像 40 | 41 | 注意,`v1.1.1`版本虽然提供了`nvm node_mirror` 和 `nvm npm_mirror` 命令,但是无效,还是手动修改配置文件吧。 42 | 43 | 配置文件路径为 `~/User/AppData/Roaming/nvm/settings.txt`。内容大致如下: 44 | 45 | ``` 46 | root: C:\Users\15050107\AppData\Roaming\nvm 47 | arch: 64 48 | proxy: https://10.19.110.55:8080 49 | originalpath: 50 | originalversion: 51 | node_mirror: https://npm.taobao.org/mirrors/node/ 52 | npm_mirror: https://npm.taobao.org/mirrors/npm/ 53 | ``` 54 | 55 | ## Mac平台 56 | 参考: [搭建 Node.js 开发环境](https://github.com/alsotang/node-lessons/tree/master/lesson0) 57 | 58 | 推荐几个工具: 59 | - [tj/n](https://github.com/tj/n): npm 的一个模块,但是目前还不支持 windows 平台 60 | - [OiNutter/nodenv](https://github.com/OiNutter/nodenv) 61 | - [creationix/nvm](https://github.com/creationix/nvm) 62 | 63 | 64 | # 国内镜像 65 | 由于GFW的关系,我们使用`npm`进行模块安装的时候,可能会失败。所以我们需要对应的国内镜像,比较出名和经常使用的是: 66 | - [淘宝 NPM 镜像](https://npm.taobao.org/) 67 | 68 | 69 | ## 参考 70 | - [管理 node 版本,选择 nvm 还是 n?](http://taobaofed.org/blog/2015/11/17/nvm-or-n/) -------------------------------------------------------------------------------- /nodejs/npm命令使用.md: -------------------------------------------------------------------------------- 1 | # init 2 | 初始化`package.json`文件,方便依赖管理。 3 | 4 | 对于已经存在的项目,也可以使用`npm init`, 它会自动生成项目的依赖关系,目录我使用这种方式对版本迁移的npm包进行重新安装: 5 | 6 | - 在老版本的node目录下,通过命令 `npm init` 生成 `package.json`文件。 7 | - 将生成的`package.json`放置在新版本node目录下,通过`npm install` 进行安装。 8 | 9 | 当然如果我们在Mac平台下使用`nvm`进行管理,它有提供一个命令对`node_modules`进行迁移,具体查看`nvm help`命令。 10 | 11 | # install 12 | 注意目录不要和包重名,不然在使用`npm install --save-dev xxx`的时候回报错: 13 | 14 | ``` 15 | npm ERR! Refusing to install babel-cli as a dependency of it 16 | ``` 17 | 18 | install 命令还可以简写为: `npm i xxx` 19 | 20 | ## install 参数 21 | - `--save-dev` or `-D` 22 | 23 | 24 | # outdated 25 | 查看当前仓库安装的模块是否有需要更新的。 26 | 27 | 运行结果大概是这样: 28 | 29 | ``` 30 | Package Current Wanted Latest Location 31 | cross-env 1.0.8 1.0.8 2.0.1 mvs-with-webpack 32 | css-loader 0.23.1 0.23.1 0.25.0 mvs-with-webpack 33 | file-loader 0.8.5 0.8.5 0.9.0 mvs-with-webpack 34 | grunt 0.4.5 0.4.5 1.0.1 mvs-with-webpack 35 | vue-hot-reload-api 1.3.3 1.3.3 2.0.6 mvs-with-webpack 36 | vue-loader 8.5.2 8.5.3 8.5.2 mvs-with-webpack 37 | ``` 38 | 39 | 几个字段含义为: 40 | - Package: 模块名称 41 | - Current: 当前安装版本 42 | - Wanted: 符合 `package.json` 中定义的最新版本,此版本可能比 `npmjs.com` 仓库上还新,因为模块可能没有 `npm publish` 43 | - Latest: `npmjs.com` 仓库中最新版本 44 | - Location: 模块物理位置 45 | 46 | 47 | # list 48 | 显示安装的模块,有一些参数: 49 | 50 | - `npm ls --parseable`: 以单行形式显示包 51 | - `npm ls --depth`: 默认显示`depth=1`级子目录, 可使用`npm ls --depth=0`显示安装过的包 52 | 53 | 54 | # dedupe 55 | npm在安装包的时候没有这么“智能”,不过npm dedupe命令做的事就是重新计算依赖关系,然后将包结构整理得更合理。 56 | 57 | # root 58 | 查看npm安装的路径, `npm root -g`常用。 59 | 60 | # rm 61 | 删除模块,比如 `npm rm --global gulp` 62 | 63 | 64 | # publish 65 | - [kanpai](https://github.com/egoist/kanpai): Kanpai is a better way to publish a new version of your node module! 66 | 67 | # 参考 68 | - [玩转npm](http://www.alloyteam.com/2016/03/master-npm/) 69 | - [npm 模块安装机制简介](http://www.ruanyifeng.com/blog/2016/01/npm-install.html) 70 | - [Do not sudo npm](http://givan.se/do-not-sudo-npm/) 71 | - [[译] 让人倾倒的 11 个 Npm Trick](http://www.wemlion.com/2016/eleven-npm-tricks-that-will-knock-your-wombat-socks-off/) -------------------------------------------------------------------------------- /nodejs/npm安装与升级.md: -------------------------------------------------------------------------------- 1 | npm, node package manager, node模块管理工具。文档参见: [npm documentation](https://docs.npmjs.com/) 2 | 3 | # npm更新方式 4 | 安装node的时候,默认会安装一个npm版本。由于npm版本的更新频率一般大于node,所以建议我们再自行安装一下npm, 通过命令 `npm install -g npm`,获取最新版本。 5 | 6 | # 版本管理更新方式 7 | ## windows平台 8 | - [npm版本管理工具](https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows): Upgrading on Windows 9 | 10 | > > By default, npm is installed alongside node in C:\Program Files (x86)\nodejs. npm's globally installed packages (including, potentially, npm itself) are stored separately in a user-specific directory (which is currently C:\Users\\AppData\Roaming\npm). Because the installer puts C:\Program Files (x86)\nodejs before C:\Users\\AppData\Roaming\npm on your PATH, it will always use version of npm installed with node instead of the version of npm you installed using npm -g install npm@. 11 | 12 | 13 | # 手动更新方式 14 | 其实npm也是一个包,存放在`node_module`下,所以我们要替换,可直接替换对应的npm目录,文件从github上拉取就行: [npm/releases](https://github.com/npm/npm/releases) 15 | 16 | > You can download a zip file , and unpack it in the `node_modules\npm\` folder inside node's installation folder. 17 | 18 | 比如我新建一个目录结构: 19 | 20 | ``` 21 | -- node_modules 22 | ---- npm 23 | -- npm 24 | -- npm.cmd 25 | ``` 26 | 27 | 执行`npm`,默认会从当前目录的`node_modules`查找包,然后执行。 28 | 29 | # 参考 30 | - [github: npm/npm](https://github.com/npm/npm) 31 | - [node,npm版本](https://nodejs.org/en/download/releases/) 32 | - [玩转npm](https://github.com/icepy/_posts/issues/36) -------------------------------------------------------------------------------- /nodejs/npm推荐模块.md: -------------------------------------------------------------------------------- 1 | 列出一些使用或者别人推荐过的模块。所以模块,可以在 [npm官网](https://www.npmjs.com/)查询。或第三方网站: [npm search](http://npmsearch.com/)查询。 2 | 3 | 4 | ## 命令工具 5 | - [npm](https://www.npmjs.com/package/npm): npm命令 6 | - [cnpm](https://www.npmjs.com/package/cnpm): 淘宝镜像对应的命令行,除了无法publish,支持其他所以npm命令 7 | - [npm-check](https://www.npmjs.com/package/npm-check): 检测npm包是否需要更新 8 | - [auto-install](https://www.npmjs.com/package/auto-install): 监听文件中的模块引用,自动下载对应模块 9 | - [rimraf](https://www.npmjs.com/package/rimraf): 提供类似`rm -rf`命令 10 | - [tree-cli](https://www.npmjs.com/package/tree-cli): 树形显示工具 11 | - [generate/generate](https://github.com/generate/generate/): 命令行下生成文件的工具 12 | - [yargs](https://www.npmjs.com/package/yargs): 处理命令行输入的参数,转换为hash对象 13 | - [install-peerdeps](https://github.com/nathanhleung/install-peerdeps): 解决 npm 3.x 后,不自动安装 peerdeps 问题。 14 | 15 | 16 | ## 组件工具 17 | - [grunt-cli](https://www.npmjs.com/package/grunt-cli): grunt命令行 18 | - [gulp-cli](https://www.npmjs.com/package/gulp-cli): gulp命令行 19 | - [vue-cli](https://www.npmjs.com/package/vue-cli): vue命令行脚手架 20 | - [tmodjs](https://www.npmjs.com/package/tmodjs): artTemplate模板预编译工具 21 | - [node-sass](https://github.com/sass/node-sass/releases): sass解释器 22 | 23 | ## es6 24 | - [es-checker](https://www.npmjs.com/package/es-checker): 检测node和浏览器对ECMAScript的支持程度 25 | 26 | ## 静态服务器 27 | - [http-server](https://www.npmjs.com/package/http-server): 等价于`python -m SimpleHTTPServer` 28 | - [live-server](https://www.npmjs.com/package/live-server): 可自动刷新的静态服务器 29 | 30 | ## proxy 31 | - [chimurai/http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware): The one-liner node.js http-proxy middleware for connect, express and browser-sync 32 | 33 | ## 数据库 34 | - [Sequelize](https://github.com/sequelize/sequelize) 35 | 36 | 37 | ## http/ajax 38 | - [visionmedia/superagent](https://github.com/visionmedia/superagent) 39 | - [request/request](https://github.com/request/request): Simplified HTTP request client. 40 | - [axios](https://www.npmjs.com/package/axios): Promise based HTTP client for the browser and node.js 41 | - [github/fetch](https://github.com/github/fetch): A window.fetch JavaScript polyfill. 42 | 43 | 44 | ## 其他资料 45 | - [40 个你绝对离不开的 NPM 库](http://gold.xitu.io/entry/55ea6583ddb2e44a0462cc87) -------------------------------------------------------------------------------- /nodejs/npm配置.md: -------------------------------------------------------------------------------- 1 | ## 查看配置 2 | `npm config get xxx`命令,查看`xxx`具体配置。 3 | 4 | ## 设置代理 5 | ``` 6 | npm config set proxy http://proxy.company.com:8080 7 | npm config set https-proxy http://proxy.company.com:8080 8 | ``` 9 | 10 | 一个没搞定的点,为什么https-proxy设置的服务器是http而不是https的。 11 | 12 | ## 显示日志 13 | `npm install`安装时候,显示信息的话,可通过`npm install --loglevel http xxx`形式 14 | 15 | 或者在`.npmrc`中添加: 16 | 17 | ``` 18 | logLevel = http 19 | ``` 20 | 21 | ## 解决npm访问慢的问题 22 | - [cnpm](https://npm.taobao.org/) 23 | - [smart-npm](https://github.com/qiu8310/smart-npm/) -------------------------------------------------------------------------------- /nodejs/packagejson配置讲解.md: -------------------------------------------------------------------------------- 1 | ## 版本号设置 2 | 这是 `package.json` 中最主要的设置,指定我们依赖模块的版本。它需要能被 [node-semver](https://github.com/npm/node-semver) 解析。它是符合 [语义化版本](http://semver.org/lang/zh-CN/) 的。常见的几种写法有: 3 | 4 | - **comparator**: 比较符号, 符号为 `<`, `<=`, `=`, `>`, `>=` 5 | - **Hyphen Ranges**: 区间范围,符号为 `-`, 比如: 6 | - `1.2.3 - 2.3.4 := >=1.2.3 <=2.3.4` 7 | - **X-Ranges**: 整体范围, 符号为 `x,X,*`, 比如: 8 | - `* := >=0.0.0` 9 | - `1.x := >=1.0.0 <2.0.0` 10 | - `1.2.x := >=1.2.0 <1.3.0` 11 | - `"" (empty string) := * := >=0.0.0` 12 | - `1 := 1.x.x := >=1.0.0 <2.0.0` 13 | - `1.2 := 1.2.x := >=1.2.0 <1.3.0` 14 | - **Tilde Ranges**: 版本范围,符号为 `~`, 比如: 15 | - `~1.2.3 := >=1.2.3 <1.(2+1).0 := >=1.2.3 <1.3.0` 16 | - `~1.2 := >=1.2.0 <1.(2+1).0 := >=1.2.0 <1.3.0 (Same as 1.2.x)` 17 | - `~1 := >=1.0.0 <(1+1).0.0 := >=1.0.0 <2.0.0 (Same as 1.x)` 18 | - `~0.2.3 := >=0.2.3 <0.(2+1).0 := >=0.2.3 <0.3.0` 19 | - `~0.2 := >=0.2.0 <0.(2+1).0 := >=0.2.0 <0.3.0 (Same as 0.2.x)` 20 | - `~0 := >=0.0.0 <(0+1).0.0 := >=0.0.0 <1.0.0 (Same as 0.x)` 21 | - `~1.2.3-beta.2 := >=1.2.3-beta.2 <1.3.0` 22 | - **Caret Ranges**: 最低范围,符号为 `^`, 比如: 23 | - `^1.2.3 := >=1.2.3 <2.0.0` 24 | - `^0.2.3 := >=0.2.3 <0.3.0` 25 | - `^0.0.3 := >=0.0.3 <0.0.4` 26 | - `^1.2.x := >=1.2.0 <2.0.0` 27 | - `^0.0.x := >=0.0.0 <0.1.0` 28 | - `^0.0 := >=0.0.0 <0.1.0` 29 | - `^1.x := >=1.0.0 <2.0.0` 30 | - `^0.x := >=0.0.0 <1.0.0` 31 | 32 | 33 | # dependencies区别 34 | ## dependencies 35 | 依赖关系,组件所需要的, 使用`npm install --save` 或 `npm i -S` 36 | 37 | ## devDependencies 38 | 使用`npm install --save-dev` 或者 `npm i -D`, 开发过程所需要的,外部使用者不用关心的组件。比如单元测试,预编译处理 39 | 40 | ## 参考 41 | - [What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?](http://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies) 42 | - [npm: dependencies and devDependencies](http://zhiye.li/2014-06-23-npm-dependencies-and-devDependencies.html) 43 | 44 | 45 | ## 参考 46 | - [JSON.is](http://json.is/): 详细解释package.json每条信息 -------------------------------------------------------------------------------- /nodejs/windows下难安装的包.md: -------------------------------------------------------------------------------- 1 | # node-gyp 2 | ## 概述 3 | node-gyp在windows下编译程序需要c++ build, 所以建议安装vs。 4 | 5 | **2016-11-20 更新**: 现在可以通过 `npm install --global --production windows-build-tools` 安装所依赖的windows 工具。原来手动配置的方式还是如下: 6 | 7 | 8 | ## 解决方案 9 | npmrc中插入一句: 这句是为了啥,我也不知道! 10 | ``` 11 | msvs_version=2013 12 | or 13 | GYP_MSVS_VERSION=2013 14 | ``` 15 | 16 | ## Windows安装 17 | 18 | ``` 19 | * On Windows: 20 | * Python ([`v2.7.10`][python-v2.7.10] recommended, `v3.x.x` is __*not*__ supported) 21 | * Make sure that you have a PYTHON environment variable, and it is set to drive:\path\to\python.exe not to a folder 22 | * Windows XP/Vista/7: 23 | * Microsoft Visual Studio C++ 2013 ([Express][msvc2013] version works well) 24 | * If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first 25 | * If you get errors that the 64-bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1] 26 | * Windows 7/8: 27 | * Microsoft Visual Studio C++ 2013 for Windows Desktop ([Express][msvc2013] version works well) 28 | * Windows 10: 29 | * Install the latest version of npm (3.3.6 at the time of writing) 30 | * Install Python 2.7 from https://www.python.org/download/releases/2.7/ and make sure its on the System Path 31 | * Install Visual Studio Community 2015 Edition. (Custom Install, Select Visual C++ during the installation) 32 | * Set the environment variable GYP_MSVS_VERSION=2015 33 | * Run the command prompt as Administrator 34 | * $ npm install (--msvs_version=2015) <-- Shouldn't be needed if you have set GYP_MSVS_VERSION env 35 | * If the above steps have not worked or you are unsure please visit http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64 for a full walkthrough 36 | * All Windows Versions 37 | * For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk] 38 | * You may need to run one of the following commands if your build complains about WindowsSDKDir not being set, and you are sure you have already installed the SDK: 39 | ``` 40 | 41 | 安装VS2013之后,配置好环境变量,清空一下:`C:\Users\15050107\.node-gyp`目录下东西。 42 | 43 | ## 参考资料 44 | - [node-gyp](https://github.com/nodejs/node-gyp) 45 | - [node-gyp build error windows x64](http://stackoverflow.com/questions/21562038/node-gyp-build-error-windows-x64) 46 | 47 | ## node-sass 48 | 淘宝将node-sass也镜像了,可以参考: [node-sass淘宝镜像](https://npm.taobao.org/mirrors), 使用的时候,可能要确保npm或cnpm连接上代理。 49 | 50 | 或者,手动安装, [node-sass 安装失败解决方案](https://github.com/luqin/blog/issues/9),或见附件图片。 51 | 52 | # phantomjs 53 | 安装这个,会从 github 上下载一个zip包。 这个可能由于网络问题导致失败。 54 | 55 | 解决方案: 56 | - 使用淘宝镜像, [phantomjs](https://npm.taobao.org/mirrors/phantomjs) 57 | - 手动下载对应的`zip`包,放置在 ` ~\AppData\Local\Temp\phantomjs`目录下,再次安装 58 | 59 | 60 | 61 | # imagemin 62 | - [imagemin](https://github.com/imagemin) 63 | 64 | ## imagemin/optipng-bin 65 | - [imagemin/optipng-bin](https://github.com/imagemin/optipng-bin) 66 | 67 | 68 | ## imagemin-pngquant 69 | 70 | 71 | # https://www.npmjs.com/package/chromedriver 72 | 可设置 mirror 但是仍然会安装失败。可通过 `Proxifier` 设置 `node.exe` 走一个外网代理。。 73 | -------------------------------------------------------------------------------- /nodejs/yarn/README.md: -------------------------------------------------------------------------------- 1 | 使用 Yarn 管理 npm global node_module。 2 | 3 | ## windows 4 | ### 安装 5 | 方便我们维护模块与迁移。windows 下全局安装方法为 `yarn global add xxx`, 目前 `0.17.10` 版本会在 `node` 目录下,生成 `sh,cmd,cmd.cmd` 三个文件,需要删除 cmd 文件,重命名cmd.cmd 为 cmd。。。这是个 bug. 6 | 7 | `~/AppData/Local/Yarn/config/global`下生成: 8 | - `package.json` 9 | - `yarn.lock` 10 | 11 | ### 查看 12 | `yarn global ls` 13 | -------------------------------------------------------------------------------- /nodejs/yarn/global-6.9.2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "doctoc": "^1.2.0", 4 | "eslint": "^3.12.2", 5 | "grunt-cli": "^1.2.0", 6 | "gulp-cli": "^1.2.2", 7 | "hexo-cli": "^1.0.2", 8 | "install-peerdeps": "^1.1.2", 9 | "js-beautify": "^1.6.4", 10 | "jsdoc": "^3.4.3", 11 | "json-server": "^0.9.4", 12 | "live-server": "^1.1.0", 13 | "newman": "^3.3.1", 14 | "npm": "^4.0.5", 15 | "postcss-cli": "^2.6.0", 16 | "ppt-cli": "^1.2.14", 17 | "rimraf": "^2.5.4", 18 | "tern": "^0.20.0", 19 | "tree-cli": "^0.4.9", 20 | "vue-cli": "^2.5.1", 21 | "whistle": "^1.2.6" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /nodejs/包管理工具-yarn.md: -------------------------------------------------------------------------------- 1 | - [Facebook: Yarn](https://yarnpkg.com/): Facebook 出品的包管理工具。 2 | - [Yarn Docs](https://yarnpkg.com/en/docs/): 文档以及教程,yarn config 也继承了 npm 的配置。 3 | - [Yarn vs npm:你需要知道的一切](https://zhuanlan.zhihu.com/p/23493436) 4 | - [Yarn demo](https://github.com/yarnpkg/example-yarn-package) 5 | -------------------------------------------------------------------------------- /nodejs/模块的使用.md: -------------------------------------------------------------------------------- 1 | # 全局模块 2 | 全局模块,在系统环境变量中,可以命令行中直接使用。 3 | 4 | # 局部模块 5 | `npm i xxx` 安装到项目中的模块,在项目代码中可以通过: `require('xxx')`引用。 6 | 7 | 在项目目录下,可以通过 `./node_modules/.bin/xxx` 调用。或者在`package.json` 中使用 `npm script`配置,比如: 8 | 9 | ``` 10 | "scripts": { 11 | "test": "grunt test", 12 | "start": "grunt serve" 13 | } 14 | ``` 15 | 16 | 运行 `npm start` 即可运行 `grunt serve`。 -------------------------------------------------------------------------------- /proxy/README.md: -------------------------------------------------------------------------------- 1 | 嘘~~! 2 | 3 | -------------------------------------------------------------------------------- /proxy/SwitchyOmega/README.md: -------------------------------------------------------------------------------- 1 | [SwitchyOmega](https://github.com/FelisCatus/SwitchyOmega): Chrome的一个扩展插件,提供代理管理和切换功能。 2 | 3 | # Install 4 | - [Chrome Web Store](https://chrome.google.com/webstore/detail/proxy-switchyomega/padekgcemlokbadohgkifijomclgjgif): 需要能正常访问google的网络环境下 5 | - [Release](https://github.com/FelisCatus/SwitchyOmega/releases): crx安装包,安装说明页面有 6 | 7 | # New profile 8 | chrome右上角单击插件`SwitchyOmega -> Options` 进入插件选项页面。 右侧选择 `New profile...`, 可添加一个新的profile。通常我们选择`Proxy Profile`,配置对应的代理服务器。 9 | 10 | 这样,我们在`SwitchyOmega`上就可以选择对应的`Proxy Profile`了,所访问的页面就走我们对应设置的代理。 11 | 12 | ## Proxy servers 13 | 这个选项中填写我们对应的代理服务器,比如我们本地开启了 `shadowsocks`, 端口为`1080`,我们可以选择 `default socks5 127.0.0.1 1080`。 14 | 15 | ## Bypass List 16 | 过滤列表,指定哪些不走代理,我们可以这样填写: 17 | 18 | ``` 19 | 20 | 10.* 21 | 127.* 22 | *.suning.com 23 | *.cnsuning.com 24 | localhost 25 | *.local 26 | *.suning.cn 27 | ``` 28 | 29 | # Auto Switch 30 | 在`New Profiles...`中,我们还可以添加一个 `Switch Profile`, 用来根据不同的规则,选择不同的代理服务器。 31 | 32 | ## Switch rules 33 | 这里配置规则列表,指定符合规则的,走哪些`Proxy Profile`,注意其中两个配置: 34 | - `Rule list rules`: 符合下面 `Rule List Config`配置的规则走的代理 35 | - `Default`: 其他情况,默认的代理规则 36 | 37 | ### Edit source code 38 | 规则列表可以使用文本编辑,点击`Edit source code` 即可编辑,方便我们批量添加和排序。 39 | 40 | ## Rule List Config 41 | 选择`AutoProxy`, `Rule List URL` 填写 `https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt`。 42 | 43 | ## Rule List Text 44 | 根据上面配置的`Rule List URL`生成的文件内容展示。 45 | 46 | # 备份 47 | `Import/Export -> Make backup`, 会在本地生成一个`.bak`文件,用于下次恢复使用。 48 | 49 | # 恢复 50 | `Import/Export -> Restore from file`, 选择对应的`.bak`文件,恢复相关设置。 -------------------------------------------------------------------------------- /proxy/SwitchyOmega/SwitchyOmega.crx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leohxj/Arsenal/0056ed02d6415a3d4e744584d263a67a3c2ac321/proxy/SwitchyOmega/SwitchyOmega.crx -------------------------------------------------------------------------------- /proxy/pac/README.md: -------------------------------------------------------------------------------- 1 | - [这可能是唯一一个支持 Socks5 的 PAC 服务,一路走来终于和大家见面。](https://www.v2ex.com/t/300973#reply105) 2 | - [haad/proxychains](https://github.com/haad/proxychains): proxychains - a tool that forces any TCP connection made by any given application to follow through proxy like TOR or any other SOCKS4, SOCKS5 or HTTP(S) proxy. Supported auth-types: "user/pass" for SOCKS4/5, "basic" for HTTP. http://proxychains.sourceforge.net/ -------------------------------------------------------------------------------- /proxy/proxifier/README.md: -------------------------------------------------------------------------------- 1 | ## 安装 2 | 下载可执行的安装包,直接双击安装即可。我将软件安装到了`D:\Program Files(x86)\Proxifier`目录中。 3 | 4 | 另外,官方提供了一个免安装版本,使用应该和其他绿色软件一样,解压缩即可。 5 | 6 | ## 激活 7 | 激活码见`key.md`文件,相同大版本,激活一次,后续不需要再激活。放心更新。 8 | 9 | 10 | 11 | ## 配置文件 12 | 文件存在`~/AppData\Roaming\Proxifier\Profiles`目录下。 13 | 14 | ## 使用方式 15 | ### 添加代理服务器 16 | 内网环境下,添加可访问外网的服务器地址,通过 `Profile -> Proxy Servers`菜单添加,添加完成,可以点击右侧的`check..`进行连通性测试。 17 | 18 | ### 设置代理规则 19 | 通过 `Profile -> Proxification Rules`菜单添加, 规则优先级从上到下。 20 | 21 | 同一个规则内,包含三个选项: 22 | - Applications: 捕获的应用名称,比如 `shadowsocks.exe` 23 | - Target Hosts: 符合的域名规则 24 | - Target Ports: 符合的端口号 25 | 26 | 注意,这三个是相互的关系,比如配置了`shadowsocks.exe`,又配置了`*.baidu.com`,那么只有通过`shadowsocks.exe`访问`*.baidu.com`的才符合这条规则。 27 | 28 | 所以,我们需要需要针对域名设置,请单独建立一条规则。 29 | 30 | 31 | 32 | ## Tips 33 | - 命令行下的一些命令,不是走的`cmd.exe`, 比如`node`,实际走的是`node.exe`,所以我们需要添加 `node.exe`到规则之中。 34 | - 代理规则,一般前面先设置内网相关的,讲它们直接走`direct`(系统代理); 最后的`Default`默认也设置为`Direct`, 方便放行其他,中间的配置,根据我们的实际情况自行添加。 35 | - `node.exe`, `git*.exe`, 这些工具,配置文件里可以设置代理服务器的,我们直接在配置文件中设置即可,不需要添加额外的规则 36 | 37 | -------------------------------------------------------------------------------- /proxy/proxifier/key.md: -------------------------------------------------------------------------------- 1 | ## v3.2.9 2 | 3 | ``` 4 | 5EZ8G-C3WL5-B56YG-SCXM9-6QZAP 5 | G3ZC7-7YGPY-FZD3A-FMNF9-ENTJB 6 | YTZGN-FYT53-J253L-ZQZS4-YLBN9 7 | 8 | # For Portable Version 9 | 2TCKX-TYQHL-NFN33-3YEDY-QW65D 10 | ``` 11 | 12 | - [Proxifier 3.29 Serial Key Standard & Portable](http://www.softkis.com/proxifier-serial-key) 13 | 14 | ## 其他 15 | ### 注册码 16 | 17 | 生成的注册码,注册用户名可自定义! 18 | 19 | MBZKT-ZWTSL-M8X24-3AN7T-NRWU6 20 | 21 | JBZEM-M2HY9-C3SW3-6SKQC-MVNXN 22 | 23 | Q7ZB5-A35HX-8GWYW-T47T4-9FNVX 24 | 25 | 55ZE3-SWXN2-CMM2N-22MQQ-NLB95 26 | 27 | JCZBX-A3N3F-9DWY5-327V5-DKUXX 28 | 29 | LPZLA-FW4R4-NV52E-Q9RYW-PH3ZY 30 | 31 | 32 | For Mac 33 | 2TCKX-TYQHL-NFN33-3YEDY-QW65D -------------------------------------------------------------------------------- /proxy/proxifier/profile/Default.ppx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | %ComputerName%; localhost; *.local 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Localhost 23 | localhost; 127.0.0.1; %ComputerName% 24 | 25 | 26 | 27 | Default 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /proxy/proxifier/profile/SuningOfficeDefault.ppx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | %ComputerName%; localhost; *.local 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
10.19.110.31
21 | 8080 22 | 48 23 |
24 | 25 |
127.0.0.1
26 | 8123 27 | 48 28 |
29 | 30 |
10.19.110.31
31 | 8080 32 | 48 33 |
34 | 35 |
127.0.0.1
36 | 1080 37 | 48 38 |
39 | 40 |
10.19.110.32
41 | 8080 42 | 48 43 |
44 | 45 |
10.19.110.32
46 | 8080 47 | 48 48 |
49 |
50 | 51 | 52 | 53 | 苏宁内网 54 | 192.*;127.*;10.*;*.cnsuning.com;localhost; 55 | 56 | 57 | 58 | ss 59 | shadowsocks.exe 60 | 101 61 | 62 | 63 | Default 64 | 65 | 66 | 67 |
-------------------------------------------------------------------------------- /proxy/proxifier/profile/atSuningOffice.ppx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | %ComputerName%; localhost; *.local 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
10.19.110.31
21 | 8080 22 | 48 23 |
24 | 25 |
127.0.0.1
26 | 1080 27 | 48 28 |
29 | 30 |
10.19.110.31
31 | 8080 32 | 48 33 |
34 | 35 |
127.0.0.1
36 | 1080 37 | 48 38 |
39 | 40 |
10.19.110.32
41 | 8080 42 | 48 43 |
44 | 45 |
10.19.110.32
46 | 8080 47 | 48 48 |
49 | 50 |
127.0.0.1
51 | 1088 52 | 48 53 |
54 | 55 |
127.0.0.1
56 | 8888 57 | 48 58 |
59 | 60 |
10.19.110.55
61 | 8080 62 | 48 63 |
64 | 65 |
10.19.110.55
66 | 8080 67 | 48 68 |
69 | 70 |
127.0.0.1
71 | 8887 72 | 48 73 |
74 |
75 | 76 | 77 | 78 | Charles 79 | charles.exe; fiddler.exe 80 | 81 | 82 | 83 | 苏宁内网 84 | 192.*;127.*;10.*;*.cnsuning.com;localhost;localhost*; 85 | 86 | 87 | 88 | ss-qt5 89 | ss-qt5.exe 90 | 114 91 | 92 | 93 | ss 94 | shadowsocks.exe 95 | 114 96 | 97 | 98 | emacs 99 | *emacs*.exe 100 | 114 101 | 102 | 103 | MI-内网模式 104 | mi*.exe 105 | 111 106 | 107 | 108 | weixin 109 | wechat.exe 110 | 111 111 | 112 | 113 | 外网 114 | eudic.exe;XMusic.exe 115 | 113 116 | 117 | 118 | 需要翻墙的软件 119 | googleupdate.exe;svchost.exe;GoogleUpdate.exe;anki.exe 120 | 105 121 | 122 | 123 | Dropbox 124 | dropbox.exe;dropbox*.exe; 125 | *.dropbox.com 126 | 105 127 | 128 | 129 | VirtualBox 130 | virtualbox.exe;VBox*.exe; 131 | 113 132 | 133 | 134 | 80 135 | 80 136 | 105 137 | 138 | 139 | 443 140 | 443 141 | 105 142 | 143 | 144 | 其余走翻墙的 145 | 105 146 | 147 | 148 | cmd 149 | python.exe;curl.exe 150 | 105 151 | 152 | 153 | domain 154 | 192.30.253.117 155 | 105 156 | 157 | 158 | node 159 | node.exe 160 | 105 161 | 162 | 163 | 网盘 164 | 360wangpan.exe; baidunetdisk.exe 165 | 105 166 | 167 | 168 | Default 169 | 105 170 | 171 | 172 |
-------------------------------------------------------------------------------- /proxy/shadowsocks/README.md: -------------------------------------------------------------------------------- 1 | # 客户端推荐 2 | - [shadowsocks-windows](https://github.com/shadowsocks/shadowsocks-windows/releases) 3 | - [shadowsocks-qt5](https://github.com/shadowsocks/shadowsocks-qt5/releases) 4 | - [Surge for Mac](http://nssurge.com/) 5 | 6 | 7 | # 工具 8 | - [针对于中国大陆地区的 IP 列表](https://github.com/17mon/china_ip_list) 9 | - [gfwlist/gfwlist](https://github.com/gfwlist/gfwlist): SwitchOmega插件使用的规则 10 | - [GenPAC](https://github.com/JinnLynn/GenPAC): pac文件生成器,可转换gfwlist 11 | - [gfwlist转换成PAC文件](http://codelife.me/blog/2013/04/06/convert-gfwlist-to-pac/) 12 | - [](https://github.com/breakwa11/gfw_whitelist): pac白名单 -------------------------------------------------------------------------------- /recommend-software/README.md: -------------------------------------------------------------------------------- 1 | 推荐一些使用过的软件。Windows/Mac/linux 不区分平台归纳了,安装类别展示,一通百通。 2 | 3 | 4 | ## 软件筛选 5 | - [AlternativeTo](http://alternativeto.net/): 软件对比,方便我们搜寻相关类型的软件 6 | - [Phodal's Toolbox](https://github.com/phodal/toolbox) 7 | 8 | - [sharewareonsale](http://sharewareonsale.com/shop) 9 | - [msdn下载](http://msdn.itellyou.cn/) 10 | - [Windows 下有什么软件能够极大地提高工作效率?](http://www.zhihu.com/question/22919326) 11 | - [2014 年 Windows 平台软件推荐:这些工具都很有用](http://daily.zhihu.com/story/3705059) 12 | - [alternativeto](http://alternativeto.net/): 应用对比 13 | - [小众软件](http://www.appinn.com/) 14 | - [Mac新手入门以及常用软件推荐](http://wsgzao.github.io/post/mac/) 15 | - [Best App](https://github.com/hzlzh/Best-App/blob/master/README.md) 16 | - [HackStore](https://hack-store.com) 17 | - [Voyga/Awesome](https://github.com/Voyga/Awesome) 18 | - [知乎软件推荐](https://weavi.com/92079) 19 | - [荔枝软件](https://sbcwangka.taobao.com/index.htm?spm=2013.1.w5002-34230978.2.k5I9JE) 20 | 21 | 22 | -------------------------------------------------------------------------------- /recommend-software/android.md: -------------------------------------------------------------------------------- 1 | ## Google Sercer 2 | - [Google Play 服务已停止运行?这是解决方案](http://sspai.com/30526) 3 | - [好马配好鞍,谷歌 GMS 的进阶姿势说明](http://sspai.com/32596) 4 | - [谷歌服务安装器](http://www.wandoujia.com/apps/com.muzhiwan.gsfinstaller?utm_source=sspai_searchapi&utm_campaign=biz&utm_medium=searchapi) 5 | - [酷安谷歌服务安装器](http://www.wandoujia.com/apps/org.coolapk.gmsinstaller?utm_source=sspai_searchapi&utm_campaign=biz&utm_medium=searchapi) 6 | ## Root 7 | - [刷机精灵](http://www.shuame.com/): 刷机精灵,带一键root功能 8 | - [KingRoot](http://kingroot.net/): 国内出品一键root 9 | - [Root Checker](https://play.google.com/store/apps/details?id=org.freeandroidtools.root_checker) 10 | - [CF-auto-root](https://autoroot.chainfire.eu/): SuperMe作者的 11 | - [Root Junky](http://www.rootjunky.com/): 关于root 的一些新闻 12 | - [supersu-Sume Pro](https://play.google.com/store/apps/details?id=darkslide.com.supersumepro): 一键清除KingRoot,并安装使用SuperMe 13 | 14 | ## Xposed 15 | - [Xposed框架初体验](http://www.yangyanxing.com/article/first-use-Xposed.html) 16 | 17 | 18 | ## 备份与同步 19 | - [qq同步助手](): 同步联系人 20 | - [Helium 氦备份 - 免ROOT的 Android APP 应用数据/游戏存档备份还原恢复与迁移利器](http://www.iplaysoft.com/helium.html) 21 | 22 | ## 综合技巧 23 | - [Drippler](http://drippler.com/): android资讯相关 24 | 25 | ## 锤子技巧 26 | - [ROM刷新](http://bbs.smartisan.com/thread-119403-1-1.html) 27 | - [网友整理的技巧帖子](http://bbs.smartisan.com/home.php?mod=space&uid=110721&do=thread&type=thread&view=me&from=space): 一位论坛网友整理的技巧帖子 28 | - [[教程] 坚果5.1.1的google服务包已解决](http://bbs.smartisan.com/thread-236886-1-1.html) 29 | 30 | ## 应用 31 | - [你不应错过的 8 款优秀 Xposed 模块 | 2015 年度盘点](http://sspai.com/32340) 32 | - [Android 系统上的 Xposed 框架中都有哪些值得推荐的模块?](https://www.zhihu.com/question/22063862) 33 | - [Link - 无缝链接你的应用人生](http://www.appnz.com/29356): 国内版本的workflow 34 | - [大家的 Android 手机上面安装都有哪些好用的软件?](https://www.v2ex.com/t/276052) 35 | 36 | 37 | ## 英语 38 | - 扇贝相关的 39 | - 欧陆词典 40 | 41 | ## 学习 42 | - 网易云课堂 43 | - 网易公开课 44 | - 麦子学院 45 | - 慕课网 46 | - 牛客网 47 | - udacity 48 | 49 | ## 吉他学习 50 | - Yousician 51 | - GuitarTune 52 | - 有谱么 53 | - Poputar 54 | - Finger 55 | - 爱玩吉他 56 | 57 | 58 | ## 游戏 59 | - 小鸡模拟器 60 | - 炉石传说 61 | - 网易安全令 62 | - Stack 63 | 64 | ## 工具 65 | - Dropbox 66 | - 名片全能王 67 | - 小米 wifi 68 | - speedtest 69 | - 1Password 70 | - 微鲸电视助手 71 | - shadowsocks 72 | - bitTorrent Sync 73 | - better open with 74 | - Total Commander 75 | - RescueTime 76 | - Brave 77 | - AnkiDroid 78 | 79 | ## 浏览器 80 | - Chrome 81 | - UC 82 | - QQ 83 | 84 | ## 影视 85 | - VCL 86 | - iQiyi 87 | - Youku 88 | - Youtube 89 | - 网易云音乐 90 | - Instergram 91 | - 电视家 2.0 92 | - MUJI to Relax 93 | - PocketCasts 94 | - 蜻蜓FM 95 | 96 | 97 | ## 生活服务 98 | - 高铁管家 99 | - 巴士管家 100 | - 高德地图 101 | - 嘀嘀打车 102 | - 许多卡 103 | - 移动营业厅 104 | - 联通营业厅 105 | 106 | ## 运动健身 107 | - Keep 108 | - 丁香园 109 | - adidas train & run 110 | - nick+ Training 111 | - Seven 112 | - Bong 113 | 114 | 115 | ## 美食 116 | - 下厨房 117 | - 厨房故事 118 | 119 | ## 购物 120 | - 淘宝 121 | - 京东 122 | - 苏宁 123 | - 支付宝 124 | - 团800 125 | - 大众点评 126 | - 格瓦拉电影 127 | 128 | ## 冥思 129 | - Pause 130 | - PranayamaFree 131 | 132 | ## 个人管理 133 | - Any.do 134 | - Trello 135 | - 倒数日 136 | - Fabulous 137 | - Rewire 138 | - SwipeTimes 139 | - 番茄土豆 140 | - HabitBull 141 | 142 | ## 新闻资源 143 | - 微博 144 | - Twitter 145 | - 知乎 146 | - 知乎日报 147 | - 一览 148 | - 好奇心日报 149 | 150 | ## 咖啡 151 | - coffee.guru 152 | 153 | ## 开发工具 154 | - https://termius.com/ 155 | - https://juicessh.com/ -------------------------------------------------------------------------------- /recommend-software/category/bookmarket.md: -------------------------------------------------------------------------------- 1 | 书签服务 2 | 3 | - [pinboard](https://pinboard.in/) 4 | - [diigo](https://www.diigo.com): 可添加备注,管理分享网络内容 5 | - [Candy](https://www.candybank.com/) -------------------------------------------------------------------------------- /recommend-software/category/data-sync.md: -------------------------------------------------------------------------------- 1 | 数据同步。 2 | 3 | ## 软件 4 | - [Resilio Connect](https://getsync.com/connect/): 原来的BitTorrent Sync 5 | - [坚果云](https://www.jianguoyun.com): 国内的良心云盘 6 | - [dropbox](https://www.dropbox.com/):云盘鼻祖 7 | - [百度云](http://pan.baidu.com/): 大空间,速度也不错 -------------------------------------------------------------------------------- /recommend-software/category/developer.md: -------------------------------------------------------------------------------- 1 | ## 网络相关 2 | - [https://github.com/tapio/live-server](https://github.com/tapio/live-server): 本地服务器,实现live reload 3 | - [http-server](https://www.npmjs.com/package/http-server): 一个静态服务器 4 | - [haad/proxychains](https://github.com/haad/proxychains): 转发请求 5 | - [bitinn/kneesocks](https://github.com/bitinn/kneesocks): npm模块,转发请求 6 | - [privoxy](http://www.privoxy.org/) 7 | - [localtunnel](https://github.com/localtunnel/localtunnel): 让别人也可以访问你的localhost 8 | - [使用 SSH Proxy 托管 OS X 的网络代理](https://blog.jamespan.me/2015/10/07/proxy-with-ssh-proxy/) 9 | - [五大开源 Web 代理服务器横评:Squid、Privoxy、Varnish、Polipo、Tinyproxy](https://www.sdk.cn/news/2494) 10 | 11 | ## 文档查询 12 | - [Dash](): Mac平台 13 | - [CodeIf](https://github.com/unbug/codelf#apps): 变量命名 和github star管理工具 14 | - [zestdocs](https://github.com/zestdocs/zest): 全平台,类似dash 15 | 16 | ## 代码阅读 17 | - [Code Insight 公开版](https://src.coding.net/) 18 | - [diffmerge](http://sourcegear.com/diffmerge/): 文件对比工具 19 | 20 | ## 代码运行 21 | - [Foobar](http://www.foobaz.io/): Mac平台,免费 22 | - [CodeRunner 2](https://coderunnerapp.com/): Mac平台,免费 23 | 24 | ## 代码配色 25 | - [开发者福利:solarized跨平台配色方案](http://www.freebuf.com/tools/87294.html) 26 | 27 | 28 | ## 其他 29 | - [IFTTT](https://ifttt.com/): IF this then that. 30 | - [zapier](https://zapier.com/): Connect the apps you use, automate tasks, get more out of your data. -------------------------------------------------------------------------------- /recommend-software/category/download.md: -------------------------------------------------------------------------------- 1 | 2 | ## 下载工具 3 | - [qbittorrent](http://www.qbittorrent.org/download.php): 全平台 4 | - [tixati](http://www.tixati.com/download/): windows, linux 5 | - [utorrent](http://www.utorrent.com/): 全平台下载工具,包括手机客户端 6 | - [Flud - Torrent Downloader](https://play.google.com/store/apps/details?id=com.delphicoder.flud): android平台 7 | 8 | ## 下载资源 9 | - [比目鱼BT](http://www.iplaysoft.com/bimuyu.html) -------------------------------------------------------------------------------- /recommend-software/category/editor-and-IDE.md: -------------------------------------------------------------------------------- 1 | 编辑器以及IDE. 2 | 3 | - [为前端而生的编辑器Brackets及配置推荐](http://segmentfault.com/a/1190000004113546) -------------------------------------------------------------------------------- /recommend-software/category/fast-operate.md: -------------------------------------------------------------------------------- 1 | 快捷操作。 2 | 3 | ## 启动 4 | - [launchy](https://www.launchy.net/): windows平台的 5 | - [Alfred](https://www.alfredapp.com/): Mac平台的 6 | 7 | ## 文本填充 8 | - [TextExpander](https://textexpander.com): 文本快速填充工具 -------------------------------------------------------------------------------- /recommend-software/category/fonts.md: -------------------------------------------------------------------------------- 1 | 字体 2 | 3 | - [INPUT](http://input.fontbureau.com/):Fonts for Code, from Font Bureau 4 | - [有哪些适合维护代码的字体](http://www.zhihu.com/question/20455297) 5 | - [中文字体管家](http://www.xiaa.net/) -------------------------------------------------------------------------------- /recommend-software/category/games.md: -------------------------------------------------------------------------------- 1 | - [砖破英雄 - 英雄打砖块的正确姿势](http://www.appnz.com/29401) 2 | - [Stack - 来,让我们一起建房子](http://www.appnz.com/30442) -------------------------------------------------------------------------------- /recommend-software/category/mindmap.md: -------------------------------------------------------------------------------- 1 | 脑图 2 | 3 | - [gliffy](https://www.gliffy.com/) 4 | - [gliffy介绍](http://www.uisdc.com/online-diagram-and-flow-chart) 5 | - [百度脑图](http://naotu.baidu.com/) 6 | - [使用 Sublime + PlantUML 高效地画图](http://www.jianshu.com/p/e92a52770832) -------------------------------------------------------------------------------- /recommend-software/category/record.md: -------------------------------------------------------------------------------- 1 | 录屏相关软件和设置。 2 | 3 | ## 工具 4 | - [asciinema](https://asciinema.org/): 录制,分享终端的显示 5 | - [Snipaste ](http://zh.snipaste.com/): 带历史功能的截图贴纸工具 6 | - [keyCastOW](https://brookhong.github.io/2014/04/28/keycast-on-windows-cn.html): Windows按键显示软件,显示你的按键操作,可用于录制教学视频时 7 | - [licecap](http://www.cockos.com/licecap/): gif录制工具 8 | 9 | - [Mokey: Mac 初学者们值得入手的热键显示器](http://www.waerfa.com/mokey) 10 | 11 | - [licecap](http://alternativeto.net/software/licecap/): windows, OS X 12 | - [荔枝数码测评: LICEcap](https://www.v2ex.com/t/189618) 13 | - [ScreenToGif](http://alternativeto.net/software/screentogif/): windows 14 | - [gifcam](http://blog.bahraniapps.com/gifcam/): windows 15 | 16 | ## 切图,标注 17 | - [马克曼](http://www.getmarkman.com/): 标注工具 18 | - [AlloyDesigner](http://alloyteam.github.io/AlloyDesigner/): 前端开发辅助工具 -------------------------------------------------------------------------------- /recommend-software/category/system-manager.md: -------------------------------------------------------------------------------- 1 | ## 系统安装 2 | - [WinToHDD - 没有U盘光驱光盘直接在硬盘上安装重装 Win10/8/7 操作系统的工具](http://www.iplaysoft.com/wintohdd.html) -------------------------------------------------------------------------------- /recommend-software/category/time-master.md: -------------------------------------------------------------------------------- 1 | 时间管理 2 | 3 | - [doit.im](https://i.doit.im/home/#/today) 4 | - [rescuetime](https://www.rescuetime.com): 全平台,可付费 -------------------------------------------------------------------------------- /recommend-software/category/white-noise.md: -------------------------------------------------------------------------------- 1 | 白噪音, 一些自然的声音,帮助我们模拟环境,专注工作。推荐一些白噪音的站点: 2 | 3 | - [Rainy Mood](http://www.rainymood.com/) 4 | - [clam](https://www.calm.com/) 5 | - [coffitivity](https://coffitivity.com/) 6 | - [soundrown](http://soundrown.com/) 7 | - [music for programming](http://musicforprogramming.net/) 8 | - [noisli](https://www.noisli.com/) 9 | - [relax th the sound](http://rainfor.me/) 10 | - [ASMR](http://www.bilibili.com/video/av3336337/): 洗耳专用 11 | 12 | -------------------------------------------------------------------------------- /recommend-software/category/windows-split.md: -------------------------------------------------------------------------------- 1 | 窗口管理。 2 | 3 | - [解放鼠标,用 SizeUp 快捷管理你的窗口](http://sspai.com/32222) 4 | - [divvy](http://mizage.com/divvy/): mac, windows都支持 -------------------------------------------------------------------------------- /recommend-software/category/writer.md: -------------------------------------------------------------------------------- 1 | 书写工具 2 | 3 | 4 | 5 | ## web 6 | 7 | - [Cmd Markdown](https://www.zybuluo.com/mdeditor) 8 | - [锤子便签](https://cloud.smartisan.com/#/notes) 9 | - [小书匠](http://markdown.xiaoshujiang.com/) 10 | 11 | 12 | 13 | ## 应用 14 | 15 | - [Typora](https://typora.io/): 全平台,简洁 16 | 17 | -------------------------------------------------------------------------------- /recommend-software/ios.md: -------------------------------------------------------------------------------- 1 | ## 软件 2 | - [Mixpanel](https://itunes.apple.com/us/app/mixpanel/id1032086092?mt=8&utm_source=next.36kr.com): 手机端监控网页性能 3 | - [Textastic Code Editor for iPad](https://itunes.apple.com/cn/app/textastic-code-editor-for/id383577124?mt=8) 4 | - [Splashtop 2 ](): 一款简单易用,性能非常棒的远程桌面控制工具,跨平台支持 Windows,Mac 等主流系统。 5 | - [DataMan 中国](): 简洁好用的数据流量监控应用,支专为中国用户定制,实时监测常规流量和闲时流量;支持 Apple Watch;有智能流量预警功能。 6 | 7 | ## 其他 8 | - [Hey Siri](https://hey-siri.io/): siri能识别的一些指令 -------------------------------------------------------------------------------- /recommend-software/linux.md: -------------------------------------------------------------------------------- 1 | - [提高 Linux 开发效率的 5 个工具](http://mp.weixin.qq.com/s?__biz=MzA4NDIzNzMwMw==&mid=402625360&idx=2&sn=4fb51a5ceb201a18e86e358f67623905&scene=0#wechat_redirect) 2 | - [哪个文件系统最适合你的 Linux 系统?](http://blog.jobbole.com/97505/) 3 | - [Linux 文件与目录管理](http://www.phpxs.com/j/linux/1000213) 4 | - [献给初学者:谈谈如何学习Linux](http://mp.weixin.qq.com/s?__biz=MzA3NTIzMzIxNQ==&mid=402272308&idx=1&sn=8423759dc73afa3fab4ec3d7e432f988&scene=0#wechat_redirect) 5 | - [2016:如何选择 Linux 发行版](http://blog.jobbole.com/98056/) 6 | 7 | ## 软件 8 | - [awesome 窗口管理器](http://awesome.naquadah.org/) 9 | 10 | -------------------------------------------------------------------------------- /recommend-software/mac.md: -------------------------------------------------------------------------------- 1 | ## 技巧 2 | - [Mac 到底要不要关机?](http://mp.weixin.qq.com/s?__biz=MzI0MTAxODYzMA==&mid=206754629&idx=1&sn=72535d6af02c9dc6942e92d2d3f6d0ee&scene=4#wechat_redirect) 3 | - [那些酷炫的 Mac 屏幕保护程序](http://mp.weixin.qq.com/s?__biz=MzI0MTAxODYzMA==&mid=206821174&idx=1&sn=67aac88f55339252c656392b82f8c54f&scene=4#wechat_redirect) 4 | - [你无法拒绝的 Mac 触发角](http://mp.weixin.qq.com/s?__biz=MzI0MTAxODYzMA==&mid=206899954&idx=1&sn=17751a7f81705c0bd0b5a2d68fa1c663&scene=4#wechat_redirect) 5 | - [如何配置一个高效的 Mac 工作环境](https://github.com/macdao/ocds-guide-to-setting-up-mac) 6 | - [把时间浪费在美好的事物上 - 写给程序员的Mac OS X入门指南](http://xunli.xyz/2015/12/31/beginning-mac-osx/) 7 | - [Mac 实用技巧:记住这几个快捷键,让光标指哪到哪](http://sspai.com/32769) 8 | - [AppleDNS](https://github.com/gongjianhui/AppleDNS?utm_source=next.36kr.com): 这个项目就一点好,部署后 App Store 和 Apple Music 跑得比谁都快! 9 | - [Surge 新手使用指南](https://medium.com/@scomper/surge-%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6-a1533c10e80b#.1gz567cmx) 10 | - [某些情况下,你可以临时一键取消 OS X 开机启动项 | 一日一技 · Mac](http://sspai.com/33085) 11 | - [Homebrew 技巧:使用 Mackup 快速备份 Mac 软件的配置文件](http://sspai.com/32933) 12 | - [gongjianhui/AppleDNS](https://github.com/gongjianhui/AppleDNS): Apple 网络服务加速配置。真的快,快出声 13 | 14 | 15 | ## 软件 16 | - [SmartFinder](http://www.smartisan.com/apps/smartfinder): 锤子科技出品,管理android手机资源 17 | - [Tuck:提升屏幕窗口利用效率神器](http://www.waerfa.com/tuck-review) 18 | - [键盘党的极致,有了它你可以彻底丢掉鼠标:Shortcat](http://sspai.com/32524) 19 | - [Type2Phone 3:姜还是老的辣,让你的 Mac 变成 iOS 设备蓝牙键盘](http://www.waerfa.com/type2phone-3-review) 20 | - [妈妈再也不用担心我的macbook发热了计划2](http://zythum.github.io/mama2/) 21 | - [Quiver: The Programmer's Notebook](https://itunes.apple.com/us/app/quiver-programmers-notebook/id866773894) 22 | - [HazeOver – Mac 屏幕专心遮罩层[OS X]](http://www.appinn.com/hazeover-mac/) 23 | - [RestoreMeNot – 禁用应用程序恢复打开窗口[OS X][¥6→0]](http://free.apprcn.com/restoremenot-7/) 24 | - [技巧:通过 MacID,让 Mac 在锁屏或解锁时自动执行某操作](http://sspai.com/32828) 25 | - [Battery Time Indicator – 显示剩余电量使用时间[OS X][¥6→0]](http://free.apprcn.com/battery-time-indicator-2/) 26 | - [OK,终于可以对 Mac 应用独立调整音量了](http://mp.weixin.qq.com/s?__biz=MzA4NTMxOTgxNg==&mid=401841671&idx=1&sn=7ca1cdc3a50e29fd6486238c2d2e3269&scene=0#wechat_redirect): Volume Mixer for Mac 27 | - [BitBar:彻底玩转你的 Menubar 2](http://www.waerfa.com/bitbar-review) 28 | - [六款提升操作效率的 Alfred Workflow](http://mp.weixin.qq.com/s?__biz=MzA4NTMxOTgxNg==&mid=401920812&idx=1&sn=0af3e717e4a7ea9589b7084477eb1404&scene=0#wechat_redirect) 29 | - [startupizer 2](http://www.waerfa.com/startupizer-2-review): 启动项管理 30 | - [ControlPlane:自定义Mac情景模式](http://www.waerfa.com/controlplane) 31 | - [Mac下常用软件推荐](http://topdna.org/tech/mac-software/) 32 | - [Mac Tool Kit](http://pinggod.com/2015/mac-tool-kit/) 33 | - [typeit4me](http://www.ettoresoftware.com/mac-apps/typeit4me/): 快捷输入工具 34 | - [Surga for MAC 使用指南](https://medium.com/@scomper/surge-for-mac-%E7%AE%80%E6%98%8E%E6%8C%87%E5%8D%97-f6f357b8f09c#.uggm33v9z) 35 | - [Beamer](https://beamer-app.com/download): airplay投射软件 36 | - [Mac Update Desktop](https://www.macupdate.com/): mac软件管理工具 37 | - [AirServer](http://www.airserver.com/Mac): AirPlay投射工具 38 | - [Mokey: Mac 初学者们值得入手的热键显示器](http://www.waerfa.com/mokey) 39 | - [iPic](https://itunes.apple.com/cn/app/id1101244278?ls=1&mt=12): 图床工具 40 | - [Typeeto](http://www.iplaysoft.com/typeeto.html): 虚拟蓝牙键盘 41 | - [Aria2GUI](https://github.com/yangshun1029/aria2gui): 下载工具 42 | 43 | 44 | ## 剪切板工具 45 | - [pastebot](http://tapbots.com/pastebot/) -------------------------------------------------------------------------------- /recommend-software/windows/README.md: -------------------------------------------------------------------------------- 1 | 记录 windows 下使用工具。 2 | 3 | # 软件管理 4 | - [Chocolatey](https://chocolatey.org/): The package manager for Windows 5 | - [Ninite](https://ninite.com/) 6 | 7 | ## 参考 8 | - [Windows下效率必备软件](http://www.jeffjade.com/2015/10/19/2015-10-18-Efficacious-win-software/) -------------------------------------------------------------------------------- /recommend-software/windows/developer.md: -------------------------------------------------------------------------------- 1 | # 开发工具 2 | 3 | 4 | ## 命令行相关 5 | - [cmder](http://cmder.net/): cmd 替代品, 集成 ConEmu 和 clink 6 | - [ConEmu](https://conemu.github.io/): 带集成多窗口的 cmd 替代品 7 | - [Clink](https://github.com/mridgers/clink): Bash's powerful command line editing in cmd.exe. 8 | - [Gow](https://github.com/bmatzelle/gow): Unix command line utilities installer for Windows. 9 | 10 | 11 | ## 编程语言 12 | - [mvn windows](https://github.com/coreybutler/nvm-windows): 管理 node 与 nvm 版本 13 | - [node](nodejs.org) 14 | - [python 2x](https://www.python.org/) 15 | - [git for windows](https://git-for-windows.github.io/) 16 | 17 | 18 | 19 | ## 文本编辑器 20 | - [spacemacs](http://spacemacs.org/): emacs 编辑器 21 | - [atom](https://atom.io/): 插件生态系统非常丰富 22 | - [vs code](https://code.visualstudio.com/) 23 | - [sublime text 3](http://www.sublimetext.com/) 24 | 25 | ## AutoHotkey 26 | - [AutoHotkey](http://ahkscript.org/):目前使用的是1.1版本,2.0是未来可使用的 27 | - [Win下最爱效率神器:AutoHotKey](http://www.jeffjade.com/2016/03/11/2016-03-11-autohotkey/) 28 | - [AutoHotkey 的高度定制功能,让你成为效率高手](https://autohotkey.com/boards/viewtopic.php?t=4278) 29 | 30 | ## PowerShell 31 | - [posh-git](http://dahlbyk.github.io/posh-git/) 32 | - [psget](http://psget.net/) 33 | 34 | ## 其他 35 | - [Beyond Compare](http://www.scootersoftware.com/): 收费的 36 | - [Meld](http://meldmerge.org/development.html): 免费的文本对比工具 37 | - [xShell5](http://www.netsarang.com/products/xsh_overview.html) 38 | 39 | ## 抓包工具 40 | - [postMan](https://www.getpostman.com): chrome下使用的话,配合一个它的插件,可以带上 cookies 41 | - [charles](https://www.charlesproxy.com/): mac, windows, linux 42 | - [fiddler](http://www.telerik.com/fiddler): windows, linux 43 | - [Mac下有没有类似fiddler的工具](https://www.zhihu.com/question/22914923) 44 | - [Paw](https://paw.cloud/) 45 | - [Surge](): Mac 下 46 | - [betwixt](https://github.com/kdzwinel/betwixt): chrome network 面板。 47 | - [avwo/whistle](https://github.com/avwo/whistle): npm 模块,可在浏览器开启界面操作 48 | - [anyproxy](http://anyproxy.io/cn/): 支付宝使用的。 49 | - [nproxy](https://github.com/goddyZhao/nproxy) 50 | - [CORS Toggle Chrome插件](http://www.cnplugins.com/devtool/cors-toggle/) 51 | - [https://mitmproxy.org/](https://mitmproxy.org/): 使用较多的 命令行 工具 52 | - [h2non/toxy](https://github.com/h2non/toxy): Hackable HTTP proxy to simulate server failure scenarios and network conditions -------------------------------------------------------------------------------- /recommend-software/windows/productivity.md: -------------------------------------------------------------------------------- 1 | # 效率工具 2 | - [Clover](http://ejie.me/): 资源管理器扩展 3 | - [Total Commander](http://www.ghisler.com/index.htm): 资源管理器 4 | - [Listary](http://www.listary.com/): 资源管理器下扩展工具,文件搜索 5 | - [Everything](http://www.voidtools.com/): 全局文件搜索工具 6 | - [MasterSeeker](http://www.master-seeker.com/): 文件搜索工具 7 | - [seer](https://sourceforge.net/projects/ccseer/): 实现空格预览 8 | - [VistaSwitcher](http://www.ntwind.com/software/vistaswitcher.html): 实现 `alt+\`` 单应用内切换窗口 9 | - [Ditto](ditto-cp.sourceforge.net): 剪切板历史记录 10 | - [Snipaste](https://www.snipaste.com/): 截屏工具 11 | - [f.lux](https://justgetflux.com/): 调节屏幕颜色,保护视力工具 12 | 13 | 14 | ## 窗口管理 15 | - [fuhsjr00/bug.n](https://github.com/fuhsjr00/bug.n): aka插件 16 | - [DannyBen/Gridy](https://github.com/DannyBen/Gridy): aka插件 17 | - [AquaSnap Window Manager](http://www.nurgo-software.com/products/aquasnap): 收费,也有免费账号 18 | - [Preme for Windows](http://www.premeforwindows.com/): 免费 19 | 20 | ## 快捷按键 21 | - [wox](http://www.getwox.com/):An effective launcher for windows 22 | - [launchy](http://www.launchy.net/): 这类软件,可以用 Listary 替代了 23 | - [hain](https://github.com/appetizermonster/Hain): An 'alt+space' launcher for Windows, built with Electron 24 | - [capslock+](http://cjkis.me/capslock+/): Capslock+是一个加强 Capslock 键的功能,以提高效率的工具。 25 | - [RemapKey等:小巧实用的键盘映射工具](https://xbeta.info/key-tweak-remap.htm) 26 | 27 | 28 | ## 鼠标手势 29 | - [提高鼠标操作效率,两款 Windows 快捷手势工具:搜狗鼠标手势、WGestures](http://sspai.com/33351) 30 | - [Trackpad++](http://trackpad.powerplan7.com/): 体验类似mac的触控板效果 31 | - [DeskDock - 用电脑上的鼠标键盘来控制安卓 Android 手机平板 (剪贴板共享)](http://www.iplaysoft.com/deskdock.html) 32 | 33 | ## 截图、录屏相关 34 | - [Snipaste ](http://zh.snipaste.com/): 带历史功能的截图贴纸工具 35 | - [keyCastOW](https://brookhong.github.io/2014/04/28/keycast-on-windows-cn.html): Windows按键显示软件,显示你的按键操作,可用于录制教学视频时 36 | - [licecap](http://www.cockos.com/licecap/): gif录制工具 37 | 38 | ## 其他 39 | - [synergy](http://symless.com/synergy/): 键鼠共享软件 40 | 41 | ## Markdown 客户端 42 | - [Cmd Markdown](https://www.zybuluo.com/cmd/) 43 | 44 | ## 记忆 45 | - [Anki](http://ankisrs.net/): 卡片记忆 46 | 47 | ## 时间管理 48 | - [rescuetime](https://www.rescuetime.com/download): 收费软件,自动记录 49 | - [toggl Desktop](https://toggl.com/): 免费软件,手动记录 50 | 51 | ## 美化工具 52 | - [MacType](http://www.mactype.net/): 建议配合 ox 字体, 配置使用 `XMac.LCD.Default` 53 | -------------------------------------------------------------------------------- /sublimetext3/README.md: -------------------------------------------------------------------------------- 1 | 希望写一篇关于Sublime Text 的终结版。 -------------------------------------------------------------------------------- /sublimetext3/插件列表.md: -------------------------------------------------------------------------------- 1 | ## [Package Control](https://packagecontrol.io/) 2 | Sublime 插件的管理系统,需要单独安装,安装方式可以访问: [Package Control Installation](https://packagecontrol.io/installation)。 3 | 4 | 安装完成之后,在功能菜单中就会多出`Package Control`选择,安装其他插件,选择`Install Package`。 5 | 6 | ## 主题配色 7 | - [Theme - Phoenix](https://packagecontrol.io/packages/Theme%20-%20Phoenix) 8 | 9 | ## 语法 10 | - [Vue Syntax Highlight](https://github.com/vuejs/vue-syntax-highlight) 11 | - [Vuejs Complete Package](https://packagecontrol.io/packages/Vuejs%20Complete%20Package) -------------------------------------------------------------------------------- /vim-mode/.gvimrc.local: -------------------------------------------------------------------------------- 1 | if has('gui_running') 2 | set guioptions-=T " Remove the toolbar 3 | set lines=40 " 40 lines of text instead of 24 4 | if !exists("g:spf13_no_big_font") 5 | if LINUX() && has("gui_running") 6 | set guifont=Source\ Code\ Pro\ 16,Andale\ Mono\ Regular\ 12,Menlo\ Regular\ 11,Consolas\ Regular\ 12,Courier\ New\ Regular\ 14 7 | elseif OSX() && has("gui_running") 8 | set guifont=Source\ Code\ Pro:h16,Andale\ Mono\ Regular:h12,Menlo\ Regular:h11,Consolas\ Regular:h12,Courier\ New\ Regular:h14 9 | elseif WINDOWS() && has("gui_running") 10 | set guifont=Source\ Code\ Pro:h14,Microsoft\ Yahei:h14 11 | endif 12 | endif 13 | endif 14 | 15 | 16 | set background=dark " for the light version 17 | let g:airline_theme='one' 18 | colorscheme one 19 | au InsertLeave * hi Cursor guibg=gray " set cursor color 20 | -------------------------------------------------------------------------------- /vim-mode/.vimrc.before.local: -------------------------------------------------------------------------------- 1 | let g:spf13_leader="\" 2 | -------------------------------------------------------------------------------- /vim-mode/.vimrc.bundles.local: -------------------------------------------------------------------------------- 1 | Plugin 'rakr/vim-one' 2 | Plugin 'mhinz/vim-startify' 3 | Plugin 'ShowTrailingWhitespace' 4 | -------------------------------------------------------------------------------- /vim-mode/.vimrc.local: -------------------------------------------------------------------------------- 1 | set clipboard=unnamed 2 | set wrap 3 | set nospell 4 | colorscheme ron 5 | -------------------------------------------------------------------------------- /vim-mode/README.md: -------------------------------------------------------------------------------- 1 | # vim-mode 2 | Vim是从vi发展出来的一个文本编辑器。最初的简称是Vi IMitation,随着功能的不断增加,正式名称改成了Vi IMproved。 3 | 4 | 我们不一定去用 vim, 但是 vim 对文本的操作是值得大家学习的,目前很多 编辑器或者 IDE 都是支持 vim-mode 的。学会它,对我们编写代码,效率是有显著的提高。 5 | 6 | 7 | ## 参考 8 | - [Wikipedia: Vim](https://zh.wikipedia.org/wiki/Vim) -------------------------------------------------------------------------------- /vim-mode/cheat-sheet.md: -------------------------------------------------------------------------------- 1 | - `:`: 进入命令模式 2 | - `esc`: 返回普通模式 3 | - `Ctrl-o`: 进入衍生模式,比如插入模式下,`ctrl-o` 输入一个普通模式下的命令,执行完毕后,自动返回 插入模式。 4 | 5 | # 光标移动 6 | 7 | - `h,j,k,l`: 普通模式下,光标移动,左,下,上,右。(逆时针) 8 | - `5h`: 重复执行5次h, 光标左移5位 9 | - `0`: 行首 10 | - `^`: 行首第一个非空白字符 11 | - `$`: 行尾 12 | - `g_`: 行尾最后一个非空白字符 13 | 14 | - `w,e,b`: 普通模式下,光标以单词纬度移动。 15 | 16 | - `W,E,B`: 同上,但是移动的单词可以包含标点。比如连字符`-` 17 | 18 | - `Ctrl-d`, `Ctrl-u`: 半个屏幕向下,向上滚动。 19 | 20 | - `Ctrl-B, Ctrl-F`: 滚动一个屏幕,通常会被我覆盖,我用来定义 emacs 光标移动方式。 21 | 22 | - `zt,zz,zm`: 使当前行,处于屏幕的顶部,中间,底部。 23 | 24 | - `H,M,L`: 光标定位到当前屏幕的,顶部,中间,底部。 25 | 26 | - `gg`: 定位到文本开始处 27 | 28 | - `G`: 定位到文本最后一行 29 | 30 | - `5G`: 移动到第五行 31 | 32 | - `:5`: 同上,移动到指定行 33 | 34 | - `gd`: 找到当前变量定义处。 35 | 36 | - `%`: 跳转匹配的括号, (,{,[,],},) 37 | 38 | - `()`: back, forword 39 | 40 | - `{}`: back,forword paragraph 41 | 42 | - `[{`,`]}`: back, forword block 43 | 44 | - `f{char},F{char}`: x是一个字符,向后跳到{char}字符出现的位置 45 | 46 | - `t{char},T{char}`: x是一个字符,向前跳到{char}字符出现的位置 47 | 48 | - `*`: 向后跳转到当前字符相同处, spacemacs 中无效 49 | 50 | - `#`: 向前跳转到当前字符相同处,spacemacs 中无效 51 | 52 | # 编辑模式 53 | 54 | - `i`: 当前光标前插入 55 | - `a`: 当前光标后插入 56 | - `I`: 当前行首插入 57 | - `A`: 当前行尾插入 58 | - `o`: 当前行后插入 59 | - `O`: 当前行前插入 60 | - `wi`, `bi`, `ea`: 下一个单词前,单词后插入 61 | 62 | - `r`: 重写当前一个字符 63 | 64 | - `R`: 重写多个字符,需要手动退出 65 | 66 | - `J`: 何必当前行和下一行 67 | 68 | - `xp`: 交换当前和下一个字符位置 69 | 70 | - `u`: undo 71 | 72 | - `Ctrl+r`: redo 73 | 74 | - `.`: repeat last command, 可用于 redo 75 | 76 | # 复制,粘贴,裁切 77 | 78 | - `x`: 删除当前光标字符 79 | - `X`: 删除当前光标前字符 80 | - `D`: 删除当前行后字符 81 | - `C`: 重写当前行后字符,就是执行了 `D`, `a` 82 | - `cc`: 重写当前行,相当于 `dd`, `i` 83 | - `cw`: 重写当前词,相当于 `dw`, `i` 84 | - `s`: 重写当前字符 85 | - `S`: 相当于 `cc` 86 | - `d`: 执行关于删除的引导键, 比如 `d0`, `d$` 87 | - `dd`: 删除当前行 88 | - `dw`: 向后删除当前词 89 | - `db`: 向前删除当前词 90 | - `ndw`: n表示重复执行 91 | 92 | - `yy`: yank 就是拷贝的意思,拷贝当前行 93 | 94 | - `yw`: 复制当前光标到当前词尾的字符 95 | 96 | - `yb`: 复制当前光标到当前词首的字符 97 | 98 | - `p`: 当前光标后粘贴 99 | 100 | - `P`: 当前光标前粘贴 101 | 102 | - `v`: 进入 visual 模式 103 | 104 | - `V`: 进入visual 模式,选取单位位行 105 | 106 | - `Ctrl+v`: 进入 visual 模式,选取单位为块 107 | 108 | - `<`: 进入 visual 模式后, 向左进行 index 109 | 110 | - `>`: 进入 visual 模式后, 向右进行 index 111 | 112 | - `y`: 进入 visual 模式后,复制选中字符 113 | 114 | - `x`: 进入 visual 模式后, 裁切选中字符 115 | 116 | - `d`: 进入 visual 模式后,删除选中字符, 效果同上 117 | 118 | - `~`: 进入 visual 模式后,将选中字符大小写交换 119 | 120 | # ctrl 组合按键 121 | 122 | - `ctrl-r`: redo (可被系统 Replace 替换), 在 vim 中 使用 `.` 进行 redo 123 | - `ctrl-d`: 向下翻滚半个屏幕 124 | - `ctrl-u`: 向上翻滚半个屏幕· 125 | - `ctrl-i`: jump to your previous navigation location 126 | - `ctrl-o`: jump back to where you where 127 | - `ctrl-e`: scroll up one line (可被系统 光标移动到行末替换) 128 | - `ctrl-y`: scroll down one line, 屏幕向上移动一行 129 | - `ctrl-v`: 竖向选择 virsual模式, (可被系统粘贴替换) 130 | - `ctrl-f`: 整屏向下移动,(可被系统光标向前移动替换) 131 | - `ctrl-b`: 整屏向上移动, (可被系统光标向后移动替换) 132 | - `ctrl-w {char}`: 针对多窗口 操作的触发按键 133 | - `ctrl-w c`: close tab 134 | - `ctrl-w q`: quite a window 135 | - `ctrl-w s`: 水平分割窗口 136 | - `ctrl-w v`: 垂直分割窗口 137 | - `ctrl-w w`: 在不同 window 直接切换 138 | - `ctrl-w p`: 返回上一次聚焦的 window 139 | - `ctrl-w h/j/k/l`: 移动光标聚焦在上下左右窗口 140 | 141 | # 搜索 142 | - 设置搜索结果高亮: `set hlsearch!` 143 | - 取消高亮设置: `noh` 144 | 145 | # 小技巧 146 | 147 | - 插入3个 go, 可使用 `3i go {esc}` 148 | 149 | - 查找当前光标后,第三个s, 可使用 `3fs` 150 | 151 | - `zc`, `zo`: 代码折行收起,展开 152 | 153 | - `J`: 合并两行 154 | 155 | - `>`: 控制缩进 156 | 157 | - `gt`: 移动到下一个 tab 页 158 | 159 | - `gT`: 移动到上一个 tab 页 160 | 161 | 162 | ## 参考资料 163 | - 返回 normal, 推荐使用 `ctrl-[` , 避免过多的自定义 164 | - 减少使用 `hjkl` 移动光标,[habit-breaking-habit-making](http://vimcasts.org/blog/2013/02/habit-breaking-habit-making/) 165 | -------------------------------------------------------------------------------- /vim-mode/how-to-copy-paste.md: -------------------------------------------------------------------------------- 1 | # vim下复制与粘贴 2 | 3 | - yank: `y` 打头的一些命令,比如 `yy` 复制整行。 4 | - visual mode: `v` 进入 visual mode 后,可以移动光标选取内容。按 `y` 即可复制。`x` 或 `d` 即可裁切。 5 | - paster: `p`, 就是粘贴的意思。 6 | 7 | # vim 寄存器 8 | 9 | 默认情况下 vim 是使用自己的寄存器对剪切记录作存储,与系统剪切板想独立。通过 `:help registers` 即可查看相关文档。而在使用中,可以通过 `:reg` 查看当前寄存器存储情况。 10 | 11 | vim 具有9种寄存器: 12 | 13 | - 无名(unnamed)寄存器:"",缓存最后一次操作内容; 14 | - 数字(numbered)寄存器:"0 ~"9,缓存最近操作内容,复制与删除有别, "0寄存器缓存最近一次复制的内容,"1-"9缓存最近9次删除内容 15 | - 行内删除(small delete)寄存器:"-,缓存行内删除内容; 16 | - 具名(named)寄存器:"a ~ "z或"A - "0Z,指定时可用; 17 | - 只读(read-only)寄存器:":,".,"%,"#,分别缓存最近命令、最近插入文本、当前文件名、当前交替文件名; 18 | - 表达式(expression)寄存器:"=,只读,用于执行表达式命令; 19 | - 选择及拖拽(selection and drop)寄存器:"*,"+,"~,存取GUI选择文本,可用于与外部应用交互,使用前提为系统剪切板(clipboard)可用; 20 | - 黑洞(black hole)寄存器:"_,不缓存操作内容(干净删除); 21 | - 模式寄存器(last search pattern):"/,缓存最近的搜索模式。 22 | 23 | 注意其中,**第七个**即系统的剪切板记录。 24 | 25 | # 解决方案 26 | 27 | ## `"+` 命令方式 28 | 29 | vim 下如果系统粘贴系统剪切板的内容,使用命令 `"+p` 替代 `p`。 裁切或者复制的时候,也是一样加上前缀 `"+` 或 `"*`。(这两个寄存器在大部分系统下是同系统剪切板的) 30 | 31 | ## `Insert` 方式 32 | 33 | - `Ctrl+Insert`: 调用系统粘贴 34 | - `Shift+Insert`: 调用系统复制 35 | 36 | 这种方式在某些小新键盘上找不到 `insert` 按键,就很尴尬了。所以使用频率最低。 37 | 38 | ## `set clipboard=unnamed` 方式 39 | 40 | 这个是最直接的方式, 在 `~/.vimrc` 就是配置文件里,加上 `set clipboard=unnamed` ,使得其启动时自动执行。 41 | 42 | ## 如何使得 vim 的相关删除或者裁剪命令不复制到寄存器中 43 | 44 | 如上设置之后,在 vim 中关于字符的裁切,删除,也被存入了默认寄存器中,这样当我们想要在 vim 中删除一段,并且用系统剪切板内容粘贴的时候,就会被删除的覆盖。解决的方法:`Use the "black hole register", "_ to really delete something: "_d` 45 | 46 | 使用`_`寄存器指令。 47 | 48 | # 各个软件下的具体设置 49 | 50 | ## spacemacs 51 | 52 | 貌似都可以直接读取系统剪切板,我也就安装了基本的 layer。没有对这个特殊处理。 53 | 54 | ## JetBrains 的 IDE 55 | 56 | 使用的插件为 [ideavim](https://github.com/JetBrains/ideavim), 功能还是很强大的,会和 IDE 自身的快捷键有些冲突。我会将 `Ctrl+A/E/F/B/N/P` 保留作为光标快速移动方式。 57 | 58 | ideavim 默认使用的是 vim 自己的寄存器,所以我们要创建一个 `~/.ideavimrc`, 将 `set clipboard=unnamed` 填入重启即可。 59 | 60 | ## Atom 61 | 62 | 使用的插件为 [vim-mode-plus](https://atom.io/packages/vim-mode-plus), 在其设置项中,有一个选项可以控制是否使用系统剪切板。 63 | 64 | 65 | # 搜索模式下如何插入文本 66 | 还有一个问题是,vim 的命令模式,比如 `/`,`:` 进入,默认是输入模式,如有需要粘贴文本,我们可以通过 `ctrl-r [寄存器]`, 比如 `ctrl-r +`,粘贴我们剪切板的内容。 67 | 68 | 这里说明了我们还是应该保留 `ctrl-r` 组合键功能,不要用于替换为 ide 或 编辑器的替换。 69 | 70 | 在 ideavim 插件下,`:reg` 查看中文有可能是乱码,是因为 配置的字体不支持中文,修改为 `yahei console hybird` 即可。 71 | 72 | ## 参考 73 | 74 | - [How to delete (not cut) in Vim?](http://stackoverflow.com/questions/11993851/how-to-delete-not-cut-in-vim#11993928) 75 | -------------------------------------------------------------------------------- /vim-mode/vim-tutor.md: -------------------------------------------------------------------------------- 1 | # vimtutor 2 | 如果你有下载 vim, 那么通过命令行 `vimtutor` 或者在 vim 中输入 `:h vimtutor` 即可进入 vim 的向导学习。完整的用户手册,可以通过 `:help user-manual` 进入。 3 | 4 | 5 | ## 模式 6 | ### 普通模式(normal-mode) 7 | Vim启动后的默认模式, 主要移动光标,和对字符删除与替换。通过 `i` 等命令进入插入模式。 8 | 9 | 10 | ### 插入模式(insert-mode) 11 | 在这个模式中,大多数按键都会向文本缓冲中插入文本。大多数新用户希望文本编辑器编辑过程中一直保持这个模式。在插入模式中,可以按ESC键回到普通模式。 12 | 13 | 14 | ### 可视模式(visual-mode) 15 | 这个模式与普通模式比较相似。但是移动命令会扩大高亮的文本区域。高亮区域可以是字符、行或者是一块文本。当执行一个非移动命令时,命令会被执行到这块高亮的区域上。Vim的"文本对象"也能和移动命令一样用在这个模式中。 16 | 17 | ### 选择模式(select-mode) 18 | 这个模式和无模式编辑器的行为比较相似(Windows标准文本控件的方式)。这个模式中,可以用鼠标或者光标键高亮选择文本,不过输入任何字符的话,Vim会用这个字符替换选择的高亮文本块,并且自动进入插入模式。 19 | 20 | 21 | ### 命令模式(command-mode) 22 | 在命令行模式中可以输入会被解释成并执行的文本。例如执行命令(":"键),搜索("/"和"?"键)或者过滤命令("!"键)。在命令执行之后,Vim返回到命令行模式之前的模式,通常是普通模式。 23 | 24 | 25 | ### EX-模式(ex-mode) 26 | 这和命令行模式比较相似,在使用":visual"命令离开Ex模式前,可以一次执行多条命令。 27 | 28 | ## 衍生模式 29 | ### 操作符等待模式 30 | 这个派生模式指普通模式中,执行一个操作命令后Vim等待一个"动作"来完成这个命令。Vim也支持在操作符等待模式中使用"文本对象"作为动作,包括"aw"一个单词(a word)、"as"一个句子(a sentence)、"ap"一个段落(a paragraph)等等。 31 | 比如,在普通模式下"d2as"删除当前和下一个句子。在可视模式下"apU"把当前段落所有字母大写。 32 | 33 | ### 插入普通模式 34 | 35 | 36 | ## 参考 37 | - [Learning the vi Editor/Vim/Modes](https://en.wikibooks.org/wiki/Learning_the_vi_Editor/Vim/Modes) -------------------------------------------------------------------------------- /vim-mode/vundle-plugins.md: -------------------------------------------------------------------------------- 1 | 管理插件,使用 [Vundle](https://github.com/VundleVim/Vundle.vim), 插件查询,在 [VimAwesome](http://vimawesome.com/), 搜索插件,里面会给出针对 Vundle 下的安装说明。 2 | 3 | # spf13-vim 自带的 4 | - Plugin 'gmarik/vundle' 5 | - Plugin 'MarcWeber/vim-addon-mw-utils' 6 | - Plugin 'tomtom/tlib_vim' 7 | - Plugin 'scrooloose/nerdtree' 8 | - Plugin 'altercation/vim-colors-solarized' 9 | - Plugin 'spf13/vim-colors' 10 | - Plugin 'tpope/vim-surround' 11 | - Plugin 'tpope/vim-repeat' 12 | - Plugin 'rhysd/conflict-marker.vim' 13 | - Plugin 'jiangmiao/auto-pairs' 14 | - Plugin 'ctrlpvim/ctrlp.vim' 15 | - Plugin 'tacahiroy/ctrlp-funky' 16 | - Plugin 'terryma/vim-multiple-cursors' 17 | - Plugin 'vim-scripts/sessionman.vim' 18 | - Plugin 'matchit.zip' 19 | - Plugin 'vim-airline/vim-airline' 20 | - Plugin 'vim-airline/vim-airline-themes' 21 | - Plugin 'powerline/fonts' 22 | - Plugin 'bling/vim-bufferline' 23 | - Plugin 'easymotion/vim-easymotion' 24 | - Plugin 'jistr/vim-nerdtree-tabs' 25 | - Plugin 'flazz/vim-colorschemes' 26 | - Plugin 'mbbill/undotree' 27 | - Plugin 'nathanaelkane/vim-indent-guides' 28 | - Plugin 'vim-scripts/restore_view.vim' 29 | - Plugin 'mhinz/vim-signify' 30 | - Plugin 'tpope/vim-abolish.git' 31 | - Plugin 'osyo-manga/vim-over' 32 | - Plugin 'kana/vim-textobj-user' 33 | - Plugin 'kana/vim-textobj-indent' 34 | - Plugin 'gcmt/wildfire.vim' 35 | - Plugin 'reedes/vim-litecorrect' 36 | - Plugin 'reedes/vim-textobj-sentence' 37 | - Plugin 'reedes/vim-textobj-quote' 38 | - Plugin 'reedes/vim-wordy' 39 | - Plugin 'scrooloose/syntastic' 40 | - Plugin 'tpope/vim-fugitive' 41 | - Plugin 'mattn/webapi-vim' 42 | - Plugin 'mattn/gist-vim' 43 | - Plugin 'scrooloose/nerdcommenter' 44 | - Plugin 'tpope/vim-commentary' 45 | - Plugin 'godlygeek/tabular' 46 | - Plugin 'luochen1990/rainbow' 47 | - Plugin 'majutsushi/tagbar' 48 | - Plugin 'Shougo/neocomplete.vim.git' 49 | - Plugin 'Shougo/neosnippet' 50 | - Plugin 'Shougo/neosnippet-snippets' 51 | - Plugin 'honza/vim-snippets' 52 | - Plugin 'spf13/PIV' 53 | - Plugin 'arnaud-lb/vim-php-namespace' 54 | - Plugin 'beyondwords/vim-twig' 55 | - Plugin 'klen/python-mode' 56 | - Plugin 'yssource/python.vim' 57 | - Plugin 'python_match.vim' 58 | - Plugin 'pythoncomplete' 59 | - Plugin 'elzr/vim-json' 60 | - Plugin 'groenewege/vim-less' 61 | - Plugin 'pangloss/vim-javascript' 62 | - Plugin 'briancollins/vim-jst' 63 | - Plugin 'kchmck/vim-coffee-script' 64 | - Plugin 'amirh/HTML-AutoCloseTag' 65 | - Plugin 'hail2u/vim-css3-syntax' 66 | - Plugin 'gorodinskiy/vim-coloresque' 67 | - Plugin 'tpope/vim-haml' 68 | - Plugin 'mattn/emmet-vim' 69 | - Plugin 'tpope/vim-rails' 70 | - Plugin 'rust-lang/rust.vim' 71 | - Plugin 'tpope/vim-markdown' 72 | - Plugin 'spf13/vim-preview' 73 | - Plugin 'tpope/vim-cucumber' 74 | - Plugin 'cespare/vim-toml' 75 | - Plugin 'quentindecock/vim-cucumber-align-pipes' 76 | - Plugin 'saltstack/salt-vim' 77 | 78 | 79 | # 额外添加的 80 | - [Vim-one](http://vimawesome.com/plugin/vim-one-without-it): 主题配色 81 | - [vim-startify](http://vimawesome.com/plugin/vim-startify): 添加启动界面 82 | - [showTrailingWhitespace](http://vimawesome.com/plugin/showtrailingwhitespace): 展示行尾多余空格 83 | --------------------------------------------------------------------------------