Skip to content

Instantly share code, notes, and snippets.

View xwipeoutx's full-sized avatar

Steve Leigh xwipeoutx

View GitHub Profile
@xwipeoutx
xwipeoutx / validate-accessibility.js
Created October 21, 2016 00:34
Accessibilities
(function() {
var invalidElementFinders = {
"Lists should have titles": () => Array.from(document.querySelectorAll("ul,li")).filter(el => !el.title),
"Articles should be aria-labelledby": () => Array.from(document.querySelectorAll("article")).filter(el => !el.getAttribute("aria-labelledby")),
}
var validateAccessibility = function () {
Array.from(document.querySelectorAll("*")).forEach(el => {
el.classList.remove("is-not-accessible");
if (el.problems) delete el.problems
@xwipeoutx
xwipeoutx / Car.cs
Created June 6, 2016 13:01
Simple, clean, fast IQueryable filter with expression chaining in C#
using System;
namespace ExpressionChainDemo
{
public class Car
{
public DateTime RegistrationDate { get; set; }
public DateTime PurchaseDate { get; set; }
}
}