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
// html | |
{@html:Template { | |
id: "fareFamilies", | |
type:"div", | |
classpath: "my.path.Template" | |
}/} | |
// aria | |
{@aria:Template { | |
id : "fareFamilies", | |
defaultTemplate : "my.path.Template" |
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
(\n(?: {2})+) ([^\s]) | |
$1$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
function screenshot(win) { | |
let canvas = win.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); | |
let width = win.innerWidth; | |
let height = win.innerHeight; | |
canvas.mozOpaque = true; | |
canvas.width = width; | |
canvas.height = height; | |
let ctx = canvas.getContext("2d"); | |
ctx.drawWindow(win, win.scrollX, win.scrollY, width, height, "#fff"); | |
info("Screenshot:" + canvas.toDataURL()); |
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
/* Any copyright is dedicated to the Public Domain. | |
http://creativecommons.org/publicdomain/zero/1.0/ */ | |
"use strict"; | |
/** | |
* Tests if Copy as cURL works. | |
*/ | |
const EXPECTED_POSIX_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
var rand = function (base) { | |
base = base || 1; | |
return (Math.random() * base) | 0; | |
}; | |
var pad = function (str) { | |
if (str.length == 1) { | |
return "0" + str; | |
} | |
return str; |
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
https://www.googleapis.com/freebase/v1/text/en/bob_dylan |
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
╔═════════════════════════════════════════════════════════════════════════════════╗ | |
║ How to load/import a file in Firefox Devtools ? ║ | |
╚═════════════════════════════════════════════════════════════════════════════════╝ | |
╔════════════════════════╗ | |
║ SYNC FILE LOADING ║ | |
╚════════════════════════╝ | |
┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┌───────────────────────────────┐ |
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* testYield() { | |
console.log("#1"); | |
yield new Promise(r => setTimeout(r, 2000)); | |
console.log("#2"); | |
yield new Promise(r => setTimeout(r, 2000)); | |
console.log("#3"); | |
return; |
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
decodePiskelFile : function (rawPiskel, onSuccess, onError) { | |
try { | |
var serializedPiskel = JSON.parse(rawPiskel); | |
var piskel = serializedPiskel.piskel; | |
pskl.utils.serialization.Deserializer.deserialize(serializedPiskel, function (piskel) { | |
onSuccess(piskel); | |
}); | |
} catch (e) { | |
var layers = []; | |
var isInLayer = false; |
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 export_to_unit8_t_rot = function () { | |
var HTML_NEW_LINE = '
'; | |
var width = pskl.app.piskelController.getWidth(); | |
var height = pskl.app.piskelController.getHeight(); | |
var frameCount = pskl.app.piskelController.getFrameCount(); | |
if (frameCount > 1) { | |
console.error('This export only supports one frame'); | |
} |