Last active
January 27, 2025 09:45
-
-
Save mendhak/b4302d1a546053ae528b3151423dde0d to your computer and use it in GitHub Desktop.
Bash function to convert text to spongebob mocking text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just add this to .bashrc | |
# then call | |
# spongebob We are all a family | |
function spongebob() { export MOCKIFY="$@"; python3 -c "import os;import random;print(''.join(random.choice((str.upper, str.lower))(letter) for letter in os.getenv('MOCKIFY')))"; } | |
# function spongebob() { export MOCKIFY="$@"; python3 -c "import os;import random; print(''.join( [ x.upper() if random.randint(0,1) else x for x in os.getenv('MOCKIFY') ] ))"; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment