Skip to content

Instantly share code, notes, and snippets.

View cocomatias's full-sized avatar

Matias Coco cocomatias

View GitHub Profile
@cocomatias
cocomatias / settings.py
Last active June 11, 2021 18:05
Django Rest, Postgres ( Travis CI ) DATABASES settings
# Database
import dj_database_url
POSTGRES_URL = "HEROKU_POSTGRESQL_PURPLE_URL" # The name of your Heroku Postgres database URL
if 'DATABASES' not in locals():
DATABASES = {}
DATABASES['default'] = dj_database_url.config(default='postgres://POSTGRES_USERNAME:POSTGRES_PASSWORD@localhost:5432/POSTGRES_DATABASE_NAME')
if POSTGRES_URL in os.environ:
DATABASES = {}
@cocomatias
cocomatias / .travis.yml
Created May 21, 2021 19:47
Travis settings for Django & Postgres
language: python
python:
- '3.9.0' # Your python version
install:
- pip install -r requirements.txt
services:
- postgresql
script:
- python manage.py test
@cocomatias
cocomatias / GIT_COMMANDS.md
Last active June 27, 2021 16:35
Git important Commands

Git important Commands

Add remote Repo

  • git init
  • git remote add origin GITHUB_REPO_LINK
  • git pull origin master Pull the .gitignore and README.md files from github

Create a local branch and push those changes to github:

(Create a local branch, put all your changes to that branch and finally push that branch to github)

  • git checkout -b NAME_OF_NEW_BRANCH
[
{
"type": 4,
"data": {
"href": "https://www.google.com/",
"width": 1920,
"height": 931
},
"timestamp": 1731509831936
},