-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
courtesy of claude
// Weird but identifiable Unicode character set (32 characters)
const weirdChars = "◐◑◒◓☰☱☲☳▲▼◆◇★☆♠♣♥♦⚀⚁⚂⚃⚄⚅☉☽☾ඞᕕᕗᕙᴥᴦᴧ";
const makeTripcodeClassic = (shaHex) => {
const chars = weirdChars;
const bytes = shaHex.match(/.{2}/g).map((hex) => parseInt(hex, 16));
let result = "";
for (let i = 0; i < 10; i++) {
result += chars[bytes[i] % 32];
}
return result;
};
// Example usage:
// const hash = "a1b2c3d4e5f6789012345678901234567890abcd";
// console.log(makeTripcodeClassic(hash)); // Output: ◐♠⚃☾ᕕᴥ◑♦⚁☱
Or maybe stratagems
// Helldivers 2 stratagem-style hash generator
const stratagemArrows = ["↑", "↓", "←", "→"];
const makeTripcodeStratagem = (shaHex, minLength = 4, maxLength = 8) => {
const bytes = shaHex.match(/.{2}/g).map((hex) => parseInt(hex, 16));
// Use first byte to determine length
const length = minLength + (bytes[0] % (maxLength - minLength + 1));
let result = "";
for (let i = 0; i < length; i++) {
const byteIndex = (i + 1) % bytes.length;
result += stratagemArrows[bytes[byteIndex] % 4];
}
return result;
};
// Alternative version with more arrow styles
const makeTripcodeStratagemFancy = (shaHex, minLength = 4, maxLength = 8) => {
// Mix of different arrow styles for more variety
const fancyArrows = ["↑", "↓", "←", "→", "⬆", "⬇", "⬅", "➡"];
const bytes = shaHex.match(/.{2}/g).map((hex) => parseInt(hex, 16));
const length = minLength + (bytes[0] % (maxLength - minLength + 1));
let result = "";
for (let i = 0; i < length; i++) {
const byteIndex = (i + 1) % bytes.length;
result += fancyArrows[bytes[byteIndex] % 8];
}
return result;
};
// Example usage:
// const hash = "a1b2c3d4e5f6789012345678901234567890abcd";
// console.log("Basic:", makeTripcodeStratagem(hash)); // Output: ←↑→↓←↑
// console.log("Fancy:", makeTripcodeStratagemFancy(hash)); // Output: ⬅⬆➡⬇⬅⬆
// Stratagem examples that might be generated:
// ↑↑↓↓←→←→ (Konami code vibes)
// →↓←↑→ (Simple 5-step)
// ↑→↓←↑→↓ (7-step complex)
// ←←↑→↓ (Quick 5-step)
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
Planning