Skip to content

Instantly share code, notes, and snippets.

View LuisQBlanco's full-sized avatar

Luis Quinones LuisQBlanco

  • Toronto
View GitHub Profile
@LuisQBlanco
LuisQBlanco / Multiple Websites.md
Last active June 16, 2022 03:39
Digital Ocean create droplets

Set up your droplet

First you will need to setup an SSH Key

Click on the SSH Keys tab, then click Add SSH Key

Digital Ocean guide

Create the key in OpenSSH in Mac OSX or Linux, or using Putty for Windows.

Copy the ssh key and add it into Digital Ocean and give it a name.

@LuisQBlanco
LuisQBlanco / docker compose commands.md
Last active May 16, 2020 21:44
Docker and Docker-compose commands

Docker-compose commands

To put off and delete containers, volumes

    docker-compose down -v

Build and turn on container

>>> a1=HeadBill.objects.filter(CustomerID_id__customerID=str(pk), BillNumber=1) 
>>> print(a1.query)
SELECT "core_headbill"."HeadBillID", "core_headbill"."CustomerID_id", "core_headbill"."BillDate", "core_headbill"."BillNumber" 
FROM "core_headbill" 
INNER JOIN "core_customer" 
ON ("core_headbill"."CustomerID_id" = "core_customer"."CustomerID") 
INNER JOIN "core_headbill" 
T3 ON ("core_customer"."CustomerID" = T3."CustomerID_id") 
WHERE ("core_headbill"."BillNumber" = 1 AND T3."HeadBillID" = 1)
@LuisQBlanco
LuisQBlanco / Git Command.md
Last active May 19, 2020 19:30
Some git comon git commands

GIT Commands

Git Branch

View Branch

To view the branches in a git repository

    git branch

this is a test

Headings 1

Headings 2

Headings 3

Headings 4

Headings 5
Headings 6
@LuisQBlanco
LuisQBlanco / postgresdkdelete.md
Last active May 21, 2020 01:48
Postgresql Docker database

Delete database in Postgresql running in Docker

    docker exec -it <container-id> psql -U <username> -d postgres -c "DROP DATABASE <dbname>;"

Create database in Postgresql running in Docker

    docker exec -it <container-id> psql -U <username> -d postgres -c "CREATE DATABASE <dbname>;"
@LuisQBlanco
LuisQBlanco / Dockerfile
Created May 2, 2020 19:09
Dockerfile for python, django and postgrest project
FROM python:3.7-alpine
# MAINTAINER LuisQuinones
ENV PYTHONUNBUFFERED 1
# RUN mkdir billdjpostgtest
# COPY requirements.txt /billdjpostgtest/requirements.txt
COPY requirements.txt /billdjpostgtest1/
@LuisQBlanco
LuisQBlanco / Markdown snippets.md
Last active May 3, 2020 01:07
Snnipets in python django and others

this is a test

Headings 1

Headings 2

Headings 3

Headings 4

Headings 5
Headings 6