Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Kazarinoff ProfessorKazarinoff

View GitHub Profile
@ProfessorKazarinoff
ProfessorKazarinoff / create_random_password_string.py
Created Apr 8, 2020
Create a random password or url ending with Python
View create_random_password_string.py
print(''.join(random.choice(''.join([string.ascii_letters,'_',string.digits])) for i in range(30)))
View flaskapp.service
[Unit]
Description=uWSGI instance to serve flaskapp
After=network.target
[Service]
User=peter
Group=www-data
WorkingDirectory=/home/peter/flaskapp
Environment="PATH=/home/peter/flaskapp/flaskappenv/bin"
ExecStart=/home/peter/flaskapp/flaskappenv/bin/uwsgi --ini flaskapp.ini
@ProfessorKazarinoff
ProfessorKazarinoff / sites-available
Created Aug 2, 2018
nginx configuration for a Internet of Things server built with flask and Python. See: http://pythonforundergradengineers.com/flask-app-on-digital-ocean
View sites-available
server {
listen 80;
server_name your_domain wwww.your_domain;
location / {
include uwsgi_params;
uwsgi_pass unix:/home/peter/flaskapp/flaskapp.sock;
}
}
You can’t perform that action at this time.