Skip to content

Instantly share code, notes, and snippets.

@mxamber
Last active April 4, 2020 14:32
Show Gist options
  • Save mxamber/5b34c56560b40a3f6b464e4fe48f96c5 to your computer and use it in GitHub Desktop.
Save mxamber/5b34c56560b40a3f6b464e4fe48f96c5 to your computer and use it in GitHub Desktop.
A little HTML/Javascript thingy that generates fake "stan Twitter" usernames.
<!doctype HTML>
<html>
<head>
<title>Stan Twitter Name Generator</title>
<style>
html {
background: #666;
}
#main {
box-sizing: border-box;
height: 50vh;
width: 60vw;
margin: auto;
margin-top: 25vh;
padding: 10vh;
background: rgb(255,167,182);
border-radius: 2vw;
box-shadow: 10px 10px 10px rgba(0,0,0,0.5);
line-height: 30vh;
font-size: 5vw;
text-align: center;
font-family: Segoe UI, sans-serif;
cursor: pointer;
user-select: none;
}
</style>
</head>
<body>
<div id="main" onclick="name()">CLICK HERE...</div>
<script>
var parts = [
"vampire",
"vampires",
"ghost",
"ghosts",
"king",
"kings",
"queen",
"queens",
"bones",
"zombies",
"corpse",
"dead",
"chemical",
"bat",
"crazy",
"mystic",
"berkeley",
"pistols",
"unicorn",
"streets",
"rat",
"rats",
"drive",
"leathered",
"faces",
"face",
"ink",
"written",
"plague",
"yung",
"sunshine",
"blasphemy",
"sorrow",
"bleach",
"haunted",
"disaster",
"low",
"slasher",
"massacre",
"stan",
"blood",
"witch",
"witches",
"warped",
"punk",
"punks",
"night",
"nights",
"crimson",
"horror",
"emo",
"smile",
"slytherin",
"legacy",
"vintage",
"bucky",
"mystery",
"magic",
"space",
"bug",
"writing",
"skeleton",
"closet",
"fire",
"fragile",
"bottom",
"top",
"tops",
"witcher",
"witchers",
"valentine",
"feather",
"feathers",
"exorcism",
"dreadful",
"black",
"silver",
"hardcore",
"disease",
"phantom",
"phantoms",
"killjoy",
"killjoys",
"razor",
"razors",
"mcr",
"mychem",
"fallen",
"toro",
"devotion",
"spooky",
"misery",
"bitch",
"bitches",
"ramones",
"used",
"neck",
"deep",
"broken",
"break",
"parade",
"revenge",
"knife",
"knives",
"bullets",
"danger",
"jetblack",
"demon",
"witchess",
"vinyl",
"ideal",
"dystopia",
"regret"
];
var names = [
"alex",
"connor",
"sam",
"aiden",
"hayley",
"brendon",
"bert",
"ray",
"mikey",
"gerard",
"frank",
"bob",
"jamie",
"james",
"quinn",
"awsten",
"danny",
"helena",
"lola",
"way",
"iero",
"bryar",
"gaskarth",
"wentz",
"stump",
"patrick",
"pete",
"knight"
];
function name() {
var result = "";
var properlength = false;
while(properlength == false)
{
var part1 = parts[Math.floor(Math.random() * parts.length)];
var part2 = "";
var differentparts = false;
while(differentparts == false) {
part2 = parts[Math.floor(Math.random() * parts.length)];
if(part2 != part1)
{
differentparts = true;
}
}
if(Math.random() > 0.85)
{
if(Math.random() > 0.5)
{
part1 = names[Math.floor(Math.random() * names.length)];
} else {
part2 = names[Math.floor(Math.random() * names.length)];
}
}
if(Math.random() > 0.8)
{
part1 = part1.charAt(0).toUpperCase() + part1.slice(1);
part2 = part2.charAt(0).toUpperCase() + part2.slice(1);
} else if(Math.random() > 0.8)
{
part1 = part1.toUpperCase();
part2 = part2.toUpperCase();
}
if(Math.random() > 0.85)
{
result = name1;
} else {
result = part1;
}
if(Math.random() > 0.7)
{
if(Math.random() > 0.7)
{
result += "_";
} else if(Math.random() > 0.5) {
result += "x";
} else {
result += Math.floor(Math.random() * 17.5) + "";
}
}
result += part2;
var altered = false;
while(altered != true)
{
if(Math.random() > 0.5)
{
result = result.replace("l", "I");
altered = true;
}
if(Math.random() > 0.85)
{
var match = result.match(/[^a^e^i^o^u][aeiou][^a^e^i^o^u]/);
result = result.replace(match[0], match[0][0] + "x" + match[0][2]);
altered = true;
}
if(Math.random() > 0.9)
{
result = result.replace("o", "x");
result = result.replace("O", "X");
altered = true;
}
if(Math.random() > 0.8)
{
if(Math.random() > 0.5)
{
result = "_" + result;
} else {
result = result + "_";
}
altered = true;
}
if(Math.random() > 0.95)
{
result += Math.floor(Math.random() * 100);
altered = true;
}
}
if(result.length <= 15)
{
properlength = true;
} else {
properlength = false;
}
}
document.getElementById("main").innerHTML = "@" + result;
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment