Skip to content

Instantly share code, notes, and snippets.

View flashjpr's full-sized avatar
🎯
Focusing

Alex flashjpr

🎯
Focusing
View GitHub Profile
@vespertilian
vespertilian / conditional_effects.ts
Created February 9, 2017 04:09
Two options for conditional ngrx effects
@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)),
@javierarques
javierarques / protractorAPICheatsheet.md
Last active January 31, 2023 08:51
Protractor API Cheatsheet
@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@plentz
plentz / nginx.conf
Last active March 31, 2024 18:40
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"