View withHandlers.js
import { Component } from 'react'
import createEagerFactory from './createEagerFactory'
import createHelper from './createHelper'
const mapValues = (obj, func) => {
const result = []
let i = 0
/* eslint-disable no-restricted-syntax */
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
View wrapInto.js
import React from 'react';
import identity from './identity';
import createHelper from 'recompose/createHelper';
import createEagerElement from 'recompose/createEagerElement';
export default createHelper((Wrapper, mapProps) => Component => props => {
mapProps = mapProps || identity;
return (
<Wrapper {...mapProps(props)}>
{createEagerElement(Component, props)}
View shareReplay.js
/**
* publishReplay + refCount.
* Similar to share but using a ReplaySubject.
*
* @param {number} [count=1]
* @returns {Observable}
*/
export function shareReplay(count = 1) {
return this.publishReplay(count).refCount();
}
View gulpfile.js
var gulp = require('gulp');
var gutil = require('gulp-util');
var watchify = require('watchify');
var uglify = require('gulp-uglify');
var buffer = require('vinyl-buffer');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
var browserSync = require('browser-sync');
var sass = require('gulp-ruby-sass');
var filter = require('gulp-filter');
View .eslintrc
{
"env": {
"browser": true,
"node": true,
"mocha": true
},
"globals": {
"angular": false,
"Promise": true
View config.js
var minimist = require('minimist');
var path = require('path');
var yaml = require('js-yaml');
var fs = require('fs');
var defaultsDeep = require('merge-defaults');
/**
* Define config path.
*/
View directive.test.js
describe('My directive', function () {
var scope, $compile;
beforeEach(module('app.directives'));
beforeEach(inject(function ($injector) {
$compile = $injector.get('$compile');
var $rootScope = $injector.get('$rootScope');
scope = $rootScope.$new();
View controller.test.js
describe('My controller', function () {
var scope, createController;
beforeEach(module('app.controllers'));
beforeEach(inject(function ($injector) {
var $rootScope = $injector.get('$rootScope');
var $controller = $injector.get('$controller');
scope = $rootScope.$new();
View gist:0fff0ac542774d53e154
# You may have to logout and log back in again for
# this to take effect.
sudo gpasswd -a $USER docker
# Restart the docker daemon.
sudo service docker restart
View Preferences.sublime-settings
{
"color_scheme": "Packages/User/Solarized (Dark) (SL).tmTheme",
"draw_white_space": "all",
"font_size": 17,
"ignored_packages":
[
"Markdown",
"Vintage"
],
"rulers":