A curated list of awesome Python frameworks, libraries, software and resources.
Inspired by awesome-php.
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
server{ | |
server_name shop-api.algomock.in; | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $host; | |
proxy_pass http://127.0.0.1:8000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; |
A curated list of awesome Python frameworks, libraries, software and resources.
Inspired by awesome-php.
# Installing python and other essentials | |
https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-18-04-server | |
sudo add-apt-repository ppa:deadsnakes/ppa | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
sudo apt-get install python3.7 libpython3.7-dev python3-all-dev | |
#!/bin/bash | |
# Written 2018-11-15 by 4410287 | |
# This script will create a backup file of a postgres database and compress it. It is capable of access a local or remote server to pull the backup. After creating a new backup, it will delete backups that are older than 15 days, with the exception of backups created the first of every month. It is recommended to create a seperate database user specifically for backup purposes, and to set the permissions of this script to prevent access to the login details. Backup scripts for different databases should be run in seperate folders or they will overwrite each other. | |
HOSTNAME= | |
USERNAME= | |
PASSWORD= | |
DATABASE= | |
FILENAME=$(date +%Y-%m-%d).backup.sql |
import base64 | |
import string | |
import random | |
import hashlib | |
import sys | |
from Crypto.Cipher import AES | |
iv = '@@@@&&&&####$$$$' |
export APP_MOUNT_URI=/dashboard/ | |
export API_URI=http://3.6.136.178:8000/graphql/ | |
cd /home/ubuntu/codes/backend/storefront && npm start |
export APP_MOUNT_URI=/dashboard/ | |
export API_URI=http://3.6.136.178:8000/graphql/ | |
cd /home/ubuntu/codes/backend/saleor-dashboard && npm start |
# Update below variables in ~/.bashrc file. | |
# change below x.x.x.x to your server ip or 127.0.0.1 for localhost | |
export ALLOWED_HOSTS=x.x.x.x | |
export ALLOWED_CLIENT_HOSTS=x.x.x.x | |
export DEBUG=True | |
export SECRET_KEY=123456 | |
export INTERNAL_IPS=127.0.0.1,x.x.x.x, | |
export DEFAULT_COUNTRY=IN | |
export DEFAULT_CURRENCY=INR | |
export APP_MOUNT_URI=/dashboard/ |
# setup storefront | |
git clone https://github.com/mirumee/saleor-storefront.git | |
cd saleor-storefront | |
git checkout 2.10.1 | |
npm i | |
vim package.json : --host 0.0.0.0 | |
npm start |