TODO: write readme
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
# | |
# models.py | |
# | |
class Claim(models.Model): | |
week_commencing = models.DateField() | |
tech = models.ForeignKey( | |
settings.AUTH_USER_MODEL, |
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
#!/bin/sh | |
# iptables script generated - | |
# http://www.mista.nu/iptables | |
IPT="/sbin/iptables" | |
# Flush old rules, old custom tables | |
$IPT --flush | |
$IPT --delete-chain |
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
# 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; |
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
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): |
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
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 |
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
from flask import Flask, g, jsonify | |
import werkzeug, os | |
from werkzeug.utils import secure_filename | |
import psycopg2 | |
from psycopg2 import pool | |
def get_db(): | |
print ('GETTING CONN') | |
if 'db' not in g: |
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
from flask import Flask, redirect, url_for, render_template_string | |
from time import sleep | |
from rq import Queue | |
from rq.job import Job | |
from redis import Redis | |
r = Redis(host='redisserver') | |
q = Queue(connection=r) |
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
from flask import Flask, render_template | |
# Because gists don't support subfolders, we pass the `template_folder` argument | |
# to `Flask` to set it as the current directory. If you wish you can create a | |
# subfolder called `templates/` in the project, moving the HTML files there, then | |
# remove that argument from the next line. | |
app = Flask(__name__, template_folder='.') | |
@app.route("/") | |
def index(): |
TCPDUMP
OPTIONS
-i any : Listen on all interfaces just to see if you’re seeing any traffic. -i eth0 : Listen on the eth0 interface. -D : Show the list of available interfaces -n : Don’t resolve hostnames. -nn : Don’t resolve hostnames or port names. -q : Be less verbose (more quiet) with your output.
OlderNewer