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 observable = of('response') | |
| observable.pipe(first()).subscribe(result => { | |
| // Do the logic with the result emited by the observable | |
| // ................. | |
| // ................. | |
| // ................. | |
| }); |
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 observable = of('response') | |
| observable.subscribe(result => { | |
| // Do the logic with the result emited by the observable | |
| // ................. | |
| // ................. | |
| // ................. | |
| }); |
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
| // Delete all data in elasticsearch | |
| curl -X DELETE 'http://localhost:9200/_all' | |
| // Backup data to data.json | |
| elasticdump --input=data.json --output=http://localhost:9200 --type=data | |
| // Import data.json to elasticsearch | |
| elasticdump --input=http://localhost:9200/ --output=data.json --type=data --limit 50000 | |
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 { FinalGoalState, finalGoalStateName } from './store/final-goal/final-goal.state'; | |
| import { Component, OnInit, OnDestroy, ViewChild, ElementRef } from '@angular/core'; | |
| import { Select, Store } from '@ngxs/store'; | |
| import { fromEvent, Observable, Subscription } from 'rxjs'; | |
| import { Navigate } from '@ngxs/router-plugin'; | |
| import { LocalStorageUtil } from './utils/local-storage.util'; | |
| import { UserState, userStateName } from './store/user/user.state'; | |
| import { IUserState } from './store/user/user.models'; | |
| import { length } from 'ramda'; | |
| import { IFinalGoalState, IFinalGoal } from './store/final-goal/final-goal.models'; |
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
| <div class="page"> | |
| <gridster [options]="options" #dragContainer> | |
| <gridster-item [item]="dashboard[0]"> | |
| <div class="container-500-500"> | |
| <div class="content"></div> | |
| </div> | |
| </gridster-item> | |
| <gridster-item [item]="dashboard[1]"> | |
| <div class="container-500-500"> | |
| <div class="content"></div> |
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 { FinalGoalState, finalGoalStateName } from './store/final-goal/final-goal.state'; | |
| import { Component, OnInit, OnDestroy, ViewChild, ElementRef } from '@angular/core'; | |
| import { Select, Store } from '@ngxs/store'; | |
| import { Observable, Subscription } from 'rxjs'; | |
| import { Navigate } from '@ngxs/router-plugin'; | |
| import { LocalStorageUtil } from './utils/local-storage.util'; | |
| import { UserState, userStateName } from './store/user/user.state'; | |
| import { IUserState } from './store/user/user.models'; | |
| import { length } from 'ramda'; | |
| import { IFinalGoalState, IFinalGoal } from './store/final-goal/final-goal.models'; |
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 { | |
| trim, | |
| match, | |
| replace, | |
| split, | |
| test, | |
| toLower, | |
| toString, | |
| toUpper, | |
| partial, |
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 { v4 } from 'uuid' | |
| import { random } from 'lodash' | |
| import { merge } from 'ramda' | |
| import { GameStatus, IGameState } from './model' | |
| export class Helper { | |
| static secretWords = [ | |
| 'adventurous', | |
| 'courageous', | |
| 'extramundane', |
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 { IGameState } from './model' | |
| import { Subject, Observable } from 'rxjs' | |
| export class StateManager { | |
| static state$Dict: { [key: string]: Observable<IGameState> } = {} | |
| static letter$Dict: { [key: string]: Subject<string> } = {} | |
| static setState$ = (key: string, state: Observable<IGameState>) => { | |
| StateManager.state$Dict[key] = state | |
| } |
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 { v4 } from 'uuid' | |
| import { random } from 'lodash' | |
| import { merge } from 'ramda' | |
| import { GameStatus, IGameState } from './model' | |
| export class Helper { | |
| static secretWords = [ | |
| 'adventurous', | |
| 'courageous', | |
| 'extramundane', |