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
| // iterative | |
| function string_reverse_1(str) { | |
| var new_str = ""; | |
| for (var i = str.length - 1; i >= 0; i--) { | |
| new_str += str.charAt(i); | |
| } | |
| return new_str; | |
| } |
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
| // 直白一点的方法, 循环拼接字符串 | |
| function formatNumber(number, split) { | |
| var string = String(number); | |
| var split = split || 3; | |
| var newStr= new Array(string.length+ parseInt(string.length/split)); | |
| newStr[newStr.length-1]=string[string.length-1]; | |
| var currentIndex=string.length-1; | |
| for(var i = newStr.length-1;i >= 0;i--) | |
| { | |
| if((newStr.length-i)%(split+1)==0) |
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
| function y(){ | |
| var args = Array.prototype.slice.call(arguments); | |
| } |
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
| typeof {foo: 'bar'}; | |
| // "object" | |
| typeof ['foo', 'bar']; | |
| // "object" | |
| typeof "foobar"; | |
| // "string" | |
| typeof /foo|bar/; |
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
| upstream nodejs__upstream { | |
| server 127.0.0.1:3000; | |
| keepalive 64; | |
| } | |
| server { | |
| listen 80; | |
| server_name 192.168.1.60; | |
| location / { | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
| [user] | |
| name = leohxj | |
| email = [email protected] | |
| [alias] | |
| st = status | |
| l = log --pretty=oneline -n 20 --graph --abbrev-commit | |
| ll = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -- | |
| b = branch | |
| ci = commit | |
| ca = commit -a |
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
| if (event.stopPropagation) { | |
| event.stopPropagation(); | |
| } else { | |
| event.cancelBubble = true; | |
| } | |
| evnet.target = evnet.target || event.srcElement; |
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
| { | |
| transform: translate3d(0,0,0); | |
| } | |
| or | |
| { | |
| -webkit-backface-visibility: hidden; | |
| opacity: 0.999999; | |
| } |
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
| # 查看版本 | |
| npm info xxx version |
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
| tree . >> "tree.txt" |