Skip to content

Instantly share code, notes, and snippets.

@vulcan25
vulcan25 / Dockerfile
Last active December 28, 2020 21:51
Flask upload with dropzone.
from python:alpine
RUN pip install -U pip && pip install flask
WORKDIR /code
COPY ./app.py /code
COPY ./index.html /code
CMD flask run -h 0.0.0.0
@vulcan25
vulcan25 / app.py
Last active December 30, 2018 01:23
Mongodb counter increment.
from flask import Flask,Response
app = Flask(__name__)
@app.route('/')
def hello():
return "Hello World!"
@app.route('/<int:recipe_id>',methods=['GET'])
def home(recipe_id):
# move this file to sites-available/
server {
listen 443 ssl;
client_max_body_size 32M;
# set the correct host(s) for your site
server_name example.com;
keepalive_timeout 5;
#!/bin/sh
# iptables script generated -
# http://www.mista.nu/iptables
IPT="/sbin/iptables"
# Flush old rules, old custom tables
$IPT --flush
$IPT --delete-chain
#
# models.py
#
class Claim(models.Model):
week_commencing = models.DateField()
tech = models.ForeignKey(
settings.AUTH_USER_MODEL,