Skip to content

Instantly share code, notes, and snippets.

View skeller88's full-sized avatar

Shane Keller skeller88

View GitHub Profile
/**
* Current standard is RFC 3986, published in 2005: http://tools.ietf.org/html/rfc3986#page-50. Apache Commons has a
* url validator, but it doesn't accept certain urls, probably because it's implementing RFC2396 from 1998. Also, the
* Fitbit API validator has custom needs such as allowing unicode characters.
* <p/>
* REGEX_COMPILED is used by UrlTypeConverter and MultiUrlsTypeConverter to validate third party app urls.
* <p/>
* All regex parts are borrowed from dperini's "https://gist.github.com/dperini/729294" unless otherwise noted.
* The dperini regex satisfies most of the test cases here: https://mathiasbynens.be/demo/url-regex, and has undergone
@skeller88
skeller88 / Gruntfile.js
Created August 18, 2014 02:22
Gruntfile for typical grunt workflow
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
build: {
src: ['dist/']
}
},