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
### Keybase proof | |
I hereby claim: | |
* I am belfordz on github. | |
* I am belfordz (https://keybase.io/belfordz) on keybase. | |
* I have a public key ASCI6Pby_NvSKMw01bC0Z2VRoMuMfhcZdgxbX_nTsN4Ywwo | |
To claim this, I am signing this object: |
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
0x4cfF645187bF1E7d1d03c1392074bec65d1B501A |
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
0x6Bfc25A4e326c92520c5a648849F906aeA532A9d |
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 a = document.getElementsByTagName('img'); var b = []; for (var i = 0; i < a.length; i++) { if (a[i].src.indexOf('http') !== -1) { b.push(a[i].src); } } console.log(`["${b.join(',')}"]`); |
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
###* | |
* Mocks an asynchronous function that calls a callback on completion. It will setup a spy for you and call | |
* the callback immediately with the parameters provided (err and res). | |
* @param {Object} scope scope of the method to mock. Ex: fs = require("fs") | |
* @param {String} method name of the method to mock. Ex: "readFile" | |
* @param {Object} err first (error) parameter you want passed to the callback of the mocked function. | |
* Ex: to test the callback handler for the case where readFile has an error | |
* mockCb(fs, "readFile", new Error("readFile Error Test"), null) | |
* @param {Object} result second (result) parameter you want passed to the callback of the mocked function | |
* Ex: to test the callback handler for the case where readFile works as expected |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |