Use [-debug
][d] to make it more verbose.
docker-compose.yml
:
services:
supercronic:
build: .
from django.db.models import Count, Max | |
unique_fields = ['field_1', 'field_2'] | |
duplicates = ( | |
MyModel.objects.values(*unique_fields) | |
.order_by() | |
.annotate(max_id=Max('id'), count_id=Count('id')) | |
.filter(count_id__gt=1) | |
) |
# Author: Ryan Cole | |
# Website: https://ryanc.me | |
# GitHub: https://github.com/MGinshe | |
# Usage: | |
# Place this file in /etc/nginx/sites-enabled/ | |
# Make sure you edit the DOMAIN_HERE and SSL_CERTIFICATE, and DB_FILTER sections | |
# | |
# Note: This config file is designed to be used with the Odoo dbfilter_from_header module | |
# https://apps.openerp.com/apps/modules/9.0/dbfilter_from_header/ |
List only container ids: sudo docker ps -a -q
Attach Terminal: sudo docker exec -i -t $(sudo docker ps -a -q) /bin/bash
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
Update the server | |
$ apt-get update | |
Install pip3 | |
$ sudo apt-get install pip3 | |
Install virtualenv via pip | |
$ pip3 install virtualenv | |
Create a virtualenvs directory |