This file contains 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 printer(){for (var obj in this) {console.log("this." + obj + ": " + this[obj])}} | |
printer(); |
This file contains 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 heartbeat = window.setTimeout(function(){window.location = window.location}, 10000) |
This file contains 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 foo(value){ return /.*=.*=>.{/.exec(value) ? /.*=>.{/.exec(value).toString() : false} | |
function bar(value){ return value } | |
function baz(value){ return String("SearchViewModel." + value).trim().replace(/[\s=>{}]/g,"")} | |
var arrows = document.querySelector("pre").innerText.split("\n").map(foo).filter(bar) | |
var stubs = arrows.map(baz) | |
window.stubs = stubs; |
This file contains 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 foo = 'window.name'.replace('.', '":{"').replace(/^/,'{"').replace(/$/,'":""}}') |
This file contains 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
document.querySelector(".Popover, .fullBanner").setAttribute("style", "display:none") |
This file contains 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 mapper(value) { | |
value.disabled = true; | |
} | |
Array.from(document.styleSheets).map(mapper); |
This file contains 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 data = [{"keyword": "foo"}, {"keyword": "bar"}, {"keyword": "baz"}]; | |
var matchObject = {keyword:'baz', index: 0}; | |
var matchArray = data.filter(function(value, index) {return value.keyword === matchObject.keyword }); | |
var index = 0; | |
var result = []; |
This file contains 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
# | |
# Specify System Administrator credentials | |
# that will login to Salesforce to retrieve the metadata. | |
# | |
# You will also need the security token. | |
# | |
# The server url is which instance to connect to: | |
# For sandboxes, use https://test.salesforce.com | |
# For production or developer orgs, use https://login.salesforce.com | |
# |
This file contains 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
@media handheld { @import handheld.css } | |
@media test { @import test.css } | |
var baseURL = !!page_config.url.cdn ? page_config.url.cdn + "/cdn/mysite/" : "" | |
var ie = "onpropertychange" in document; | |
var browsermap = { "true": ie_param, "false": w3_param }; | |
var w3_param = [".addEventListener","\u0022DOMAttrModified\u0022",",false"]; | |
var ie_param = [".attachEvent","\u0022onpropertychange\u0022",""]; | |
var result = "document.getElementById(\u0022foo\u0022)".concat(browsermap[ie][0], "(", browsermap[ie][1], ",bar", browsermap[ie][2], ")"); |
This file contains 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
Mistake: | |
var selector = ("'$greetings' '$friend'").replace(/\$([^']+)/g, dict[RegExp.$1]) | |
Correction: | |
var selector = ("'$greetings' '$friend'").replace(/\$([^']+)/g, expand) | |
function expand(match, offset, fullstring) | |
{ | |
... | |
} |