Set up project:
mkdir project
cd project
npm init -y| 环境:shadowsocks、windows | |
| 本地ss端口设置(这里1080) | |
| cmd命令行:(不用socks5)(临时设置)(也可放置环境变量) | |
| set http_proxy=http://127.0.0.1:1080 | |
| set https_proxy=http://127.0.0.1:1080 | |
| ps:一定要用cmd命令行,千万别用powershell !!! | |
| 简易测试命令:curl https://www.google.com(别用ping) |
| var PENDING = 'pending' | |
| var SEALED = 'sealed' | |
| var FULFILLED = 'fulfilled' | |
| var REJECTED = 'rejected' | |
| var NOOP = function(){} | |
| function isArray(value) { | |
| return Object.prototype.toString.call(value) === '[object Array]' | |
| } |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| { | |
| "alt-require": true, | |
| "attr-lowercase": true, | |
| "attr-no-duplication": true, | |
| "attr-unsafe-chars": true, | |
| "attr-value-double-quotes": false, | |
| "attr-value-not-empty": false, | |
| "doctype-first": true, | |
| "doctype-html5": true, | |
| "head-script-disabled": true, |
| 1 普通匹配,遵循最长匹配规则,假设一个请求匹配到了两个普通规则,则选择匹配长度大的那个 | |
| 例如: | |
| location /{ | |
| [matches] | |
| } | |
| location /test{ | |
| [matches] | |
| } | |
| 2 精确匹配 | |
| location = /{ |
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |