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
| XPCOMUtils.defineLazyGetter(DebuggerController, "_isRemoteDebugger", function() { | |
| // We're inside a single top level XUL window, not an iframe container. | |
| return !(window.frameElement instanceof XULElement) && | |
| !!window._remoteFlag; | |
| }); | |
| XPCOMUtils.defineLazyGetter(DebuggerController, "_isChromeDebugger", function() { | |
| // We're inside a single top level XUL window, but not a remote debugger. | |
| return !(window.frameElement instanceof XULElement) && | |
| !window._remoteFlag; |
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
| ProfilerPanel.prototype = { | |
| stopProfiling: function () { | |
| this.controller.isActive(function (err, isActive) { | |
| if (err) { | |
| Cu.reportError("ProfilerController.isActive: " + err.message); | |
| return; | |
| } | |
| if (!isActive) { | |
| return; |
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
| function bind(obj) { | |
| let bound = {}; | |
| for (let key in obj) { | |
| bound[key] = typeof obj[key] === "function" ? obj[key].bind(obj) : obj[key]; | |
| } | |
| return bound; | |
| } |
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
| Original lyrics: http://rapgenius.com/Kendrick-lamar-maad-city-lyrics | |
| If Node peeps and Crock all got along | |
| They'd probably gun me down by the end of this song | |
| -- | |
| Seem like the whole codebase go against me | |
| Every time I run my tests I hear | |
| BUG BUG BUG BUG |
This file has been truncated, but you can view the full file.
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
| { | |
| "libs": "[{\"start\":4294967296,\"end\":4294979584,\"offset\":0,\"name\":\"/Users/akovalyov/Source/m-c/obj-x86_64-apple-darwin12.4.0/dist/Nightly.app/Contents/MacOS/firefox\",\"breakpadId\":\"0C7E05F5A08D3968AAFF4EC6D90CCBB80\"},{\"start\":140735650410496,\"end\":140735650414592,\"offset\":0,\"name\":\"/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa\",\"breakpadId\":\"1F77945CF37A3171B22EF7AB0FCBB4D40\"},{\"start\":140735473885184,\"end\":140735475036160,\"offset\":0,\"name\":\"/usr/lib/libobjc.A.dylib\",\"breakpadId\":\"90D31928F48D3E37874F220A51FD9E370\"},{\"start\":4294995968,\"end\":4295008256,\"offset\":0,\"name\":\"/System/Library/Frameworks/ExceptionHandling.framework/Versions/A/ExceptionHandling\",\"breakpadId\":\"47FF83ED0C07308CA3752A2189DB10560\"},{\"start\":4295024640,\"end\":4295110656,\"offset\":0,\"name\":\"/Users/akovalyov/Source/m-c/obj-x86_64-apple-darwin12.4.0/dist/Nightly.app/Contents/MacOS/libmozglue.dylib\",\"breakpadId\":\"9C919817F4B537CDA1AE3C178520D34C0\"},{\"start\": |
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
| // Candidate 1 | |
| JSON.parse(JSON.stringify(obj)); | |
| // Candidate 2 | |
| var desc = {}; | |
| Object.keys(obj).forEach(function(key) { | |
| desc[key] = Object.getOwnPropertyDescriptor(obj, key); | |
| }); | |
| Object.create(Object.prototype, desc); |
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
| ;; https://gist.github.com/antonkovalyov/8663025 | |
| {:+ { | |
| ;; The app tag is kind of like global scope. You assign behaviors that affect | |
| ;; all of Light Table here | |
| :app [(:lt.objs.style/set-skin "light")] | |
| ;; The editor tag is applied to all editors | |
| :editor [:lt.objs.editor/no-wrap | |
| (:lt.objs.style/set-theme "solarized-light") |
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
| <iframe id="myid" src="embed.html" onload="var i=document.querySelector('#myid'),a=i.id,s='style';window.addEventListener('message',function(e){var m=e.data.split(':');if(m[0] == a)i[s].height=m[1],i[s].width=m[2]});i.contentWindow.postMessage('yo:'+a,'*')"> |
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
| <!doctype html> | |
| <style>body {background-color: red; height: 500px; width: 500px;}</style> | |
| <script> | |
| window.addEventListener('message', function (ev) { | |
| var message = ev.data.split(':') | |
| if (message[0] != 'yo') { | |
| return | |
| } | |
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 iframe = document.querySelector('#myid') | |
| window.addEventListener('message', function (ev) { | |
| var message = ev.data.split(':') | |
| if (message[0] === iframe.id) { | |
| iframe.style.height = message[1] + 'px' | |
| iframe.style.width = message[2] + 'px' | |
| } | |
| }) |