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
const matcher = /\[([^\[\]]+)\]/g | |
function randomInArray(arr) { return arr[Math.floor(Math.random() * arr.length)] } | |
export default function generate(concepts, concept, maxCycles = 10, seen = {}) { | |
if(!concepts[concept]) { | |
return `{error: unknown concept "${concept}"}` | |
} | |
return randomInArray(concepts[concept]) | |
.replace(matcher, (_, nextConcept) => { |
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> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title>avre</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style type="text/css"> | |
.squiggle { |
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
// ==UserScript== | |
// @name Unity Documentation Helper | |
// @namespace http://twitter.com/doam | |
// @version 0.15 | |
// @description Tweak Unity docs to show API names and search queries in the title. | |
// @match http://docs.unity3d.com/ScriptReference/*.html* | |
// @match file:///*/Unity/Editor/Data/Documentation/*/ScriptReference/*.html* | |
// @copyright 2013-2015 six | |
// ==/UserScript== |
NewerOlder