This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq -n --stream 'fromstream(inputs|select((length == 2 and .[0][1] == "_id")|not))' users_large.json > users.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongoimport --collection users --file users.json --jsonArray --uri $MONGO_URI_NEW | |
mongoimport --collection products --file products.json --jsonArray --uri $MONGO_URI_NEW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export MONGODB_URI="mongodb://<username>:<password>@<ip:port>/<database>?authMechanism=SCRAM-SHA-256&readPreference=primary&appname=MongoDB%20Compass&directConnection=true&ssl=false" | |
mongoexport --collection=users --out=users_raw.json --jsonArray --uri=$MONGODB_URI && jq 'map(del(._id))' users_raw.json > users.json | |
mongoexport --collection=products --out=products_raw.json --jsonArray --uri=$MONGODB_URI && jq 'map(del(._id))' products_raw.json > products.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install -y python3-pip | |
sudo apt install -y build-essential libssl-dev libffi-dev python3-dev | |
pip3 install pipenv | |
ssh-keygen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
import copy | |
from apps.user.models import User | |
from django.forms.models import model_to_dict | |
from typing import Any, Dict | |
pytestmark = pytest.mark.django_db | |
TEST_USERS = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pull official python alpine image | |
FROM python:3.7 | |
# Set Environment Variable | |
ENV PYTHONUNBUFFERED 1 | |
ENV C_FORCE_ROOT true | |
RUN mkdir -p /opt/django/dev | |
# Creating Work Directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db: | |
image: postgres | |
container_name: db | |
restart: unless-stopped | |
tty: true | |
environment: | |
- POSTGRES_DB=blog | |
- POSTGRES_USER=blog | |
- POSTGRES_PASSWORD=blog | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codesign -f -s - /Applications/Discord.app/Contents/Frameworks/Discord\ Helper\ \(Renderer\).app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests # pip install requests | |
import jwt # pip install pyjwt | |
from datetime import datetime as date | |
import json | |
import os | |
CONTENT_API = "<YOUR CONTENT API>" | |
ADMIN_API = "<YOUR ADMIN API>" | |
API_URL = "<URL ENDPOINT>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ISO 3166 Country Code | ISO639-2 Country Code | Country | ISO 3166 Country Code | ISO639-2 Lang | Language | Date Format | |
---|---|---|---|---|---|---|---|
ALB | AL | Albania | sqi | sq | Albanian | yyyy-MM-dd | |
ARE | AE | United Arab Emirates | ara | ar | Arabic | dd/MM/yyyy | |
ARG | AR | Argentina | spa | es | Spanish | dd/MM/yyyy | |
AUS | AU | Australia | eng | en | English | d/MM/yyyy | |
AUT | AT | Austria | deu | de | German | dd.MM.yyyy | |
BEL | BE | Belgium | fra | fr | French | d/MM/yyyy | |
BEL | BE | Belgium | nld | nl | Dutch | d/MM/yyyy | |
BGR | BG | Bulgaria | bul | bg | Bulgarian | yyyy-M-d | |
BHR | BH | Bahrain | ara | ar | Arabic | dd/MM/yyyy |
NewerOlder