Skip to content

Instantly share code, notes, and snippets.

View matheusmichels's full-sized avatar
🏠
Working from home

Matheus Michels matheusmichels

🏠
Working from home
View GitHub Profile
@jefersonbelmiro
jefersonbelmiro / store.ts
Last active March 16, 2021 17:05
simple state management
class IAction {
type: any;
payload?: any;
}
class Store<T> {
private value: BehaviorSubject<T>;
private value$: Observable<T>;
private actions = new Subject<IAction>();
private destroyed$ = new ReplaySubject();
[alias]
ci = commit
co = checkout
cm = checkout master
cb = checkout -b
st = status -sb
sf = show --name-only
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
{
"parser": "babel-eslint",
"env": {
"browser": true,
"jest": true
},
"plugins": [
"react-native",
"jsx-a11y",
"import"