Skip to content

Instantly share code, notes, and snippets.

<?php
// FormHandler class which checks user input and does some preformatting. It is called by the DataHandler class.
class FormHandler {
// Function to performat and check user inputs
public function preProcessor($stringField, $stringValue, $trim, $stripTags, $removeAllWhitespaces, $required, $email, $minLength, $maxLength, $minValue, $maxValue, $alphaOnly, $numericOnly, $alphaAndNumericOnly) {
@pulse00
pulse00 / gist:3865316
Created October 10, 2012 12:29 — forked from fnordo/gist:3865247
template rendered on server
## BEGIN: Template (rendered on serverside) ###
<div id="wrap_page_view">
<h1>Title</h1>
<p>
Description: lorem foobar...
</p>
</div>
<script type="text/javascript">
#!/bin/sh
# /share/MD0_DATA/.qpkg/autorun/autorun-plexconnect.sh
# chmod +x /share/MD0_DATA/.qpkg/autorun/autorun-plexconnect.sh
curl -L https://gist.github.com/tommeier/6255771/raw/update_plex_connect.sh | bash &
@pulse00
pulse00 / create_aws_api_group.py
Last active February 5, 2016 15:20 — forked from ErikHarmon/create_aws_api_group.py
Create AWS security group egress rules for AWS API access, using Ansible
#!/usr/bin/python
import json
import sys
# take json from stdin, from source such as https://ip-ranges.amazonaws.com/ip-ranges.json
# and turn it into an AWS security group using Ansible
region = 'eu-west-1'
header_str = """---
- hosts: 127.0.0.1