Skip to content

Instantly share code, notes, and snippets.

@kutyel
Last active February 16, 2017 11:10
Show Gist options
  • Save kutyel/fe0c2f0f0fdd414bf0465bf0974de44d to your computer and use it in GitHub Desktop.
Save kutyel/fe0c2f0f0fdd414bf0465bf0974de44d to your computer and use it in GitHub Desktop.
Output to the terminal an underground-like message!
#!/usr/bin/env node
const msg = process.argv.slice(2).join(' ').toUpperCase().concat(' '.repeat(20))
let index = -1
setInterval(() => {
index++
process.stdout.write(msg.slice(index).concat(msg.slice(0, index)))
process.stdout.cursorTo(0)
index >= msg.length - 1 && (index = -1)
}, 300)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment