Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Matthew Stokeley matthewstokeley

🎯
Focusing
Block or report user

Report or block matthewstokeley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@matthewstokeley
matthewstokeley / docker-compose.yml
Last active Jan 23, 2020
Leibowitz containerized wordpress configuration
View docker-compose.yml
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: admin
View inset.js
const Li = `styled.li
box-shadow: 0 1px 1px inset rgba(0,0,0,0.500);
${props => props.primary && css`
`}
`
View ECMA-Grammar.md

Grammar

Context-free grammars

  • Productions
    • Nonterminal
    • Terminal
  • Chain Production

Lexical Grammar

  • Defines set of production
@matthewstokeley
matthewstokeley / tti.md
Last active Jan 10, 2020
Time to interactive
View tti.md

JavaScript and time-to-interactivity notes

Javascript is expensive - must be downloaded, then parsed, compiled and executed

  • Code Splitting
    • Webpack options (some of these can be used without webpack)
      • Manually use entry points to remove unused codes
      • Use a plugin to check for code duplication
      • Dynamic imports
View http-client-Node.js
// from the Node.js source
if (methodIsString && method) {
if (!checkIsHttpToken(method)) {
throw new ERR_INVALID_HTTP_TOKEN('Method', method);
}
method = this.method = method.toUpperCase();
} else {
method = this.method = 'GET';
}
@matthewstokeley
matthewstokeley / xr-spec.md
Created Dec 18, 2019
From the WebXR API spec
View xr-spec.md

"Subsequent algorithms requesting enumeration MUST reuse the cached list of immersive XR devices"

View gist:ee755219bc76db05f8e87a4625e6b4bc
```
/**
*
* @link https://github.com/nodejs/node/blob/master/lib/_http_agent.js
*/
if (called)
return;
called = true;
if (err)
return cb(err)
View filter-branch-notes.md
git filter-branch notes

Summary
	- Rewrite git revision history
		- Applicable to `rev-list` branches
		- Only rewritepositive refs
		- Recommitted without any changes, unless filter is specified
		- Honors `.git/info/grafts` and refs in `refs/replace/`
		- Original refs written in `refs/original/`
@matthewstokeley
matthewstokeley / preparation.js
Last active Dec 28, 2019
What if javascript had printf - pdo-style api
View preparation.js
// @todo wishlist - isometric node-style error handling
const traverse = function() {}
const iterate = (arr) => {
const arr = arr;
const pos = 0;
const next = () => {}
You can’t perform that action at this time.