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
<?php | |
class Stream | |
{ | |
/** | |
* Signs a url token for the stream reproduction | |
* | |
* @param string $uid The stream uid. | |
* @param array $key The key id and pem used for the signing. | |
* @param string $exp Expiration; a unix epoch timestamp after which the token will not be accepted. |
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
## Security Headers - as recommended at https://securityheaders.io ## | |
Header Set Strict-Transport-Security "max-age=31536000; includeSubDomains" | |
Header Set Content-Security-Policy "script-src 'self' *.google-analytics.com" | |
Header Set X-Frame-Options "SAMEORIGIN" | |
Header Set X-Content-Type-Options "nosniff" | |
Header Set X-XSS-Protection "1; mode=block" | |
## Security Headers ## |
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 getYear from 'date-fns/get_year' | |
import getMonth from 'date-fns/get_month' | |
import addDays from 'date-fns/add_days' | |
import startOfWeek from 'date-fns/start_of_week' | |
const rows = range(6) | |
const cols = range(7) | |
/** | |
* Returns a two-dimensional array with calendar represented dates |