Skip to content

Instantly share code, notes, and snippets.

View johnbwoodruff's full-sized avatar
☀️
Just living life

John Woodruff johnbwoodruff

☀️
Just living life
View GitHub Profile
@johnbwoodruff
johnbwoodruff / index.html
Created June 22, 2022 17:14
Electron Fiddle Gist - Application Menu Accelerator Bug
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
@johnbwoodruff
johnbwoodruff / cloudSettings
Last active August 27, 2020 15:57
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-27T15:57:43.365Z","extensionVersion":"v3.4.3"}
@johnbwoodruff
johnbwoodruff / validation.js
Created October 6, 2016 21:34
Personal Library
// As per the RFC2822 standards
function isValidEmail(email) {
return /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/g.test(email);
}
// NOTE: This only checks for North American phone numbers
// Supports the following formats: 444-555-1234 246.555.8888 1235554567
function isValidPhone(phone) {
return /\b\d{3}[-.]?\d{3}[-.]?\d{4}\b/g.test(phone);
}