This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // yarn add lodash | |
| // var _ = require('lodash'); | |
| var arr2json = function (array) { | |
| var keys = new Array() | |
| , values = new Array(); | |
| for (var o in array) { | |
| keys.push(o); | |
| values.push(array[o]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ksort = function(obj, numbersort) { | |
| numbersort = numbersort || true; | |
| var keys = Array.from(Object.keys(obj)).sort() | |
| , numarr = [] | |
| , json = {}; | |
| for (let o of keys) { | |
| if (numbersort && Number.isInteger(parseInt(o))) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git config --global merge.tool meld | |
| git config --global diff.tool meld | |
| git config --global mergetool.meld.path “D:\Program Files (x86)\Meld\meld.exe” |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| SET sublimeTextPath=D:\Sublime Text Build 3126 x64\sublime_text.exe | |
| REM ADD REGISTRY KEYS | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%sublimeTextPath%,0" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%sublimeTextPath% \"%%1\"" /f | |
| pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root = true | |
| [*] | |
| tab_width = 4 | |
| ident_size = 4 | |
| max_line_length = 80 | |
| end_of_line = lf | |
| charset = utf-8 | |
| ident_style = space | |
| insert_final_newline = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| SET sublimeTextPath=D:\Sublime Text Build 3126 x64\subl.exe | |
| REM ADD REGISTRY KEYS | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%sublimeTextPath%,0" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%sublimeTextPath% \"%%1\"" /f | |
| pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| # install symfony/var-dump to your project | |
| # composer require symfony/var-dumper | |
| // use namespace | |
| use Symfony\Component\VarDumper\Cloner\VarCloner; | |
| use Symfony\Component\VarDumper\Dumper\CliDumper; | |
| use Symfony\Component\VarDumper\Dumper\HtmlDumper as SymfonyHtmlDumper; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # 将给定目录中的所有文件的权限恢复为 umask = 0022 | |
| # | |
| # author 牟勇 my24251325@gmail.com | |
| function chmodfile () { | |
| if [ -d "$1" ];then | |
| for file in `ls -al $1 | awk '{print $9}'` | |
| do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugins=(zsh-navigation-tools zsh-autosuggestions sudo git) | |
| alias zshconfig="vim ~/.zshrc" | |
| alias zshcp='cp /home/mouyong/.zshrc /root' | |
| alias des='cd ~/Desktop/' | |
| alias code='cd ~/Code/' | |
| alias gs='git status' | |
| alias gaa='git add .' | |
| alias gp='git push' |
NewerOlder