This file contains 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
// Create context | |
import { createContext } from 'react'; | |
export type ExampleContext = { | |
someFunction?: (arg) => void; | |
someProperty?: string[]; | |
}; | |
export default createContext<ExampleContext>(null); |
This file contains 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
{ | |
"key": "ctrl+up", | |
"command": "cursorMove", | |
"args": { | |
"to": "up", | |
"by": "line", | |
"value": 4 | |
}, | |
"when": "editorTextFocus" | |
}, |
This file contains 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
git clone [email protected]:companyName/repoName |
This file contains 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
1) Edit: ~/.ssh/config | |
2) Add: | |
Host gitlab.com-companyName | |
HostName gitlab.com | |
User [email protected] | |
IdentityFile ~/.ssh/id_ed25519_companyName | |
3) Clone the repo: |
This file contains 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
alias ls='ls -lhX --classify --color=auto --group-directories-first' | |
funcsave ls |
This file contains 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
{{log this}} |
This file contains 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
.remember-me__title { | |
float: left; | |
} | |
.remember-me input { | |
visibility: hidden; | |
opacity: 0; | |
float: left; | |
position: absolute; | |
} | |
.remember-me input:checked + span { |
This file contains 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
@Component({ | |
template: ` | |
<my-widget> | |
<comp-a/> | |
</my-widget> | |
` | |
}) | |
class App {} | |
@Component({ |
This file contains 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
export default function reducer(state=initialState, action) { | |
switch(action.type) { | |
case defs.MAKE_PAYMENT_SUCCESS: | |
return state.withMutations(s => | |
s.set('modalOpen', false) | |
.set('loading', false) | |
.setIn(['loans', action.loan.id], Immutable.fromJS(action.loan)) | |
) | |
case defs.MAKE_PAYMENT_FAILED: | |
return state.withMutations(s => |
This file contains 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 { createAction } from 'redux-actions'; | |
/** | |
* Creates an async action creator | |
* | |
* @param {String} TYPE the type of the action | |
* @param {Function} executeAsync the function to be called async | |
* @return {Funtion} the action creator | |
*/ | |
export default function createAsyncAction(TYPE, executeAsync) { |
NewerOlder