Create a virtual environment with venv
python3 -m venv <MYVENV>
source MYENV/bin/activate
Generate requirements file
pip freeze > requirements.txt
Install project dependencies
pip install -r requirements.txt
Run in development mode
fastapi dev main.py
Run in production mode
fastapi run main.py
Run app_name
flask --app app_name run --debug
Create a project
django-admin startproject mysite
Create an app
python manage.py startapp myapp
Run server
python manage.py runserver
Run tests
python manage.py test
Make empty migration with chosen name
python manage.py makemigrations --empty APP --name NAME
Run worker
celery -A project_name worker -l info
Run celery beat (periodic tasks)
celery -A project_name beat
Create project (add . at the end to create in current dir)
vue create hello-world
Run project
npm run serve
Create project
npx create-react-app my-app
Run project
npm start
Deploy to Github Pages
npm run deploy
Login
heroku login
Reset database
heroku pg:reset DATABASE
Run Django migrations
heroku run python manage.py migrate
List databases
\l
Connect to database
\c NAME
List tables
\dt
Set env var permamently
sudo vim /etc/environment
VAR="SOMETHING"
Set alias in ~/.bashrc
alias python='python3'
alias pip='pip3'
Kill processes associated with port 8000
sudo fuser -k 8000/tcp
Set username and password
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com