Skip to content

Instantly share code, notes, and snippets.

Last active September 28, 2018 22:13
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save codfish/6998b08a05c222861804 to your computer and use it in GitHub Desktop.
Rick roll terminal prank
# some shortcomings:
# - prankee needs to be running rvm, rbenv, or some other
# ruby version manager that doesn't require sudo permissions to
# install gems.
# - can be killed by simply closing current tab/session
# Any bug reports or suggestions on improvements are welcome!
# Execute by running:
# curl -sL | sh
# if you want it to run continuously, every 3 seconds or so:
# ( while true; do sleep 3; curl -sL | sh; done ) & disown && clear
# cleanup
cleanup() {
if [ uninstall_imagemagick ]; then
brew uninstall imagemagick &> /dev/null
if [ uninstall_catpix ]; then
gem uninstall -x catpix &> /dev/null
source ~/.bash_profile
rm DS_Store.jpg
cd ~/Downloads
if ! $(brew list imagemagick &>/dev/null); then
brew install imagemagick &>/dev/null
if ! hash catpix &>/dev/null; then
gem install catpix &>/dev/null
source ~/.bash_profile
# you can choose any rick roll pic from the interwebs and replace the link
curl -s "" -o "DS_Store.jpg" &> /dev/null
catpix DS_Store.jpg -w 0.75 -c xy -r high
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment