This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)
Given the code
<?xml version="1.0"?> | |
<ruleset name="MyStandard"> | |
<description> | |
PSR2 with changes: | |
* tabs instead of spaces (https://gist.github.com/gsherwood/9d22f634c57f990a7c64) | |
* bracers on end of line instead new line | |
</description> | |
<!-- tabs --> | |
<arg name="tab-width" value="4"/> |
const { assert } = require('chai'); | |
function isError(e) { | |
if (typeof e === 'string') { | |
return Promise.reject(new Error(e)); | |
} | |
return Promise.resolve(e); | |
} | |
var p1={ | |
x:0, | |
y:0 | |
}; | |
var p2={ | |
x:0, | |
y:1 | |
}; |
# Main entry point | |
SOURCE = src/app.js | |
# The dependencies (other than node_modules/**) | |
LIBS = $(shell ls src/lib/*.js src/components/*.js) | |
# The target | |
TARGET = build/app.js | |
# Compilation flags |
// Open Script Editor and Export this as an Application | |
// | |
// Then drop a keynote file on it in the Finder and it will properly resize | |
// and rotate everything so the Keynote file becomes usable as a prototype | |
// in the iPhone keynote app | |
// rotateDocument exported function | |
// | |
// Accepts a Keynote document and will rotate | |
// all the slides and elements in the slide 90 degrees |
{ | |
"exclude": [ | |
".git/**", | |
"node_modules/**" | |
], | |
"vendor-prefix-align": false, | |
"sort-order": [ [ | |
"-webkit-animation", | |
"-moz-animation", | |
"-ms-animation", |
application:open-your-keymap | |
application:open-your-stylesheet | |
autocomplete:attach | |
autoflow:reflow-paragraph | |
bookmarks:clear-bookmarks | |
bookmarks:jump-to-next-bookmark | |
bookmarks:jump-to-previous-bookmark | |
bookmarks:toggle-bookmark | |
bookmarks:view-all | |
check:correct-misspelling |
code delimiters: <% %> | |
# keynote | |
- your business logic will live longer than your interface | |
- stateless | |
- no "spaghetti state" | |
- application should be able to reflect any combination of data | |
- views should transparently reflect models | |
- backbone patterns | |
- custom model methods |
@mixin bleed( | |
$width: $grid-padding, | |
$sides: left right, | |
$style: $container-style | |
) { | |
@if $border-box-sizing { @include box-sizing(content-box) } | |
@if type-of($width) == 'list' { | |
$width: filter($width, of); | |
$width: space(nth($width,1), nth($width,2), $style); |