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 fetchDeviceState = () => Promise.resolve({ | |
| 'online': true, | |
| 'isWatering': Math.random() > 0.1, | |
| 'isFirmwareUpdating': false | |
| }) | |
| const yardianStateMachine = Machine({ | |
| id: 'yardian-state-machine', | |
| initial: 'fetchingDeviceState', | |
| context: { |
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
| Machine({ | |
| id: 'SWAPI', | |
| initial: 'idle', | |
| context: { | |
| user: null | |
| }, | |
| states: { | |
| idle: { | |
| on: { | |
| FETCH: 'loading' |
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
| location /phpmyadmin { | |
| root /usr/share/; | |
| index index.php index.html index.htm; | |
| location ~ ^/phpmyadmin/(.+\.php)$ { | |
| try_files $uri =404; | |
| root /usr/share/; | |
| fastcgi_pass 127.0.0.1:9000; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| include /etc/nginx/fastcgi_params; |
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
| function getScriptNameFromPath($path) | |
| { | |
| $pathElements = explode('/', $path); | |
| $scriptName = end($pathElements); | |
| reset($pathElements); | |
| return $scriptName; | |
| } |
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
| # the following directive in your site configuration will direct all requests to the index.php front controller | |
| location / { | |
| try_files $uri $uri/ /index.php?$query_string; | |
| } | |
| # use phpfpm to process .php files |
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
| server{ | |
| satisfy any; | |
| # https://developers.facebook.com/docs/ApplicationSecurity/#facebook_scraper | |
| allow 31.13.24.0/21; | |
| allow 31.13.64.0/18; | |
| allow 66.220.144.0/20; | |
| allow 69.63.176.0/20; | |
| allow 69.171.224.0/19; | |
| allow 74.119.76.0/22; |