Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Alex flashjpr

🎯
Focusing
View GitHub Profile
@flashjpr
flashjpr / conditional_effects.ts
Created May 21, 2019 — forked from vespertilian/conditional_effects.ts
Two options for conditional ngrx effects
View conditional_effects.ts
@Effect()
selectAndLoadStore$: Observable<Action> = this.actions$
.ofType(storeActions.SELECT_AND_LOAD_STORE)
.withLatestFrom(this.store.select(ngrx.storeState))
.map(([action, storeState]) => [action.payload, storeState])
.switchMap(([storeName, storeState]) => {
const existsInStore = Boolean(storeState.urlNameMap[storeName]);
return Observable.if(
() => existsInStore,
Observable.of(new storeActions.SetSelectedStore(storeName)),
@flashjpr
flashjpr / nginx.conf
Created Aug 2, 2018 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
You can’t perform that action at this time.