I hereby claim:
- I am valueof on github.
- I am antonkovalyov (https://keybase.io/antonkovalyov) on keybase.
- I have a public key whose fingerprint is 6BF4 15DC BC53 1C0C 9418 480B 0882 526B 2DC7 2A98
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
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' | |
} | |
}) |
<!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 | |
} | |
<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,'*')"> |
;; 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") |
// 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); |
{ | |
"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\": |
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 |
function bind(obj) { | |
let bound = {}; | |
for (let key in obj) { | |
bound[key] = typeof obj[key] === "function" ? obj[key].bind(obj) : obj[key]; | |
} | |
return bound; | |
} |
ProfilerPanel.prototype = { | |
stopProfiling: function () { | |
this.controller.isActive(function (err, isActive) { | |
if (err) { | |
Cu.reportError("ProfilerController.isActive: " + err.message); | |
return; | |
} | |
if (!isActive) { | |
return; |