Skip to content

Instantly share code, notes, and snippets.

@dasl-
Created October 13, 2022 01:29
Show Gist options
  • Save dasl-/161e8c4276a2df52c8ac47e77a6646e8 to your computer and use it in GitHub Desktop.
Save dasl-/161e8c4276a2df52c8ac47e77a6646e8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import sys
all_data = b''
while True:
data = sys.stdin.buffer.read(4096)
if not data:
break
sys.stdout.buffer.write(data)
all_data += data
while True:
sys.stdout.buffer.write(all_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment