Last active
August 29, 2015 13:56
-
-
Save bbuck/9244905 to your computer and use it in GitHub Desktop.
A personal rendition of the 'fuck you' rage quit console function (original here: https://gist.github.com/namuol/9122237)
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
function pidof() { | |
ps -Ac | grep -i $1 | awk '{ print $1 }' | |
} | |
function flip() { | |
perl -C3 -Mutf8 -lpe '$_=reverse;y/a-zA-Z.['\'',({?!\"<_;‿⁅∴\r/ɐqɔpǝɟƃɥıɾʞ|ɯuodbɹsʇnʌʍxʎzɐqɔpǝɟƃɥıɾʞ|ɯuodbɹsʇnʌʍxʎz˙],'\'')}¿¡,>‾؛⁀⁆∵\n/' <<< "$1" | |
} | |
function fuck() { | |
local to_kill=$(echo ${!#} | awk '{ print tolower($1) }') | |
if [ $(ps -Ac | grep -i $to_kill | wc -l) -gt 0 ]; then | |
kill -9 $(pidof $to_kill) | |
echo -e "\n (╯°□°)╯︵$(flip $to_kill)\n" | |
else | |
echo -e "\n (; ̄Д ̄) . o O( It’s not very effective... )\n" | |
fi | |
} |
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
pidof() { | |
ps -Ac | grep -i $1 | awk '{ print $1 }' | |
} | |
flip() { | |
perl -C3 -Mutf8 -lpe '$_=reverse;y/a-zA-Z.['\'',({?!\"<_;‿⁅∴\r/ɐqɔpǝɟƃɥıɾʞ|ɯuodbɹsʇnʌʍxʎzɐqɔpǝɟƃɥıɾʞ|ɯuodbɹsʇnʌʍxʎz˙],'\'')}¿¡,>‾؛⁀⁆∵\n/' <<< "$1" | |
} | |
fuck() { | |
local to_kill=$(echo ${@[$#]} | awk '{ print tolower($1) }') | |
if [ $(ps -Ac | grep -i $to_kill | wc -l) -gt 0 ]; then | |
kill -9 $(pidof $to_kill) | |
echo -e "\n (╯°□°)╯︵$(flip $to_kill)\n" | |
else | |
echo -e "\n (; ̄Д ̄) . o O( It’s not very effective... )\n" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment