-
-
Save holocronweaver/9127739 to your computer and use it in GitHub Desktop.
fuck it! - a bash alias that tosses your despised software out the window
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
Example, to kill the Thunderbird app: | |
# fuck thunderbird | |
(ノಠ益ಠ)ノ彡pɹıqɹǝpunɥʇ |
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
#!/usr/bin/env perl | |
# Flips piped input text use a symbol substitution table. | |
# Can also run on a file or an infinite loop from standard input. | |
# Created by Lars Noodén. | |
use strict; | |
use warnings; | |
use utf8; | |
binmode(STDOUT, ":utf8"); | |
my %flipTable = ( | |
"a" => "\x{0250}", | |
"b" => "q", | |
"c" => "\x{0254}", | |
"d" => "p", | |
"e" => "\x{01DD}", | |
"f" => "\x{025F}", | |
"g" => "\x{0183}", | |
"h" => "\x{0265}", | |
"i" => "\x{0131}", | |
"j" => "\x{027E}", | |
"k" => "\x{029E}", | |
"l" => "|", | |
"m" => "\x{026F}", | |
"n" => "u", | |
"o" => "o", | |
"p" => "d", | |
"q" => "b", | |
"r" => "\x{0279}", | |
"s" => "s", | |
"t" => "\x{0287}", | |
"u" => "n", | |
"v" => "\x{028C}", | |
"w" => "\x{028D}", | |
"x" => "x", | |
"y" => "\x{028E}", | |
"z" => "z", | |
"A" => "\x{0250}", | |
"B" => "q", | |
"C" => "\x{0254}", | |
"D" => "p", | |
"E" => "\x{01DD}", | |
"F" => "\x{025F}", | |
"G" => "\x{0183}", | |
"H" => "\x{0265}", | |
"I" => "\x{0131}", | |
"J" => "\x{027E}", | |
"K" => "\x{029E}", | |
"L" => "|", | |
"M" => "\x{026F}", | |
"N" => "u", | |
"O" => "o", | |
"P" => "d", | |
"Q" => "b", | |
"R" => "\x{0279}", | |
"S" => "s", | |
"T" => "\x{0287}", | |
"U" => "n", | |
"V" => "\x{028C}", | |
"W" => "\x{028D}", | |
"X" => "x", | |
"Y" => "\x{028E}", | |
"Z" => "z", | |
"." => "\x{02D9}", | |
"[" => "]", | |
"'" => ",", | |
"," => "'", | |
"(" => ")", | |
"{" => "}", | |
"?" => "\x{00BF}", | |
"!" => "\x{00A1}", | |
"\"" => ",", | |
"<" => ">", | |
"_" => "\x{203E}", | |
";" => "\x{061B}", | |
"\x{203F}" => "\x{2040}", | |
"\x{2045}" => "\x{2046}", | |
"\x{2234}" => "\x{2235}", | |
"\r" => "\n", | |
" " => " " | |
); | |
while ( <> ) { | |
my $string = reverse( $_ ); | |
while ($string =~ /(.)/g) { | |
print $flipTable{$1}; | |
} | |
print qq(\n); | |
} |
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
#!/usr/bin/env bash | |
# A bash alias which kills a program of a given name | |
# Usage: | |
# fuck thunderbird | |
# | |
# (ノಠ益ಠ)ノ彡pɹıqɹǝpunɥʇ | |
# | |
# Requires Perl script flip.pl (also included in this gist). Inspired by @louroboros. | |
fuck() { | |
pkill -9 $1 | |
if [[ $? -eq 0 ]]; then | |
echo | |
#echo -n " (ノಥ益ಥ)ノ彡" | |
#echo -n " (╯°□°)╯︵" | |
echo -n " (ノಠ益ಠ)ノ彡" | |
echo $1 | perl ~/scripts/flip.pl | |
echo | |
fi | |
#TODO add autocompletion | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment