Skip to content

Instantly share code, notes, and snippets.

View parker's full-sized avatar

Parker Seidel parker

  • Indeed.com
  • Austin, TX
View GitHub Profile
@parker
parker / regex-challenge.js
Created January 21, 2012 23:24
Regular expression challenge
Does anyone have a regular expression that would pull out all of the arguments as groups?
Example inputs (1 per line):
"arg one", "arg two", "arg three"
"arg one", arg.two, arg.three
"arg one", arg.two, "arg.three"
"arg , one", arg.two, "arg.three"
"class=\"arg\" one", arg.two, "arg.three"
"class=\"arg\" one", "arg , two", "arg.three"
@parker
parker / mvc-mini-profiler-ajax-yui3-patch.js
Created June 27, 2011 22:16
Attempting to hijack the global "io:complete" event so that it's accessible across YUI instances
// fetch profile results for any ajax calls done via jQuery
$(document).ajaxComplete(function (e, xhr, settings) {
if (xhr) {
var id = xhr.getResponseHeader('X-MiniProfiler-Id');
if (id) {
fetchResults(id);
}
}
});