Skip to content

Instantly share code, notes, and snippets.

View dbstraight's full-sized avatar

Daniel Straight dbstraight

  • USA
View GitHub Profile
@dbstraight
dbstraight / index.html
Last active May 9, 2018 15:11
Countdown
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta http-equiv='X-UA-Compatible' content='ie=edge'>
<link rel='icon'>
<title>Countdown</title>
</head>
<body>
@dbstraight
dbstraight / angular.txt
Created April 5, 2018 14:01
Comparison of frontend framework CLI help
ng build <options...>
Builds your app and places it into the output path (dist/ by default).
aliases: b
--target (String) (Default: development) Defines the build target.
aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--output-path (Path) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--aot (Boolean) Build using Ahead of Time compilation.
@dbstraight
dbstraight / luminance.js
Created March 4, 2018 23:00
Simple luminance functions
// r = (l + 0.05) / (d + 0.05)
function contrastRatio(luminanceLight, luminanceDark) {
return (luminanceLight + 0.05) / (luminanceDark + 0.05);
}
// l = r * (d + 0.05) - 0.05
function luminanceLight(contrastRatio, luminanceDark) {
return contrastRatio * (luminanceDark + 0.05) - 0.05;
}
// d = (l + 0.05) / r - 0.05
function luminanceDark(contrastRatio, luminanceLight) {
@dbstraight
dbstraight / index.html
Last active May 9, 2018 14:53
Stringify any text
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="initial-scale=1.0, width=device-width">
<title>Stringify</title>
<style>
@font-face {
font-family: "system-monospace";