This file contains 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 { BehaviorSubject, distinctUntilChanged, map, Observable } from "rxjs"; | |
/** | |
* A generic class to manage state in an asynchronous way. | |
*/ | |
class Store<T> { | |
/** | |
* @private field to store and notify state changes | |
* BehaviorSubject is a special type of Observable | |
* that keeps hold of the current value |
This file contains 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
#!/bin/bash | |
# from https://chromium.woolyss.com/ | |
# and https://gist.github.com/addyosmani/5336747 | |
# and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
sudo apt-get update | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:canonical-chromium-builds/stage | |
sudo apt-get update | |
sudo apt-get install chromium-browser | |
chromium-browser --headless --no-sandbox http://example.org/ |