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
| INSTALLED_APPS = ( | |
| 'django.contrib.admin', | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.sessions', | |
| 'django.contrib.messages', | |
| 'django.contrib.staticfiles', | |
| ) |
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 { | |
| Injectable, | |
| Injector, | |
| ComponentFactoryResolver, | |
| EmbeddedViewRef, | |
| ApplicationRef | |
| } from '@angular/core'; | |
| @Injectable() | |
| export class DomService { |
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 { | |
| Injectable, | |
| ComponentFactoryResolver, | |
| ApplicationRef, | |
| Injector | |
| } from '@angular/core'; | |
| import { | |
| ComponentType, | |
| Portal, | |
| ComponentPortal, |
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
| @keyframes fade-in-right { | |
| from { | |
| opacity: 0; | |
| transform: translateX(-15px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateX(0); | |
| } | |
| } |
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
| .agent-1, .agent-3 { | |
| opacity: 0; | |
| animation: fade-in-right ease 0.4s forwards; | |
| } | |
| .agent-2 { | |
| transform: scaleX(0); | |
| transform-origin: left; | |
| animation: grow-left cubic-bezier(0.785, 0.135, 0.15, 0.86) 0.5s forwards; | |
| animation-delay: 0.4s; |
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
| #!/usr/bin/env groovy | |
| node { | |
| def app | |
| stage("Clone") { | |
| git 'https://github.com/caroso1222/ast-viewer.git' | |
| } | |
| stage("Build") { |
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 { Subject, NEVER, interval } from 'rxjs'; | |
| import { switchMap, materialize, dematerialize } from 'rxjs/operators'; | |
| const source = interval(1000); | |
| const pauser = new Subject(); | |
| // switch between source and 'NEVER' depending on our 'control' pauser | |
| pauser | |
| .pipe( | |
| switchMap(paused => paused ? NEVER : source.pipe(materialize())), |
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 { Subject, Observable, never, BehaviorSubject } from 'rxjs'; | |
| import { switchMap, takeUntil, tap, materialize, dematerialize } from 'rxjs/operators'; | |
| export type PauseableObservable<T> = Observable<T> & Pauser<T>; | |
| export function pausify<T>(obs: Observable<T>): PauseableObservable<T> { | |
| return new Pauser<T>(obs) as PauseableObservable<T>; | |
| } | |
| class Pauser<T> { |
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
| // THIS PACKAGE DOES NOT EXIST! IT'S ONLY FOR THE DEMO! | |
| import { PauseableObservable, pausify } from 'rxjs-pausify'; | |
| export class MyClass { | |
| pausable$: PauseableObservable<number>; | |
| constructor() { | |
| this.pausable$ = pausify(interval(500)); | |
| this.pausable$.subscribe(console.log); | |
| } |
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
| class PausableObservable<T> extends Observable<T> { | |
| private pauser: BehaviorSubject<boolean>; | |
| pause(){ | |
| this.pauser.next(true); | |
| } | |
| resume(){ | |
| this.pauser.next(false); | |
| } |
OlderNewer