Skip to content

Instantly share code, notes, and snippets.

View ProfessorKazarinoff's full-sized avatar

Peter Kazarinoff ProfessorKazarinoff

View GitHub Profile
@ProfessorKazarinoff
ProfessorKazarinoff / create_random_password_string.py
Created April 8, 2020 05:02
Create a random password or url ending with Python
print(''.join(random.choice(''.join([string.ascii_letters,'_',string.digits])) for i in range(30)))
[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 August 2, 2018 21:40
nginx configuration for a Internet of Things server built with flask and Python. See: http://pythonforundergradengineers.com/flask-app-on-digital-ocean
server {
listen 80;
server_name your_domain wwww.your_domain;
location / {
include uwsgi_params;
uwsgi_pass unix:/home/peter/flaskapp/flaskapp.sock;
}
}