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 genSolution = (number) => { | |
const string = number.toString(); | |
let result = ''; | |
for (let i = string.length; i > 0; i -= 3) { | |
result = ((i - 3 > 0) ? ',' : '') + string.slice(i - 3 >= 0 ? i - 3 : 0, i) + result; | |
} | |
return result; | |
} |
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
/* VT100 terminal reset (<ESC>c) */ | |
console.log('\033c'); | |
/* numbers comparations */ | |
> '2' == 2 | |
true | |
> '2' === 2 |
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
react/sort-comp: | |
- warn | |
- | |
order: | |
- static-methods | |
- constructor | |
- lifecycle | |
- /^on.+$/ | |
- /^handle.+$/ | |
- getters |
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 React, { Component } from 'react' | |
import Mousetrap from 'mousetrap' | |
const KeymapContext = React.createContext() | |
export const CoolKeysProvider = ({ keymap, children }) => ( | |
<KeymapContext.Provider value={keymap}>{children}</KeymapContext.Provider> | |
) |
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 React, { Component } from 'react'; | |
import { NavigationActions } from 'react-navigation'; | |
import { reaction } from 'mobx'; | |
import { inject, observer } from 'mobx-react'; | |
const navigateWithReset = (navigation, targetRoute) => { | |
const resetAction = NavigationActions.reset({ | |
index: 0, | |
actions: [NavigationActions.navigate({ routeName: targetRoute })], | |
}); |
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
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"atomKeymap.promptV3Features": true, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.formatOnPaste": true, | |
"workbench.colorTheme": "City Lights", | |
"editor.fontSize": 18, | |
"editor.folding": false, | |
"editor.hideCursorInOverviewRuler": true, | |
"editor.lineHeight": 26, |
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
let dec = process.argv[2]; | |
let result = ''; | |
const getChar = char => | |
({ | |
'10': 'A', | |
'11': 'B', | |
'12': 'C', | |
'13': 'D', | |
'14': 'E', |
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 hex = process.argv[2]; | |
const getInt = char => | |
({ | |
A: '10', | |
B: '11', | |
C: '12', | |
D: '13', | |
E: '14', | |
F: '15' |
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
.editor-actions, .title-actions { | |
display: none !important; | |
} |