A force-directed graph using images as nodes, with accompanying text labels.
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
zip -0Xq my-book.epub mimetype | |
zip -Xr9Dq my-book.epub * |
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 obj = { | |
a: 1, | |
get b(){ return 2 }, | |
c: 3 | |
} | |
Object.defineProperty(obj, 'c', {configurable: false, writable: false}); | |
function clone(o){ | |
var c = Object.create(Object.getPrototypeOf(o)); |
Reviewing this version
Which browsers are targeted?
Would you consider making an AMD or UMD module instead of exporting to the global?
Copyright legislation in most countries provide content producers and distributors with the right to decide how what they've created is expected to be distributed. They can put any sort of restriction, like expect that if people share it, the work has to be shared unmodified. Another restriction would to credit the author when sharing, etc.
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 win = gBrowser.selectedBrowser.contentWindow; | |
var console = win.console; | |
var P = Object.getPrototypeOf; | |
Components.utils.import("resource://gre/modules/jsdebugger.jsm").addDebuggerToGlobal(this); | |
//console.log(Debugger) | |
var dbg = new Debugger(); | |
var dbgwin = dbg.addDebuggee(win) | |
//console.log(dbgwin) |
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 moveItems = (function(){ | |
var todoNode = 0; | |
var todoLink = 0; | |
var MAX_NODES = 240; | |
var MAX_LINKS = MAX_NODES/2; | |
var restart = false; | |
function moveSomeNodes(){ | |
var n; |
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 MAX = 10; | |
var times = []; | |
var now = performance.now.bind(performance) | |
for(var i=0; i<MAX; i++){ | |
setTimeout(function f(){ | |
times.push(now()); | |
}, 0); | |
} |
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(global){ | |
"use strict"; | |
function constEnumPropValueDesc(v){ | |
return { | |
value: v, | |
enumerable: true, | |
configurable: false, | |
writable: false | |
}; |