Short Hand That I Always I Forget I know

Git, Postgres, Yarn, why am I always looking these commands up? Idk. This post is more for me than it is for you but I hope you gain something from it as well.

Git

git commit --amend --no-edit

PostgreSQL

- Super intro sh*t I always forget the order : https://www3.ntu.edu.sg/home/ehchua/programming/sql/PostgreSQL_GetStarted.html

https://www.cyberciti.biz/faq/howto-add-postgresql-user-account/

- https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04

- https://www.digitalocean.com/community/tutorials/how-to-deploy-django-to-app-platform

Python

# One liner for the terminal
python -c "import sys; print('\n'.join(sys.path))"


"""
If you are on Linux

    Open your favorite terminal program;

    Open the file ~/.bashrc in your text editor – e.g. atom ~/.bashrc;

    Add the following line to the end:
"""
        export PYTHONPATH=/home/my_user/code
"""
    Save the file.

    Close your terminal application;

    Start your terminal application again, to read in the new settings, and type this:
"""
        echo $PYTHONPATH
"""
    It should show something like /home/my_user/code.
"""

Django Migrations

*

virtualenv

Pipenv

(no longer being supported) use virtualenv love <3 ;`(

65

The following should give you the paths

$ pipenv --where
/home/wonder/workspace/myproj

$ pipenv --venv
/home/wonder/PyEnvs/myproj-BKbQCeJj