A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| # Sublime package NVM node path configuration | |
| # Save this file in: | |
| # ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/node_env.py | |
| import os | |
| os.environ["PATH"] = "/Users/YOUR_USERNAME/.nvm/v0.10.26/bin:/Users/cranemes/.nvm/v0.10.26/lib:/Users/YOUR_USERNAME/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
| print("PATH=" + os.environ["PATH"]) |
| git init # 初始化本地git仓库(创建新仓库) | |
| git config --global user.name "xxx" # 配置用户名 | |
| git config --global user.email "xxx@xxx.com" # 配置邮件 | |
| git config --global color.ui true # git status等命令自动着色 | |
| git config --global color.status auto | |
| git config --global color.diff auto | |
| git config --global color.branch auto | |
| git config --global color.interactive auto | |
| git config --global --unset http.proxy # remove proxy configuration on git | |
| git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库 |
Debounce a function when you want it to execute only once after a defined interval of time. If the event occurs multiple times within the interval, the interval is reset each time.
Example A user is typing into an input field and you want to execute a function, such as a call to the server, only when the user stops typing for a certain interval, such as 500ms.
| require.config({ | |
| paths: { | |
| 'jquery.effect': '../vendors/jquery-ui/jquery.effect', | |
| 'jquery.effect-blind': '../vendors/jquery-ui/jquery.effect-blind', | |
| 'jquery.effect-bounce': '../vendors/jquery-ui/jquery.effect-bounce', | |
| 'jquery.effect-clip': '../vendors/jquery-ui/jquery.effect-clip', | |
| 'jquery.effect-drop': '../vendors/jquery-ui/jquery.effect-drop', | |
| 'jquery.effect-explode': '../vendors/jquery-ui/jquery.effect-explode', | |
| 'jquery.effect-fade': '../vendors/jquery-ui/jquery.effect-fade', | |
| 'jquery.effect-fold': '../vendors/jquery-ui/jquery.effect-fold', |
#Mac SSH or VPN 设置教程
This guide is written by @slaindev, the text editor is Mou
specially for @neolau & @ dinosaurshmily
##SSH 设置篇
###工具准备
| # Place this map directive inside the http block | |
| http { | |
| # Updated map directive with the latest regex | |
| map $http_user_agent $mobile_agent { | |
| default 0; | |
| "~*android.+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|iphone|ipod|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino" 1; | |
| "~*^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a\\ wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r\\ |s\\ )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1\\ u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp(\\ i| |
| // Transparent Background | |
| // From: http://stackoverflow.com/questions/6902944/sass-mixin-for-background-transparency-back-to-ie8 | |
| // Extend this class to save bytes | |
| .transparent-background { | |
| background-color: transparent; | |
| zoom: 1; | |
| } | |
| // The mixin |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |