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
# 1) Create a middlewares/middlewares.py file and copy this: | |
import threading | |
class RequestMiddleware: | |
def __init__(self, get_response, thread_local=threading.local()): | |
self.get_response = get_response | |
self.thread_local = thread_local | |
# One-time configuration and initialization. |
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 psutil | |
# | |
# Python Script to Check if... | |
# Windows Service is found|installed,stopped|running without pywin32 | |
# Found at https://stackoverflow.com/questions/33843024 | |
# Update to work on python 3.x | |
# | |
def getService(name): |
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
[MASTER] | |
profile=no | |
persistent=yes | |
ignore=tests.py, urls.py, migrations | |
cache-size=500 | |
[MESSAGES CONTROL] | |
# C0111 Missing docstring | |
# I0011 Warning locally suppressed using disable-msg | |
# I0012 Warning locally suppressed using disable-msg |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |