Skip to content

Instantly share code, notes, and snippets.

View dexygen's full-sized avatar

George Jempty dexygen

  • Dexygen
  • Carrollton, TX (suburb of Dallas)
View GitHub Profile
@dexygen
dexygen / two-way-validation.html
Last active January 27, 2019 01:27
Validates while typing and onblur
<!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 January 23, 2019 17:33
Correcting Annoying Validation, versioning until corrected
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
label {
display: inline-block;
width: 96px;
}
<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},
<!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 December 31, 2015 03:39
Form validation module with Promise-like interface (work in progress)
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 December 20, 2015 03:09
Genuinely Unobtrusive Javascript
(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;