Skip to content

Instantly share code, notes, and snippets.

@mendhak
Last active January 27, 2025 09:45
Show Gist options
  • Save mendhak/b4302d1a546053ae528b3151423dde0d to your computer and use it in GitHub Desktop.
Save mendhak/b4302d1a546053ae528b3151423dde0d to your computer and use it in GitHub Desktop.
Bash function to convert text to spongebob mocking text
# 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