This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint asi: true, esnext: true */ | |
(() => { | |
'use strict' | |
const ROOT_MODULE = 'app' | |
const rootElement = angular.element(document) | |
const mockApp = angular.module('mockApp', []).provider({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint asi: true, esnext: true */ | |
(() => { | |
'use strict' | |
// -------------------------------------------------------------------------- | |
class DefaultMap extends Map { | |
get(key) { | |
return super.has(key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict' | |
// -------------------------------------------------------------------------- | |
window.copyToClipboard = function copyToClipboard (value) { | |
if (!value) return // Can't copy zero characters! | |
const $input = Object.assign(document.createElement('input'), { | |
type: 'text', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-moz-document domain("github.com") { | |
@import url(https://fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic,700italic); | |
body { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
text-rendering: optimizeLegibility; | |
word-spacing: normal !important; | |
letter-spacing: normal !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// globals.js | |
// https://gist.github.com/pocotan001/6305714 | |
// Finding improper JavaScript globals | |
(function() { | |
var prop, cleanWindow, | |
globals = new function globals() {}, | |
body = document.body, | |
iframe = document.createElement('iframe'), | |
ignore = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----------------------------------------------------------------------------- | |
### Mocha Guide to Testing ### | |
Objective is to explain `describe()`, `it()`, and `before()`/etc hooks. | |
1. `describe()` is merely for grouping, which you can nest as deep | |
as is required. | |
2. `it()` is a test case. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint asi: true, esnext: true */ | |
(() => { | |
'use strict' | |
const BOLD = 'font-weight: bold;', | |
LINK = 'text-decoration: underline; color: #03d', | |
RESET = 'font-weight: normal; text-decoration: none; color: black; background-color: white; display: inline' | |
// ---------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Promise.prototype.finally = function (callback) { | |
return this.then( | |
value => this.constructor.resolve(callback()).then(() => value), | |
reason => this.constructor.resolve(callback()).then(() => { throw reason }) | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var cssNumbers = { | |
columnCount: true, | |
fillOpacity: true, | |
flexGrow: true, | |
flexShrink: true, | |
fontWeight: true, | |
lineHeight: true, | |
opacity: true, | |
order: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint asi: true, esnext: true */ | |
; (function() { | |
'use strict' | |
/* | |
Iterator for a selection's range objects e.g. | |
const r = [...ranges()] | |
*/ |