See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Alpine Ajax test</title> | |
</head> | |
<body> | |
<h1>Users API Retrieval Test</h1> |
// from https://twitter.com/Steve8708/status/1504131981444980739 | |
// simplified to a function body of 8 tidy lines | |
// no loop needed, no 2d array of 3-tuples needed | |
// just 2 arrays, a findIndex call, and some indexing :) | |
export function getRelativeTimeString( | |
date: Date | number, | |
lang = "en" | |
): string { | |
const timeMs = typeof date === "number" ? date : date.getTime(); |
const PIE = 3.14; | |
function f() { | |
console.log('function f inside module a'); | |
} | |
function f123() { | |
//not accessible | |
} |
Seven different types of CSS attribute selectors | |
// This attribute exists on the element | |
[value] | |
// This attribute has a specific value of cool | |
[value='cool'] | |
// This attribute value contains the word cool somewhere in it | |
[value*='cool'] |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>DOM Injection Performance Testing</title> | |
</head> | |
<body> | |
<div id="app1"></div> | |
<ul id="app2"></ul> |
// https://twitter.com/wesbos/status/1063515277911052290/photo/1 | |
async function soFetch(input, settings = {}) { | |
const response = await fetch(input, { | |
headers: { | |
Accept: 'application/json, text/plain, */*', | |
'Content-Type': 'application/json' | |
}, | |
...settings | |
}); |
--- | |
<a id="sources"></a> | |
## Markdown sources | |
**From this point, everything you see is formatted using Markdown syntax.** It will work in every editor that supports Markdown because it's an open standard on the web. There are two ways to find the sources for this page. | |
#### 1. On GitHub |
// Customisable spacing units. these can be changed and new ones added | |
$spacing-units: ( | |
1: 3px, | |
2: 5px, | |
3: 8px, | |
4: 13px, | |
5: 21px, | |
); | |
// These will not change this is just to help generate the classes with the correct naming |
@echo off | |
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
rem add it for all file types | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Directory\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |