(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| enum keys { | |
| a = 'a', | |
| b = 'b', | |
| } | |
| type mapping = { | |
| [keys.a]: boolean; | |
| [keys.b]: number; | |
| }; | |
| const values = { |
| /* Modified base on https://github.com/ncjones/zap-script-proxy-rewrite/blob/master/proxy-rewrite.js | |
| * Rewrite Zaproxy requests. | |
| * | |
| * Modify the "REWRITE_RULES" array below to contain your desired rewrite rules. | |
| * The first matched rule will be applied for any given message. | |
| * | |
| * A rewrite rule is an object with two methods: "matches" and "rewrite", both | |
| * of which require an HttpMessage as the only argument. The "matches" method | |
| * returns a boolean indicating if the rule matches the message. The "rewrite" | |
| * method rewrites the request by mutating the given message. See the Zaproxy |
| <!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 --> | |
| <html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa --> | |
| <head> | |
| <!-- 声明文档使用的字符编码 --> | |
| <meta charset='utf-8'> | |
| <!-- 优先使用 IE 最新版本和 Chrome --> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> | |
| <!-- 页面描述 --> | |
| <meta name="description" content="不超过150个字符"/> | |
| <!-- 页面关键词 --> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| find /usr/local/Cellar -regex '.*\.rb' -exec grep -r fails_with {} \; | |
| # then comment out lines with fails_with |
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io" | |
| "log" | |
| "mime/multipart" | |
| "net/http" | |
| "os" |
| import Vue from 'vue'; | |
| // 神策点击 | |
| Vue.directive('sc-click', { | |
| bind(el, binding) { | |
| el.sensorClickTrack = (evt) => { | |
| if (window.SC && !!binding.value) { | |
| // 如果返回false类类型则不记录 | |
| window.SC.track('click', binding.value); | |
| } |
| function createWorker(scriptString) { | |
| let blob; | |
| try { | |
| blob = new Blob(['onmessage=function(e) {console.log(e)}']); | |
| } catch (e) { // Backwards-compatibility | |
| window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; | |
| blob = new window.BlobBuilder(); | |
| blob.append(scriptString); | |
| blob = blob.getBlob(); | |
| } |