Skip to content

Instantly share code, notes, and snippets.

View dennishall1's full-sized avatar

Dennis Hall dennishall1

View GitHub Profile
// http://docs.jquery.com/Plugins/Validation/Methods/email
email: function(value, element) {
// contributed by Dennis Hall
// simplified enough for ff2 to not choke
return this.optional(element) || /^\s*[^ <>]+@[^ <>]+\.[a-z]{2,9}\s*$/i.test(value);
},
email_multiple: function(value, element) {
// contributed by Dennis Hall
// simplified enough for ff2 to not choke
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dennishall1
dennishall1 / html2json.js
Last active August 29, 2015 14:20
HTML to JSON
var el = document.getElementById("test-node");
var json = marshal(el, {});
document.write('<pre>' + JSON.stringify(json).replace(/\}/g, "}\n") + '</pre>');
function marshal(element, object) {
var scope;
each(element.attributes, function(attr){
if(attr.nodeName === 'data-prop'){
object[attr.nodeValue] = element.innerText || element.src;
var gulp = require('gulp');
var browserify = require('browserify');
var notify = require('gulp-notify');
var source = require('vinyl-source-stream');
var watchify = require('watchify');
var plumber = require('gulp-plumber');
var less = require('gulp-less');
var csso = require('gulp-csso');
var watch = require('gulp-watch');
var envify = require('envify');