Moved to Medium
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
| #/usr/bin/env bash | |
| baseBranch=master | |
| if [[ $# -eq 1 ]]; then | |
| baseBranch=$1 | |
| fi | |
| echo "Update the repository..." | |
| git fetch -p | |
| echo |
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 delay(milliseconds) { | |
| return new Promise( | |
| resolve => setTimeout(resolve, milliseconds) | |
| ) | |
| } |
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
| render () { | |
| const { visible } = this.props | |
| let visibleContent | |
| if (visible) { | |
| visibleContent = this.getVisibleContent() | |
| } | |
| return ( | |
| <div className={ visible ? 'expanded' : 'collapsed' }> | |
| { visibleContent } // No more logic here and useless "null" |
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
| render () { | |
| const { visible } = this.props | |
| return ( | |
| <div className={ visible ? 'expanded' : 'collapsed' }> | |
| { | |
| visible ? <div> | |
| // Dozens of lines of JSX code here | |
| // Dozens of lines of JSX code here | |
| // Dozens of lines of JSX code here | |
| // Dozens of lines of JSX code here |
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
| class TextInputControl extends _react2.default.Component { | |
| constructor(props) { | |
| super(props); | |
| this.bindInstanceMethods('handleBlurEvent', 'handleChangeEvent'); | |
| this.handleChangeEventDebounced = (0, _debounce2.default)(this.handleChangeEvent, props.inputChangeDebounceWait); | |
| } | |
| bindInstanceMethods(...methods) { | |
| methods.forEach(method => this[method] = this[method].bind(this)); |
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
Show hidden characters
| { | |
| "presets": ["react"], | |
| "plugins": ["transform-es2015-modules-commonjs"] | |
| } |
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
| #!/usr/bin/env bash | |
| mkdir Tools | |
| cd Tools | |
| ln -s /Applications/Utilities/Activity\ Monitor.app Activity\ Monitor | |
| ln -s /Applications/Android\ Studio.app Android\ Studio | |
| ln -s /Applications/Atom.app Atom | |
| ln -s /Applications/Automator.app Automator | |
| ln -s /Applications/CocoaRestClient.app CocoaRestClient |
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
| { | |
| "presets": ["es2015", "react"] | |
| } |