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
# python3 based gunicorn service | |
#!/usr/bin/env python3 | |
#coding: utf-8 | |
##################################### | |
# Sample Config file # | |
# pidfile='config/gunicornRun.pid'; # | |
# app='server:app'; # | |
# bind='127.0.0.1:8000' # | |
##################################### |
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
# https://github.com/django/django/blob/master/django/utils/crypto.py#L51 | |
SECRET_KEY = "My Secret Key"; | |
def get_random_string(length=12, | |
allowed_chars='abcdefghijklmnopqrstuvwxyz' | |
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'): | |
""" | |
Returns a securely generated random string. | |
The default length of 12 with the a-z, A-Z, 0-9 character set returns | |
a 71-bit value. log_2((26+26+10)^12) =~ 71 bits |
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
All public gists https://gist.github.com/bgth | |
Copyright 2017, bgth | |
MIT License, http://www.opensource.org/licenses/mit-license.php |
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
© 2016-<%= new Date().getFullYear() %> |