Skip to content

Instantly share code, notes, and snippets.

@frankh
Forked from hay/gist:1351230
Last active November 17, 2017 17:06
Show Gist options
  • Save frankh/1503683ca335cd1ad5247f2c95e60e85 to your computer and use it in GitHub Desktop.
Save frankh/1503683ca335cd1ad5247f2c95e60e85 to your computer and use it in GitHub Desktop.
Arachnify your workflow model names!
<!doctype html>
<html>
<head>
<title></title>
<style>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;
font-weight: bold;
font-style: italic;
color: #999;
}
a {
color: #99f;
}
h1 {
font-size: 16px;
}
h2 {
font-size: 12px;
}
#word {
font-size: 36px;
color: black;
}
button {
font-size: 24px;
padding: 10px;
}
</style>
</head>
<body>
<h1>Arachnify your workflow model names!</h1>
<h2>By Frank Hamand</h2>
<p id="word"></p>
<button id="enterprise">Arachnify!</button>
<button id="again">Again</button>
<br /><br /><br />
<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="huskyr">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
<br /><br /><br />
<small><a href="https://gist.github.com/frankh/1503683ca335cd1ad5247f2c95e60e85">Fork this gist on Github to add your own words ;)</a></small>
<script>
var words = [
"Iteration", "Step", "Config", "Template",
"Result", "Search", "SearchResult",
"Integration", "AdverseTerms", "Report",
"StarredDocument", "ManualStep",
"BulkUpload", "StepConfig", "StepTemplate",
"Summary", "Tag", "Source",
"Engine", "Worker", "SearchWorker"
],
inWords = [
"Custom", "Curated", "Manual"
];
function $(id) {
return document.getElementById(id);
}
function rand(min, max) {
return Math.round(Math.random() * (max - min)) + min;
}
function generate(min, max) {
var allWords = words.concat( inWords ),
word = '';
for (var i = 0, l = rand(min, max) - 1; i < l; i++) {
do {
var w = allWords[ rand(0, allWords.length - 1) ];
} while (word.indexOf(w) !== -1);
word += w;
}
word += words[ rand(0, words.length) ];
return word;
}
$("again").onclick = function() {
$("word").innerHTML = "Workflow" + generate(1, 2);
$("enterprise").innerHTML = "Arachnify!";
}
$("enterprise").onclick = function() {
var word = $("word").innerHTML;
$("word").innerHTML = word + generate(1, 1);
$("enterprise").innerHTML = "Arachnify even more!";
}
$("word").innerHTML = "Workflow" + generate(1, 2);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment