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
| <?php | |
| use Google\Cloud\Firestore\FirestoreClient; | |
| class Firestore extends FirestoreClient | |
| { | |
| public $batch = []; | |
| public $count = [0 => 0]; | |
| private $pointer = 0; | |
| private $FS_PATH; |
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
| <?php | |
| /** | |
| * This class will help you automatically batch operations to firestore and when batch is committed, | |
| * it will be split into sub-batches to obey the limit set by google firestore library | |
| * | |
| * USAGE: | |
| * | |
| * 1- Instantiate the class -> $f = new Firestore(['yourProjectId', './path/to/serviceAccountFile.json']); | |
| * |
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
| ########## Install NGINX ############## | |
| # Install software-properties-common package to give us add-apt-repository package | |
| sudo apt-get install -y software-properties-common | |
| # Install latest nginx version from community maintained ppa | |
| sudo add-apt-repository ppa:nginx/stable | |
| # Update packages after adding ppa |