Skip to content

Instantly share code, notes, and snippets.

# This creates a docker container with lemp stack and creates
# --net = name of your host
# -v your webroot folder:docker container folder with z option
docker run -it -p "8080:80" -p "3306:3306" -e MYSQL_PASS="MySecretPassword" -v /home/user_home_folder/web:/app:z --name=webserver --net=hostname tutum/lamp
#!/usr/bin/python
# Petrus Alexandre Pavoni Gomes
# petrusgomes@gmail.com
#
# 25/09/2010
#
# UFW-Notify v0.2:
# Show a notification popup (libnotify) when UFW Firewall blocks a connection.
# It reads last line from firwall log with "tail" command, parse it and show
@mvmthecreator
mvmthecreator / normalise.py
Created April 5, 2018 01:17 — forked from j4mie/normalise.py
Normalise (normalize) unicode data in Python to remove umlauts, accents etc.
# -*- coding: utf-8 -*-
import unicodedata
""" Normalise (normalize) unicode data in Python to remove umlauts, accents etc. """
data = u'naïve café'
normal = unicodedata.normalize('NFKD', data).encode('ASCII', 'ignore')
print normal
@mvmthecreator
mvmthecreator / dorks.py
Created February 18, 2017 17:42
Search Bing and Google for Dorks
"""
***** Auto-finder by dorks tool with Google API & Bing API *****
@author: z0rtecx
@release date: dec-2014
@version: 1.0.12122014
@poc: good dork for find web pages whit SQLi vulnerability in ID parameter, e.g. "inurl:details.php?id="
@description: This tool is for save time for you. It is gathering dorks of a txt file, and search potential web pages with SQLi vulnerability. ONLY FOR MySQL errors.
@features:
@mvmthecreator
mvmthecreator / example.html
Created February 8, 2017 20:11 — forked from doobeh/example.html
Simple example of using a RadioField in Flask-WTForms to generate a form.
<form method="post">
{{ form.hidden_tag() }}
{{ form.example }}
<input type="submit">
</form>
@mvmthecreator
mvmthecreator / crontab.py
Created February 8, 2017 17:10
crontab example
import argparse
import os ,sys
import logging
from crontab import CronTab
"""
Task Scheduler
==========
This module manages periodic tasks using cron.
"""
class CronManager:
var faForm = window.faForm = new AdminForm();
<table id="guests-0"><tr><th><label for="guests-0-email">Email</label></th><td><input id="guests-0-csrf_token" name="guests-0-csrf_token" type="hidden" value="1481247033##26e6a3c61ed2bbb637064f007cf8f7191475e198"><input id="guests-0-id" name="guests-0-id" type="hidden" value=""><input id="guests-0-email" name="guests-0-email" type="text" value=""></td></tr><tr><th><label for="guests-0-age">Age</label></th><td><input id="guests-0-age" name="guests-0-age" type="text" value=""></td></tr><tr><th><label for="guests-0-vip">Vip</label></th><td><input id="guests-0-vip" name="guests-0-vip" type="checkbox" value="y"></td></tr></table>
<table id="guests-1"><tr><th><label for="guests-1-email">Email</label></th><td><input id="guests-1-csrf_token" name="guests-1-csrf_token" type="hidden" value="1481247033##26e6a3c61ed2bbb637064f007cf8f7191475e198"><input id="guests-1-id" name="guests-1-id" type="hidden" value=""><input id="guests-1-email" name="guests-1-email" type="text" value=""></td></tr><t
@mvmthecreator
mvmthecreator / .html
Created December 6, 2016 02:20
flask wtfroms and jquery
# index.html
{% extends "bootstrap/base.html" %}
{% set counter = 0 %}
{% macro render_field(field, count, _class="form-control") %}
<td>{{ field.label }}</td>
<td>{{ field(**kwargs)|safe }}
{% if field.errors %}
<ul class=errors>
{% for error in field.errors %}
@mvmthecreator
mvmthecreator / wtforms-field-macro-bootstrap3.html
Created December 6, 2016 00:59 — forked from pwalsh/wtforms-field-macro-bootstrap3.html
A macro for rending WTForm fields in Jinja2 templates with Bootstrap 3 styling.
{% macro render_field(field) -%}
{% set with_label = kwargs.pop('with_label', False) %}
{% set placeholder = kwargs.pop('placeholder', field.label.text) %}
{% set class_ = kwargs.pop('class_', '') %}
{% if field.flags.required %}
{% set class_ = class_ + ' required' %}
{% endif %}