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
| /* global jest, expect */ | |
| jest.dontMock('../App'); | |
| jest.dontMock('../../decorators/decorator'); | |
| const React = require('react'); | |
| const ReactDOM = require('react-dom'); | |
| const ReactTestUtils = require('react-addons-test-utils'); | |
| const App = require('../App'); |
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
| #/!bin/bash | |
| __chmod=`which chmod` | |
| pushd `dirname $0` >/dev/null 2>&1 | |
| [ $? -eq 1 ] && exit 1 | |
| __script_dir=`pwd` | |
| popd >/dev/null 2>&1 | |
| __base_dir=`dirname ${__script_dir}` |
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
| (() => { | |
| 'use strict'; | |
| let nums = [1, 2, 3]; | |
| Promise.all(nums.map(num => new Promise(resolve => { | |
| requestIdleCallback(() => resolve(num * num)); | |
| }))).then(processed => { | |
| console.log('done: %o', processed); | |
| }); |
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
| (() => { | |
| const _ = require('lodash'); | |
| window.addEventListener('keydown', function() { | |
| let keyName = _.trim(String.fromCharCode(event.which)); | |
| if (/[A-Z0-9]/i.test(keyName)) { | |
| switch (keyName) { | |
| case 'J': | |
| return (customEvent => { |
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
| 'use strict'; | |
| const _ = require('lodash'); | |
| const React = require('react'); | |
| let ConfirmComponent = React.createClass({ | |
| displayName: 'ConfirmComponent', | |
| propTypes: { | |
| message: React.PropTypes.string.isRequired, |
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
| 'use strict'; | |
| const _ = require('lodash'); | |
| const React = require('react'); | |
| module.exports = React.createClass({ | |
| displayName: 'ImageComponent', | |
| propTypes: { | |
| src: React.PropTypes.string.isRequired, |
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
| 'use strict'; | |
| const React = require('react'); | |
| module.exports = React.createClass({ | |
| displayName: 'IconComponent', | |
| propTypes: { | |
| glyph: React.PropTypes.string.isRequired, | |
| active: React.PropTypes.bool |
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
| convert [IN] -define jpeg:size=2560x1280 -format jpg -quality 92 -resize 2560x1280 -density 300x300 -units PixelsPerInch -unsharp 2x1.4+0.5+0 [OUT] |
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
| function Simdable(a,b,c,d) { | |
| if (typeof a === 'object') { | |
| this.simd = a; | |
| this.type = SIMD[a.toSource().replace(/^SIMD\.(.+?)\(.*$/, '$1')] | |
| } else if (d) { | |
| this.simd = SIMD.Float32x4(a, b, c, d); | |
| this.type = SIMD.Float32x4; | |
| } else { | |
| this.simd = SIMD.Float64x2(a, b); | |
| this.type = SIMD.Float64x2; |
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
| 'use strict'; | |
| const _ = require('lodash'); | |
| const cp = require('child_process'); | |
| const util = require('gulp-util'); | |
| class DevServer { | |
| constructor(options) { | |
| process.env.PORT = process.env.PORT || 3000; |