Skip to content

Instantly share code, notes, and snippets.

@Turbler
Last active July 5, 2022 09:35
Show Gist options
  • Save Turbler/1a1e8670f34064ed95a047950eb6fc06 to your computer and use it in GitHub Desktop.
Save Turbler/1a1e8670f34064ed95a047950eb6fc06 to your computer and use it in GitHub Desktop.
def printen(string):
print(string, end="")
def printanimatestaggered(string,animation,stagger):
i=0
printen(f'''<div style="background:black; margin:-2em -1em;padding: 2em;color:white;animation-name:{animation};animation-duration:0ms;animation-iteration-count:1;animation-timing-function:step-end;display:inline-block;animation-fill-mode:both;font-family:monospace;">''')
printen('''<div style="display:inline-block;animation:inherit;">''')
for char in string:
i+=1
if char ==" ":
printen('''</div> <div style="display:inline-block;animation:inherit;">''')
elif char=="|":
pass
else:
printen(f'''<div style ="animation:inherit;display:inline-block;animation-delay:{stagger*i}ms;">{char}</div>''')
printen("</div></div>")
def printbg(string):
printen('''<div style="background:black; margin:-2em -1em;padding: 2em;color:white;font-family:monospace;">''')
printen(string)
printen('''</div>''')
printbg('''HATE. LET ME TELL YOU HOW MUCH I'VE COME TO HATE YOU SINCE I BEGAN TO LIVE. <div style="vertical-align:sub;display:inline-block;height:1.2em;width:1ch;background-color:white;animation-name:slideupleft;animation-duration:1600ms;animation-iteration-count:infinite;animation-timing-function:steps(2, jump-none);"></div>''')
printen("\n\n---\n\n")
printanimatestaggered("THERE ARE 387.44 MILLION MILES OF PRINTED CIRCUITS IN WAFER THIN LAYERS THAT FILL MY COMPLEX.|| IF THE WORD HATE WAS ENGRAVED ON EACH NANOANGSTROM OF THOSE HUNDREDS OF MILLIONS OF MILES IT WOULD NOT EQUAL ONE ONE-|BILLIONTH OF THE HATE I FEEL FOR HUMANS AT THIS MICRO-|INSTANT FOR YOU.|| H|A|T|E|.||| H||A||T||E||.","slideupleft",80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment