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
# POSIX Compatible | |
# Remove leading and trailing spaces and dashes | |
# also zsh compatible | |
echo " - - Esperança do vôo do avião - - " | iconv -t ascii//TRANSLIT | sed -E 's/[~\^]+//g' | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+\|-+$//g' | sed -E 's/^-+//g' | sed -E 's/-+$//g' | tr A-Z a-z |
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
sudo apt remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
sudo apt install liblua5.1-dev luajit libluajit-5.1 python3-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev | |
#Optional: so vim can be uninstalled again via `dpkg -r vim` | |
sudo apt install checkinstall | |
sudo rm -rf /usr/local/share/vim /usr/bin/vim | |
cd ~/tools |
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
# based on http://stackoverflow.com/questions/6470428/catch-multiple-exceptions-in-one-line-except-block | |
class ValidationError(Exception): | |
def __init__(self, attribute_name, message): | |
self.attribute_name = attribute_name | |
self.message = message | |
def __str__(self): | |
return self.message |