Skip to content

Instantly share code, notes, and snippets.

@robey
Forked from rhwlo/curses_skull.py
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robey/561da04f7d1971a7e89b to your computer and use it in GitHub Desktop.
Save robey/561da04f7d1971a7e89b to your computer and use it in GitHub Desktop.
obligatory node port!
#!/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