Skip to content

Instantly share code, notes, and snippets.

@hay
Last active December 4, 2024 08:11

Revisions

  1. hay revised this gist Mar 29, 2024. 1 changed file with 9 additions and 24 deletions.
    33 changes: 9 additions & 24 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    <!doctype html>
    <html>
    <head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Enterprisify your Java Class Names! (by Hay Kranen)</title>
    <style>
    body {
    background: white;
    @@ -48,9 +50,6 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>

    <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/1351230">Fork this gist on Github to add your own words ;)</a></small>

    <script>
    @@ -102,40 +101,26 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    do {
    var w = allWords[ rand(0, allWords.length - 1) ];
    } while (word.indexOf(w) !== -1);
    word += w;
    word += `&shy;${w}`;
    }

    word += words[ rand(0, words.length) ];
    word += '&shy;' + words[ rand(0, words.length) ];

    return word;
    }

    $("again").onclick = function() {
    $("again").addEventListener('click', (e) => {
    $("word").innerHTML = generate(2, 3);
    $("enterprise").innerHTML = "Enterprisify!";
    }
    });

    $("enterprise").onclick = function() {
    $("enterprise").addEventListener('click', (e) => {
    var word = $("word").innerHTML;
    $("word").innerHTML = generate(1, 1) + word;
    $("enterprise").innerHTML = "Enterprisify even more!";
    }
    });

    $("word").innerHTML = generate(2, 3);
    </script>

    <script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-15405780-12']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    </script>
    </body>
    </html>
  2. hay revised this gist Nov 9, 2011. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -59,12 +59,12 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    "Method", "Configuration", "Exception", "Error", "Property", "Value",
    "Identifier", "Attribute", "Authentication", "Policy", "Container",
    "Order", "Info", "Parameter", "Request", "Adapter", "Bridge",
    "Decorator", "Facade", "Flyweight", "Proxy", "Worker",
    "Interpreter", "Iterator", "Mediator", "Observer",
    "Decorator", "Facade", "Proxy", "Worker",
    "Interpreter", "Iterator", "Observer",
    "State", "Strategy", "Template", "Comparator", "Clone", "Task",
    "Resolver", "Candidate", "Expression", "Predicate",
    "Thread", "Pool", "Descriptor", "Interceptor", "Definition",
    "Getter", "Setter", "Listener", "Proccessor", "Printer",
    "Getter", "Setter", "Listener", "Proccesor", "Printer",
    "Prototype", "Composer", "Event", "Helper", "Utils",
    "Invocation", "Exporter", "Importer", "Serializer", "Callback",
    "Tag", "Context", "Mapping", "Advisor", "Filter", "Field", "Test",
    @@ -138,4 +138,4 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>

    </script>
    </body>
    </html>
    </html>
  3. hay revised this gist Nov 9, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -71,7 +71,7 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    "Tests", "Connection", "Annotation", "Service", "Repository",
    "Stub", "Mock", "Instance", "Dispatcher", "Client", "Server",
    "Message", "Map", "List", "Collection", "Queue", "Manager",
    "Jdbc", "Database", "Reponse", "Broadcaster",
    "Database", "Reponse", "Broadcaster",
    "Watcher", "Schema", "Mapper", "Publisher", "Consumer", "Producer"
    ],
    inWords = [
    @@ -83,7 +83,7 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    "Readable", "Literal", "Reflective", "Scope", "Multipart", "Xml",
    "Generic", "Interface", "Advisable", "Observable", "Identifiable",
    "Iterable", "Distributed", "Notification", "Failure", "Type",
    "Http"
    "Http", "Jdbc"
    ];

    function $(id) {
  4. hay revised this gist Nov 9, 2011. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -69,7 +69,10 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    "Invocation", "Exporter", "Importer", "Serializer", "Callback",
    "Tag", "Context", "Mapping", "Advisor", "Filter", "Field", "Test",
    "Tests", "Connection", "Annotation", "Service", "Repository",
    "Stub", "Mock"
    "Stub", "Mock", "Instance", "Dispatcher", "Client", "Server",
    "Message", "Map", "List", "Collection", "Queue", "Manager",
    "Jdbc", "Database", "Reponse", "Broadcaster",
    "Watcher", "Schema", "Mapper", "Publisher", "Consumer", "Producer"
    ],
    inWords = [
    "Composite", "Invalid", "Supported", "Focus", "Traversal", "Abstract",
    @@ -78,7 +81,9 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    "Prepared", "Statement", "Remote", "Stateless", "Session",
    "Transaction", "Transactional", "Based", "Meta", "Data", "Jms",
    "Readable", "Literal", "Reflective", "Scope", "Multipart", "Xml",
    "Generic", "Interface", "Advisable", "Observable", "Identifiable"
    "Generic", "Interface", "Advisable", "Observable", "Identifiable",
    "Iterable", "Distributed", "Notification", "Failure", "Type",
    "Http"
    ];

    function $(id) {
  5. hay revised this gist Nov 9, 2011. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -107,11 +107,13 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>

    $("again").onclick = function() {
    $("word").innerHTML = generate(2, 3);
    $("enterprise").innerHTML = "Enterprisify!";
    }

    $("enterprise").onclick = function() {
    var word = $("word").innerHTML;
    $("word").innerHTML = generate(2, 4) + word;
    $("word").innerHTML = generate(1, 1) + word;
    $("enterprise").innerHTML = "Enterprisify even more!";
    }

    $("word").innerHTML = generate(2, 3);
  6. hay revised this gist Nov 9, 2011. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -68,7 +68,8 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    "Prototype", "Composer", "Event", "Helper", "Utils",
    "Invocation", "Exporter", "Importer", "Serializer", "Callback",
    "Tag", "Context", "Mapping", "Advisor", "Filter", "Field", "Test",
    "Tests", "Connection"
    "Tests", "Connection", "Annotation", "Service", "Repository",
    "Stub", "Mock"
    ],
    inWords = [
    "Composite", "Invalid", "Supported", "Focus", "Traversal", "Abstract",
    @@ -77,7 +78,7 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    "Prepared", "Statement", "Remote", "Stateless", "Session",
    "Transaction", "Transactional", "Based", "Meta", "Data", "Jms",
    "Readable", "Literal", "Reflective", "Scope", "Multipart", "Xml",
    "Generic", "Interface"
    "Generic", "Interface", "Advisable", "Observable", "Identifiable"
    ];

    function $(id) {
  7. hay revised this gist Nov 9, 2011. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -55,12 +55,12 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>

    <script>
    var words = [
    "Factory", "Bean", "Wrapper", "Interface", "Visitor", "Model", "Singleton",
    "Factory", "Bean", "Wrapper", "Visitor", "Model", "Singleton",
    "Method", "Configuration", "Exception", "Error", "Property", "Value",
    "Identifier", "Attribute", "Authentication", "Policy", "Container",
    "Order", "Info", "Parameter", "Request", "Adapter", "Bridge",
    "Decorator", "Facade", "Flyweight", "Proxy", "Worker",
    "Interpreter", "Iterator", "Mediator", "Memento", "Observer",
    "Interpreter", "Iterator", "Mediator", "Observer",
    "State", "Strategy", "Template", "Comparator", "Clone", "Task",
    "Resolver", "Candidate", "Expression", "Predicate",
    "Thread", "Pool", "Descriptor", "Interceptor", "Definition",
    @@ -77,7 +77,7 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    "Prepared", "Statement", "Remote", "Stateless", "Session",
    "Transaction", "Transactional", "Based", "Meta", "Data", "Jms",
    "Readable", "Literal", "Reflective", "Scope", "Multipart", "Xml",
    "Generic"
    "Generic", "Interface"
    ];

    function $(id) {
  8. hay revised this gist Nov 9, 2011. 1 changed file with 12 additions and 2 deletions.
    14 changes: 12 additions & 2 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -63,11 +63,21 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    "Interpreter", "Iterator", "Mediator", "Memento", "Observer",
    "State", "Strategy", "Template", "Comparator", "Clone", "Task",
    "Resolver", "Candidate", "Expression", "Predicate",
    "Thread", "Pool", "Descriptor"
    "Thread", "Pool", "Descriptor", "Interceptor", "Definition",
    "Getter", "Setter", "Listener", "Proccessor", "Printer",
    "Prototype", "Composer", "Event", "Helper", "Utils",
    "Invocation", "Exporter", "Importer", "Serializer", "Callback",
    "Tag", "Context", "Mapping", "Advisor", "Filter", "Field", "Test",
    "Tests", "Connection"
    ],
    inWords = [
    "Composite", "Invalid", "Supported", "Focus", "Traversal", "Abstract",
    "Transformer", "Common", "Concrete", "Autowire"
    "Transformer", "Common", "Concrete", "Autowire", "Simple", "Aware",
    "Aspect", "Principal", "Driven", "Interruptible", "Batch",
    "Prepared", "Statement", "Remote", "Stateless", "Session",
    "Transaction", "Transactional", "Based", "Meta", "Data", "Jms",
    "Readable", "Literal", "Reflective", "Scope", "Multipart", "Xml",
    "Generic"
    ];

    function $(id) {
  9. hay revised this gist Nov 9, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -38,7 +38,7 @@
    </head>
    <body>

    <h1>The Infamous Java Class Name Generator</h1>
    <h1>Enterprisify your Java Class Names!</h1>
    <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>

    <p id="word"></p>
  10. hay revised this gist Nov 9, 2011. 1 changed file with 41 additions and 17 deletions.
    58 changes: 41 additions & 17 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,11 @@
    font-size: 36px;
    color: black;
    }

    button {
    font-size: 24px;
    padding: 10px;
    }
    </style>
    </head>
    <body>
    @@ -38,7 +43,8 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>

    <p id="word"></p>

    <button id="again">Again?</button>
    <button id="enterprise">Enterprisify!</button>
    <button id="again">Again</button>

    <br /><br /><br />

    @@ -48,34 +54,37 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    <small><a href="https://gist.github.com/1351230">Fork this gist on Github to add your own words ;)</a></small>

    <script>
    var words = [
    var words = [
    "Factory", "Bean", "Wrapper", "Interface", "Visitor", "Model", "Singleton",
    "Method", "Configuration", "Exception", "Error", "Property", "Value",
    "Method", "Configuration", "Exception", "Error", "Property", "Value",
    "Identifier", "Attribute", "Authentication", "Policy", "Container",
    "Order", "Info", "Parameter", "Request", "Adapter", "Bridge",
    "Composite", "Decorator", "Facade", "Flyweight", "Proxy",
    "Decorator", "Facade", "Flyweight", "Proxy", "Worker",
    "Interpreter", "Iterator", "Mediator", "Memento", "Observer",
    "State", "Strategy", "Template", "Comparator", "Clone"
    "State", "Strategy", "Template", "Comparator", "Clone", "Task",
    "Resolver", "Candidate", "Expression", "Predicate",
    "Thread", "Pool", "Descriptor"
    ],
    inWords = [
    "Not", "Invalid", "Supported", "Focus", "Traversal", "Abstract", "In",
    "Is", "Transformer"
    "Composite", "Invalid", "Supported", "Focus", "Traversal", "Abstract",
    "Transformer", "Common", "Concrete", "Autowire"
    ];

    function $(id) {
    return document.getElementById(id);
    }

    function rand(min, max) {
    return Math.floor(Math.random() * (max - min)) + min;
    return Math.round(Math.random() * (max - min)) + min;
    }

    function generate() {
    function generate(min, max) {
    var allWords = words.concat( inWords ),
    word = '';

    for (var i = 0, l = rand(6, 8); i < l; i++) {
    for (var i = 0, l = rand(min, max) - 1; i < l; i++) {
    do {
    var w = allWords[ rand(0, allWords.length) ];
    var w = allWords[ rand(0, allWords.length - 1) ];
    } while (word.indexOf(w) !== -1);
    word += w;
    }
    @@ -85,15 +94,30 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    return word;
    }

    function go() {
    $("word").innerHTML = generate();
    $("again").onclick = function() {
    $("word").innerHTML = generate(2, 3);
    }

    $("again").onclick = function() {
    window.location = window.location;
    $("enterprise").onclick = function() {
    var word = $("word").innerHTML;
    $("word").innerHTML = generate(2, 4) + word;
    }

    go();
    $("word").innerHTML = generate(2, 3);
    </script>

    <script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-15405780-12']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    </script>
    </body>
    </html>
    </html>
  11. hay revised this gist Nov 9, 2011. 1 changed file with 4 additions and 5 deletions.
    9 changes: 4 additions & 5 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -48,20 +48,19 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>
    <small><a href="https://gist.github.com/1351230">Fork this gist on Github to add your own words ;)</a></small>

    <script>
    var words = [
    "Factory", "Bean", "Wrapper", "Interface", "Model", "Singleton",
    "Method", "Configuration", "Exception", "Error",
    var words = [
    "Factory", "Bean", "Wrapper", "Interface", "Visitor", "Model", "Singleton",
    "Method", "Configuration", "Exception", "Error", "Property", "Value",
    "Identifier", "Attribute", "Authentication", "Policy", "Container",
    "Order", "Info", "Parameter", "Request", "Adapter", "Bridge",
    "Composite", "Decorator", "Facade", "Flyweight", "Proxy",
    "Interpreter", "Iterator", "Mediator", "Memento", "Observer",
    "State", "Strategy", "Template"
    "State", "Strategy", "Template", "Comparator", "Clone"
    ],
    inWords = [
    "Not", "Invalid", "Supported", "Focus", "Traversal", "Abstract", "In",
    "Is", "Transformer"
    ];

    function $(id) {
    return document.getElementById(id);
    }
  12. hay revised this gist Nov 9, 2011. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,11 @@
    font-family: Georgia, serif;
    font-weight: bold;
    font-style: italic;
    color: #999;
    }

    a {
    color: #99f;
    }

    h1 {
    @@ -21,7 +26,8 @@
    }

    #word {
    font-size: 30px;
    font-size: 36px;
    color: black;
    }
    </style>
    </head>
    @@ -38,8 +44,8 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>

    <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 />
    <a href="https://gist.github.com/1351230">Fork this gist on Github to add your own words ;)</a>
    <br /><br /><br />
    <small><a href="https://gist.github.com/1351230">Fork this gist on Github to add your own words ;)</a></small>

    <script>
    var words = [
  13. hay revised this gist Nov 9, 2011. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -38,6 +38,9 @@ <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>

    <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 />
    <a href="https://gist.github.com/1351230">Fork this gist on Github to add your own words ;)</a>

    <script>
    var words = [
    "Factory", "Bean", "Wrapper", "Interface", "Model", "Singleton",
  14. hay created this gist Nov 9, 2011.
    91 changes: 91 additions & 0 deletions gistfile1.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,91 @@
    <!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;
    }

    h1 {
    font-size: 16px;
    }

    h2 {
    font-size: 12px;
    }

    #word {
    font-size: 30px;
    }
    </style>
    </head>
    <body>

    <h1>The Infamous Java Class Name Generator</h1>
    <h2>By <a href="http://www.haykranen.nl">Hay Kranen</a></h2>

    <p id="word"></p>

    <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>

    <script>
    var words = [
    "Factory", "Bean", "Wrapper", "Interface", "Model", "Singleton",
    "Method", "Configuration", "Exception", "Error",
    "Identifier", "Attribute", "Authentication", "Policy", "Container",
    "Order", "Info", "Parameter", "Request", "Adapter", "Bridge",
    "Composite", "Decorator", "Facade", "Flyweight", "Proxy",
    "Interpreter", "Iterator", "Mediator", "Memento", "Observer",
    "State", "Strategy", "Template"
    ],
    inWords = [
    "Not", "Invalid", "Supported", "Focus", "Traversal", "Abstract", "In",
    "Is", "Transformer"
    ];

    function $(id) {
    return document.getElementById(id);
    }

    function rand(min, max) {
    return Math.floor(Math.random() * (max - min)) + min;
    }

    function generate() {
    var allWords = words.concat( inWords ),
    word = '';

    for (var i = 0, l = rand(6, 8); i < l; i++) {
    do {
    var w = allWords[ rand(0, allWords.length) ];
    } while (word.indexOf(w) !== -1);
    word += w;
    }

    word += words[ rand(0, words.length) ];

    return word;
    }

    function go() {
    $("word").innerHTML = generate();
    }

    $("again").onclick = function() {
    window.location = window.location;
    }

    go();
    </script>
    </body>
    </html>