https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
| syntax on | |
| set ruler " Show the line and column numbers of the cursor. | |
| set formatoptions+=o " Continue comment marker in new lines. | |
| set textwidth=0 " Hard-wrap long lines as you type them. | |
| set modeline " Enable modeline. | |
| set esckeys " Cursor keys in insert mode. | |
| set linespace=0 " Set line-spacing to minimum. | |
| set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) | |
| " More natural splits | |
| set splitbelow " Horizontal split below current. |
| # Stop the CUPS daemon with the following command. | |
| launchctl stop org.cups.cupsd | |
| wait | |
| # Rename the old CUPS configuration file. | |
| mv /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup | |
| wait | |
| # Restore the default settings file. | |
| cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf | |
| wait | |
| # Rename printers file. |
| /* | |
| * @Author Raymond Pittman | |
| * @Github: https://github.com/raymondpittman | |
| */ | |
| function download(url, filename) { | |
| fetch(url, { | |
| mode: 'no-cors' /*{mode:'cors'}*/ | |
| }).then((transfer) => { | |
| return transfer.blob(); | |
| }).then((bytes) => { |
https://realpython.com/blog/python/asynchronous-tasks-with-django-and-celery/
$ pip install celery
$ sudo apt-get install rabbitmq-server
| 1. Нужно найти все коммиты, которые изменяли файл: | |
| git log --pretty=oneline --branches -- BIGFILE.ZIP | |
| 2.1 Удалить ссылки на файл из всей истории коммитов, начиная с последнего (пусть, хеш последнего коммита - 6df7640): | |
| git filter-branch --index-filter 'git rm --cached BIGFILE.ZIP --ignore-unmatch' --prune-empty --tag-name-filter cat -- --all | |
| 2.2 Удалить ссылки на каталог из истории коммитов: | |
| git filter-branch --force --index-filter 'git rm -r --cached --ignore-unmatch BIG/DIR' --prune-empty --tag-name-filter cat -- --all | |
| 3. Отправляем изменения на сервер: |
| - name: ensure github.com is a known host | |
| lineinfile: | |
| dest: /root/.ssh/known_hosts | |
| create: yes | |
| state: present | |
| line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}" | |
| regexp: "^github\\.com" |
| https://toster.ru/q/276441 | |
| Отсюда, есть и другие рекомендации от др авторов. | |
| Я когда делаю Code Review критерии следующие: | |
| * Безопасность: | |
| - Каждый аргумент метода простого типа должен проверяться на тип в случае его проксирования и на граничные значения в случае обработки. Чуть что не так - бросается исключение. Если метод с кучкой аргументов на 80% состоит из поверки из аргументов - это вполне норм)) | |
| - Никаких trigger_error, только исключения. | |
| - Исключения ДОЛЖНЫ быть человеко-понятны, всякие "Something went wrong" можно отдавать пользователю, но в лог должно попасть исключение со стектрейсом и человеко-понятным описанием, что же там пошло не так. | |
| - Каждый аргумент (объект) метода должен быть с тайпхинтингом на этот его класс, или интерфейс. |
| # .flake8 | |
| # | |
| # DESCRIPTION | |
| # Configuration file for the python linter flake8. | |
| # | |
| # This configuration is based on the generic | |
| # configuration published on GitHub. | |
| # | |
| # AUTHOR | |
| # krnd |
В результате будет 2 react проекта на 1 сервере доступных по разным ссылкам
| urlpatterns = [ | |
| url(r'^rest-auth/registration/account-confirm-email/(?P<key>[-:\w]+)/$', ConfirmEmailView.as_view(), name='account_confirm_email'), | |
| ] |