$ docker pull postgres$ mkdir -p [db-volume-location-on-machine]| The "Internal" Fix | |
| Follow these steps to reset the counter using Python code: | |
| Enter the Django Shell: | |
| python manage.py shell | |
| Run this script exactly: | |
| Copy and paste this entire block into the shell. It will look at your data and force the counter to the correct next number. | |
| from django.db import connection |
| #!/bin/bash | |
| # Check if docker is running and start it if it's not | |
| if docker info > /dev/null 2>&1; then | |
| echo "Docker is running" | |
| else | |
| echo "Docker is not running" | |
| open /Applications/Docker.app |
| $ps -ef | grep defunct | |
| $kill -9 < | |
| ps -ef | grep defunct | |
| UID PID PPID C STIME TTY TIME CMD | |
| 1000 637 27872 0 Oct12 ? 00:00:04 [chrome] <defunct> | |
| 1000 1808 1777 0 Oct04 ? 00:00:00 [zeitgeist-datah] <defunct> | |
| ### Python Docs | |
| Correr checkhealt | |
| install pylint | |
| https://github.com/deoplete-plugins/deoplete-jedi/wiki/Setting-up-Python-for-Neovim#using-virtual-environments | |
| Using pyenv |
Django Curated List from Yoandre
| ### Open in vim all files modified in git | |
| $ nvim $(git status --porcelain | awk '{print $2}') | |
| ### Go to next git modification | |
| using https://github.com/lewis6991/gitsigns.nvim | |
| ]c and [c |
| set -g prefix C-s | |
| unbind C-b | |
| bind C-s send-prefix | |
| set -g base-index 1 | |
| set -g escape-time 20 | |
| bind h select-pane -L |
| Python3 Encapsulate with sqlite3 Maps (https://stackoverflow.com/questions/19530974/how-can-i-add-the-sqlite3-module-to-python) | |
| Here is an example of a script that will setup an encapsulated version (virtual environment) of Python3 in your user directory with an encapsulated version of sqlite3. | |
| INSTALL_BASE_PATH="$HOME/local" | |
| cd ~ | |
| mkdir build | |
| cd build | |
| [ -f Python-3.6.2.tgz ] || wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz | |
| tar -zxvf Python-3.6.2.tgz |
python -m grpc_tools.protoc --proto_path=. ./unary.proto --python_out=. --grpc_python_out=.