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
| ReactDOM.render( | |
| <App />, | |
| rootEl | |
| ) | |
| if (module.hot) { | |
| module.hot.accept('./App', () => { | |
| const NextApp = require('./App').default | |
| ReactDOM.render( | |
| <NextApp />, |
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
| D=$'\e[37;40m' | |
| PINK=$'\e[35;40m' | |
| GREEN=$'\e[32;40m' | |
| ORANGE=$'\e[33;40m' | |
| hg_ps1() { | |
| hg prompt "{${D} on ${PINK}{branch}}{${D} at ${ORANGE}{bookmark}}{${GREEN}{status}}" 2> /dev/null | |
| } | |
| export CLICOLOR=1 |
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
| sudo mkdir -p /data/db | |
| sudo chown -R `id -u` /data/db |
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 contains(a, obj) { | |
| var i = a.length; | |
| while (i--) { | |
| if (a[i] === obj) { | |
| return true; | |
| } | |
| } | |
| return false; | |
| } |
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 getCombinations( list ) { | |
| var set = [], | |
| listSize = list.length, | |
| combinationsCount = (1 << listSize), | |
| combination; | |
| for ( var i = 1; i < combinationsCount; i++ ) { | |
| var combination = []; | |
| for ( var j=0; j<listSize; j++ ) { | |
| if ( (i & (1 << j)) ) { |