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
'{"handle-uid":"kaelaAhGMyguezAcCpdBw","handle-initialized":"true","handle-number-tone":"false","handle-colorblind":"false","debug":"honey:core-sdk:*","handle-check-assist":"true","handle-tries-meta":"{\\"30\\":{\\"tries\\":[\\"王八犊子\\",\\"地大物博\\",\\"地动山摇\\"],\\"start\\":1643530525989,\\"hint\\":true,\\"passed\\":true,\\"end\\":1643531129278,\\"sent\\":true},\\"31\\":{\\"tries\\":[\\"蜜雪冰城\\",\\"肛门干燥\\",\\"纸上谈兵\\"],\\"hint\\":true},\\"34\\":{\\"tries\\":[\\"提前射精\\",\\"深入浅出\\",\\"气势如虹\\",\\"好为人师\\",\\"虎进猴山\\",\\"虎吃冰沙\\",\\"虎赠花生\\",\\"虎父亲生\\",\\"虎虎风生\\"]},\\"35\\":{\\"tries\\":[\\"虎啸风生\\",\\"如狼似虎\\",\\"放狗追虎\\",\\"绿猫黄虎\\",\\"如虎似狼\\",\\"购虎防驴\\",\\"大虎藏林\\",\\"卧虎藏龙\\"],\\"start\\":1643961600384,\\"passed\\":true,\\"end\\":1643964743921,\\"sent\\":true},\\"36\\":{\\"tries\\":[\\"力不从心\\",\\"扶她那里\\",\\"虎皮青椒\\",\\"虎啸山庄\\",\\"虎弟弯叔\\",\\"虎势堪忧\\",\\"虎视眈眈\\"],\\"start\\":1644049142705,\\"hint\\":true,\\"passed\\":true,\\"end\\":1644050138547,\\"sent\\":true},\\"37\\":{\\"tries\\":[\\"骑虎难下\\",\\"江河日下\\",\\"瓜田李下\\"],\\"duratio |
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
const assertEqual = (a, b, opt_msg) => { | |
if (a !== b) { | |
throw new RangeError((opt_msg || 'Assertion failed') + ' (expected: ' + b + '; actual: ' + a + ')'); | |
} | |
}; | |
const verifyWords = words => { | |
const lines = words.split('\n').filter(_ => _).map(_ => _.trim()); | |
assertEqual(lines.shift(), 'Word,Difficulty (1 - 3),Dirtyness (1 - 3)'); |
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
#!/usr/bin/env node | |
var DOMParser = require('xmldom').DOMParser; | |
var fs = require("fs"); | |
var file = fs.readFileSync(process.argv[2], 'utf-8'); | |
var doc = new DOMParser().parseFromString(file, 'text/xml'); | |
var regex = /^\s*translate\( *(-?\d+\.?\d*) *, *(-?\d+\.?\d*) *\)\s*$/; | |
// pass 1: remove IDs |
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 () { | |
var buffer = []; | |
window.addEventListener('error', function (ee) { | |
addResult({ | |
source: 'window.onerror', | |
stack: ee.error ? ee.error.stack : (ee.filename + ':' + ee.lineno + ':' + ee.colno), | |
message: ee.message | |
}); | |
}); | |
['error', 'warn', 'log', 'info'].map(function (verb) { |
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
#!/usr/bin/phantomjs | |
var fs = require('fs'); | |
var system = require('system'); | |
var webPage = require('webpage'); | |
var args = system.args; | |
if (args.length != 4) { | |
console.error('ERROR: Please specify 3 arguments: [input svg file], [res directory] and [output image width (mdpi)].'); |
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
/** | |
* @param{HTMLElement} root | |
* @param{number} prettyPrint - indent width; 0 for no pretty-print | |
* @param{string} func - the name of the function to be called. for example, "Dom.$" | |
* @param{boolean} allVar - name all elements as variables | |
* @param{boolean} omitSpace - trim all text nodes | |
*/ | |
var toDom$ = function (root, prettyPrint, func, allVar, omitSpace) { | |
var table = []; |
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
; P01 - general version for lists and vectors | |
(defn p01 [l] | |
(let [n (next l)] | |
(if (nil? n) (first l) (recur n)) | |
) | |
) | |
; P01 - use destructing assignment, works for lists and vectors | |
(defn p01' [l] | |
(let [[head & rest] l] |
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> | |
<head> | |
<link rel="stylesheet" type="text/css" href="http://bootswatch.com/paper/bootstrap.min.css" /> | |
<style type="text/css"> | |
.template { | |
display: none; | |
} | |
</style> | |
<script type="text/javascript"> | |
var add, addListeners, conf, getColor, getGray, init, initconfAndSetListeners, mathWrapX, maxOfArray, minOfArray, randShift, reAssign, reRender, toArray; |
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
// ==UserScript== | |
// | |
//Displayable Name of your script | |
// @name Postimg handler | |
// @include *extreme-board.com/* | |
// | |
// ==/UserScript== | |
function get_further(rt) { | |
var mt = /<img[^<>]*src='([^<>']+)'[^<>]*\/>/; |