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
# TIP: общие советы по коду: | |
# - Использовать аннотацию типов | |
# (см. PEP 484 - https://peps.python.org/pep-0484/) | |
# - Добавить описания классов и методов | |
# (см. PEP 257 – Docstring Conventions https://peps.python.org/pep-0257/) | |
# - отсутствует консистентность (одинаковые методы решения одинаковых проблем) | |
# Примеры ниже по коду | |
# TIP: для улучшения восприятия кода можно импортировать конкретный класс | |
# библиотеки, который планируем использовать |
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
" Base | |
set mouse=a | |
set encoding=utf-8 | |
set number | |
set noswapfile | |
set scrolloff=7 | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set expandtab |
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
from django.utils.text import slugify | |
def custom_slugify(string: str) -> str: | |
letters = { | |
"а": "a", | |
"б": "b", | |
"в": "v", | |
"г": "g", | |
"д": "d", |
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
# add ssh key | |
ssh-copy-id root@ip | |
# add user | |
adduser www && usermod -aG sudo www | |
# password for sudo - off | |
sudo visudo | |
%sudo ALL=(ALL:ALL) NOPASSWD:ALL |
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
# vim | |
# brew | |
brew update && brew upgrade | |
brew doctor | |
# virtualenv | |
source deactivate |