Skip to content

Instantly share code, notes, and snippets.

Avatar

George Jempty dexygen

View GitHub Profile
@dexygen
dexygen / two-way-validation.html
Last active Jan 27, 2019
Validates while typing and onblur
View two-way-validation.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
label {
display: inline-block;
width: 160px;
}
</style>
@dexygen
dexygen / correcting-annoying-validation.html
Last active Jan 23, 2019
Correcting Annoying Validation, versioning until corrected
View correcting-annoying-validation.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
label {
display: inline-block;
width: 96px;
}
View temperatureScatterPlot.html
<html lang="en">
<head>
<meta charset="utf-8">
<title>dateTemperatures Scatter Plot</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
var dateTemperatures = {
'[2016,8,29]': {low: 63, high: 94},
'[2016,9,2]': {low: 59, high: 81},
'[2016,9,1]': {low: 58, high: 85},
View ng-chess
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
td.activePly {background-color:yellow;}
td.darkSquare {
background-color:silver;
width:40pt;
height:40pt;
@dexygen
dexygen / promiseFormValidity.js
Last active Dec 31, 2015
Form validation module with Promise-like interface (work in progress)
View promiseFormValidity.js
var values = {
chessIsGame : false,
chessChampionSurname : 'Carlsen'
};
var rules = {
chessIsGame : function(value) {
if (value !== true) {
return new Error("Chess IS a Game");
}
@dexygen
dexygen / meek.js
Last active Dec 20, 2015
Genuinely Unobtrusive Javascript
View meek.js
(function(scope) {
function destroyAutoGlobals(options) {
var allElements = document.getElementsByTagName("*"), elementId;
for (var i=allElements.length; i--; ) {
elementId = allElements[i].id;
if (elementId && window[elementId] instanceof HTMLElement) {
options && options.verbose && console.log('Destroying window["' + elementId + '"]');
window[elementId] = null;
You can’t perform that action at this time.