Skip to content

Instantly share code, notes, and snippets.

View clshortfuse's full-sized avatar
😀
Reinventing the internet...

Carlos Lopez clshortfuse

😀
Reinventing the internet...
  • 06:39 (UTC -04:00)
View GitHub Profile
@clshortfuse
clshortfuse / verifier.js
Last active May 13, 2020 19:11
CSS Color 4 Verifier
const RGB_FUNCTION = 'rgba?';
const HSL_FUNCTION = 'hsla?';
const HWB_FUNCTION = 'hwb';
const CMYK_FUNCTION = 'device-cmyk';
const LAB_FUNCTION = 'lab';
const LCH_FUNCTION = 'lch';
const GRAY_FUNCTION = 'gray';
const COLOR_FUNCTION = 'color';
const FUNCTION_START = '\\(';
/** https://www.w3.org/TR/css-syntax-3/#consume-function */
@clshortfuse
clshortfuse / tediouspool.js
Last active August 2, 2022 15:19
Tedious Connection Pool
import Connection from 'tedious/lib/connection.js';
/** @typedef {import('tedious').ConnectionConfig} ConnectionConfig */
/** @typedef {import('tedious').ConnectionError} ConnectionError */
/** @typedef {import('tedious').RequestError} RequestError */
const MIN_CONNECTION_POOL = 2;
const MAX_CONNECTION_POOL = 10;
const MAX_CONNECTION_IDLE = 5000;
const MAX_CONNECTION_RETRY_TIME = 30000;