-
-
Save robey/561da04f7d1971a7e89b to your computer and use it in GitHub Desktop.
obligatory node port!
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
#!/usr/bin/env node | |
const SKULLS = [` | |
▒▒▒▒▒▒▒ | |
▒▒▓▓▓▓▓▓▓▓▓▓▓▒▒ | |
▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ | |
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ | |
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ | |
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ | |
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ | |
▒▓▓▓▓▓▓░ ░▓▓▓░ ░▓▓▓▓▓▓▒ | |
░▓▓▓▓░ ▒▓▒ ▓▓▓▓░ | |
▓▓▓▒ ▒▓▒ ▒▓▓▓ | |
▓▓▓▒ ▒▓▓▓▒ ▒▓▓▓ | |
░▓▓▓▓▒▒▓▓▓ ▓▓▓▒▒▓▓▓▓░ | |
░▓▓▓▓▓▓▓░ ░▓▓▓▓▓▓▓░ | |
▒▓▓▓▓▓▓▓▒▓▓▓▓▓▓▓▒ | |
▒▓░▓░▓░▓░▓░▓░▓▒ | |
▒▒▒ ▓▓▒▓ ▓ ▓ ▓ ▓▒▓▓ ▒▒▒ | |
▒▓▓▓▓ ▓▓▓▓▓▒▓▒▓▒▓▓▓ ▒▓▓▓▓ | |
▓▓▓▓▓▒▒ ░▓▓▓▓▓▓▓▓▓░ ▒▒▓▓▓▓▓▓ | |
▒▓▓▓▓▓▓▓▓▓▓▓▒▒ ░░░░░ ▒▒▒▒▓▓▓▓▓▓▓▓▓▓ | |
▓▓▓▓░░░▓▓▓▓▓▓▓▓▓▓▒▒▒ ▒▒▓▓▓▓▓▓▓▓▓░░░▓▓▓░ | |
▒▒▒ ░░▓▓▓▓▓▓▓▓▓▓▓▒▒ ░░▓░░░ | |
▒▒▒▒ ░░▓▓▓▓▓▓▓▓▓▓▒▒▒ | |
▒▓▓▓▒▒▒▓▓▓▓▓▓▓▓▓▒▒ ░░▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓▓ | |
▓▓▓▓▓▓▓▓▓▓░░░░ ░░▓▓▓▓▓▓▓▓▓▓▓░ | |
░▓▓▓▓▓░ ░░▓▓▓▓░░ | |
▓▓▓░ ▓▓▓▓░ | |
`, ` | |
▒▒▒▒▒▒▒ | |
▒▒▓▓▓▓▓▓▓▓▓▓▓▒▒ | |
▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ | |
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ | |
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ | |
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ | |
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒ | |
▒▓▓▓▓▓▓░ ░▓▓▓░ ░▓▓▓▓▓▓▒ | |
░▓▓▓▓░ ▒▓▒ ▓▓▓▓░ | |
▓▓▓▒ ▒▓▒ ▒▓▓▓ | |
▓▓▓▒ ▒▓▓▓▒ ▒▓▓▓ | |
░▓▓▓▓▒▒▓▓▓ ▓▓▓▒▒▓▓▓▓░ | |
░▓▓▓▓▓▓▓░ ░▓▓▓▓▓▓▓░ | |
▒▓▓▓▓▓▓▓▒▓▓▓▓▓▓▓▒ | |
▒▓░▓░▓░▓░▓░▓░▓▒ | |
▒▒▒ ▓▓▒▓ ▓ ▓ ▓ ▓▒▓▓ ▒▒▒ | |
▒▓▓▓▓ ▓▓▓▓▓▒▓▒▓▒▓▓▓ ▒▓▓▓▓ | |
▓▓▓▓▓▒▒ ░▓▓▓▓▓▓▓▓▓░ ▒▒▓▓▓▓▓▓ | |
▒▓▓▓▓▓▓▓▓▓▓▓▒▒ ░░░░░ ▒▒▒▒▓▓▓▓▓▓▓▓▓▓ | |
▓▓▓▓░░░▓▓▓▓▓▓▓▓▓▓▒▒▒ ▒▒▓▓▓▓▓▓▓▓▓░░░▓▓▓░ | |
▒▒▒ ░░▓▓▓▓▓▓▓▓▓▓▓▒▒ ░░▓░░░ | |
▒▒▒▒ ░░▓▓▓▓▓▓▓▓▓▓▒▒▒ | |
▒▓▓▓▒▒▒▓▓▓▓▓▓▓▓▓▒▒ ░░▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓▓ | |
▓▓▓▓▓▓▓▓▓▓░░░░ ░░▓▓▓▓▓▓▓▓▓▓▓░ | |
░▓▓▓▓▓░ ░░▓▓▓▓░░ | |
▓▓▓░ ▓▓▓▓░ | |
HA | |
`]; | |
function tick(onoff) { | |
process.stdout.write("\x1b[2J\x1b[H"); | |
(onoff ? SKULLS[1] : SKULLS[0]).split("\n").forEach(function (line) { process.stdout.write(line + "\n"); }); | |
process.stdout.write("\x1b[H"); | |
return !onoff; | |
} | |
function main() { | |
var onoff = false; | |
setInterval(function () { onoff = tick(onoff); }, 1.0); | |
} | |
main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment