Skip to content

Instantly share code, notes, and snippets.

@liyi54
liyi54 / django_heroku_deployment.md
Created September 9, 2020 02:38
Django App Heroku Deployment

Django app Heroku Deployment

Steps to deploying a Django app to Heroku

Install guinicorn locally

pipenv install gunicorn
or
pip install gunicorn
@liyi54
liyi54 / postgres-cheatsheet.md
Created April 23, 2020 22:42 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@liyi54
liyi54 / django_deploy.md
Created April 20, 2020 15:38 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@liyi54
liyi54 / README-Template.md
Created April 12, 2020 17:06 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@liyi54
liyi54 / ng_states_with_keys.py
Created April 7, 2020 22:52
Nigerian States with abbreviations in a python dictionary
{
'AB':"Abia",
'AD':"Adamawa",
'AI':"Akwa Ibom",
'AR':"Anambra",
'BH':"Bauchi",
'BL':"Bayelsa",
'BE':"Benue",
'BN':"Borno",
'CR':"Cross River",
@liyi54
liyi54 / pytz-time-zones.py
Created March 23, 2020 22:40 — forked from heyalexej/pytz-time-zones.py
list of pytz time zones
>>> import pytz
>>>
>>> for tz in pytz.all_timezones:
... print tz
...
...
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
@liyi54
liyi54 / django_crash_course.MD
Created March 15, 2020 22:20 — forked from bradtraversy/django_crash_course.MD
Commands for Django 2.x Crash Course

Django Crash Course Commands

# Install pipenv
pip install pipenv
# Create Venv
pipenv shell
@liyi54
liyi54 / python_heroku.MD
Created March 15, 2020 22:19 — forked from bradtraversy/python_heroku.MD
Python & Postgres Heroku Deployment

Python Heroku Deployment

Steps to create a postgres database and deply a Python app to Heroku

Install guinicorn locally

pipenv install gunicorn
or
pip install gunicorn