- плагин neovim
- инструкция к плагину для WSL
- установить автозапуск плагина:
- автоматическая загузка cron в WSL для windows 10/11
- sudo crontab -e (смотрите ниже crontab file)
- create script (смотрите ниже discord-relay.sh)
This file contains hidden or 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
| # Need create 'personal access token' you github account. | |
| (settings -> developer settings -> personal access token -> generate new token) | |
| REPO_NAME - your repository name | |
| TOKEN - personal access token (look line2) | |
| mkdir REPO_NAME | |
| cd REPO_NAME | |
| git init | |
| echo "This repo was created remotely" >> README.md |
Шаг 1: отредактируйте соответствующие имена полей в models.py
class Bar(models.Model):
name = models.CharField(unique=True, max_length=32)
description = models.TextField(null=True, blank=True)
class AnotherModel(models.Model):
bar = models.ForeignKey(Bar) # <-- changed field name
is_awesome = models.BooleanField()
- Изменить имя поля в модели (но запомнить старое имя для 3 шага!)
- Создать пустую миграцию
$ python manage.py makemigrations --empty myApp
- Отредактировать новый файл пустой миграции он находится в папке миграции в папке вашего приложения и будет последней миграцией) добавив:
operations = [
migrations.RenameField('MyModel', 'old_field_name', 'new_field_name'),
]
This file contains hidden or 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
| # Paste to Windows file explorer | |
| \\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes |
This file contains hidden or 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\r’: No such file or directory) | |
| $ pyenv --vrsion | |
| /usr/bin/env: ‘bash\r’: No such file or directory | |
| $ cd ~/.pyenv && find . -type f | xargs sed -i $'s/\r$//' && cd - | |
| $ pyenv --version | |
| pyenv 1.2.21e |
This file contains hidden or 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
| curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 |
This file contains hidden or 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
| " <space>rn - mass funciton rename | |
| set mouse=a " enable mouse | |
| set encoding=utf-8 | |
| set number | |
| set noswapfile | |
| set scrolloff=7 | |
| set tabstop=4 | |
| set softtabstop=4 | |
| set shiftwidth=4 |
This file contains hidden or 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
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins | |
| "call vundle#begin('~/some/path/here') | |
| " let Vundle manage Vundle, required |
This file contains hidden or 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
| if settings.DEBUG: | |
| import debug_toolbar | |
| import mimetypes | |
| mimetypes.add_type("application/javascript", ".js", True) | |
| urlpatterns = [ | |
| path('__debug__/', include(debug_toolbar.urls)), | |
| ] + urlpatterns |
NewerOlder