This file contains hidden or 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
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
const HyperList = require('hyperlist') | |
const root = document.createElement('div') | |
const data = ['a', 'b', 'c', 'd'] | |
const conf = { | |
height: 160, |
This file contains hidden or 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
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
const HyperList = require('hyperlist') | |
const root = document.createElement('div') | |
const data = ['a', 'b', 'c', 'd'] | |
const conf = { | |
height: 160, |
This file contains hidden or 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
exports.onHandleAST = function (ev) { | |
/** | |
* The topmost body of the given AST. | |
*/ | |
var outerBody = ev.data.ast.body; | |
/** | |
* If the file is empty, return early. | |
*/ | |
if (outerBody.length === 0) { |
This file contains hidden or 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
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
This file contains hidden or 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
/** | |
* Pass rootElement ($0), and rounds. Default amount of rounds is 1000. | |
* | |
* Don't bump it up to say a million rounds over a set of 5000 watchers, it will take a *long* time. | |
*/ | |
function idleDigestTime (root, rounds) { | |
var results = []; | |
angular.element(root).injector().invoke(function ($rootScope) { |
This file contains hidden or 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
/** | |
* getWatchers().length - all the watchers on your page | |
* getWatchers($0).length - all the watchers within your selected element | |
*/ | |
function getWatchers(root) { | |
root = angular.element(root || document.documentElement); | |
var watcherCount = 0; | |
function getElemWatchers(element) { |
This file contains hidden or 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
tap phinze/cask | |
tap caskroom/versions | |
tap KevinSjoberg/formulas | |
install brew-cask | |
install git | |
# install node | |
install imagemagick | |
install m | |
install n |
This file contains hidden or 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
/** | |
* Directive, '@' properties isolate scope, not passing any values. | |
* commit: https://github.com/angular/angular.js/pull/11628/files | |
*/ | |
var obj = { fbHref: undefined, fbLayout: undefined, fbAction: undefined, fbShowFaces: undefined, fbShare: undefined }; | |
var keys = Object.keys(obj); | |
# 1.4.2 | |
LOG: 'obj.keys', ['fbHref', 'fbLayout', 'fbAction', 'fbShowFaces', 'fbShare'] |
This file contains hidden or 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
/** lazy module **/ | |
function config ($stateProvider) { | |
$stateProvider.state('root.about', { | |
url: '/about' | |
}); | |
}); | |
export default angular | |
.module('lazyModule', ['ui.router']) | |
.config(config); |
This file contains hidden or 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
import { default as stateMachine } from './stateMachine'; | |
var internalDeps = [ ]; | |
var thirdPartyDeps = [ 'ui.router', 'oc.lazyLoad' ]; | |
function config ($locationProvider, $stateProvider) { | |
$stateProvider.state('root', { | |
url: '', | |
abstract: true, | |
}); |
NewerOlder