You can check here for getting the latest version. Change the wget url to download newer versions.
Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux
Although I highly recommend using a snap
sudo snap install postman
tar -xzf Postman-linux-x64-5.3.2.tar.gz
This file contains hidden or 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 logging.config | |
| import os | |
| from django.utils.log import DEFAULT_LOGGING | |
| # Disable Django's logging setup | |
| LOGGING_CONFIG = None | |
| LOGLEVEL = os.environ.get('LOGLEVEL', 'info').upper() | |
| logging.config.dictConfig({ |
This file contains hidden or 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
| from Crypto.Hash import SHA3_256 | |
| class MerkleTools(object): | |
| def __init__(self): | |
| self.reset_tree() | |
| def _to_hex(self, x): | |
| return x.hex() |
This file contains hidden or 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
| # Backup DB | |
| docker run \ | |
| --rm \ | |
| --link running_mongo:mongo \ | |
| -v /data/mongo/backup:/backup \ | |
| mongo \ | |
| bash -c ‘mongodump --out /backup --host $MONGO_PORT_27017_TCP_ADDR’ | |
| # Download the dump | |
| scp -r USER@REMOTE:/data/mongo/backup ./backup | |
This file contains hidden or 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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains hidden or 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
| from django.contrib.auth.models import User | |
| from django.db.models.signals import post_save | |
| from django.dispatch import receiver | |
| from rest_framework.decorators import api_view | |
| from rest_framework.response import Response | |
| from rest_api.models import UserProfile | |
| @api_view(['GET', 'POST']) |