Skip to content

Instantly share code, notes, and snippets.

View diegolamonica's full-sized avatar

Diego La Monica diegolamonica

View GitHub Profile
/**
*
* Check if the given date is valid
* @param string $date
*
* @param string $separator
*
* @param string $format defines the order which year month and day are in the $date string
* this string supports "d" for days "m" for month and "y" for year
*
@diegolamonica
diegolamonica / SubmitToServer.htm
Created July 25, 2012 09:51
Submit outer HTML to the Server
<html>
<head>
<script type="text/javascript">
/**
* Submit the outerHTML of the given ElementId to an URL
*
* @param elementId: the ID of the Element which the HTML will be submitted.
* @param page: the url (relaitve to the current page or absolute) to the server page that will receive the html
* @param target (optional): the target of the form, leave it empty to sumbit the content to the same window.
@kerrishotts
kerrishotts / ui-gestures.js
Created July 20, 2012 08:20
Simple Gesture Recognition
/*jshint asi:true, forin:true, noarg:true, noempty:true, eqeqeq:false, bitwise:true, undef:true, curly:true, browser:true, devel:true, smarttabs:true, maxerr:50 */
/******************************************************************************
*
* UI-GESTURES
* Author: Kerri Shotts
* Version: 0.1 alpha
* License: MIT
*
* A simple, no-frills gesture recognizer. Permits long-press recognition,
* horizontal swipe recognition, and vertical swipe recognition. Recognizing