Skip to content

Instantly share code, notes, and snippets.

@bmeck
Created January 22, 2021 16:43
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 bmeck/ad05992b1fed32a7eef95ae503fc96b0 to your computer and use it in GitHub Desktop.
Save bmeck/ad05992b1fed32a7eef95ae503fc96b0 to your computer and use it in GitHub Desktop.
# see the replacement character ( Buffer.from(new TextEncoder().encode('\u{fffd}')) ) instead
# https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character
node -e 'process.stdout.write("👌"[0]);setTimeout(() => {process.stdout.end("👌"[1]); process.exit()},3e3)' |
node -e '(async (s = "") => {for await (const a of process.stdin) {console.log(a); s+= a}; console.log(s)})()'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment