This example is part of this article.
This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:
- Domain filtering
- Referrer filtering
- Embed buster
This example is part of this article.
This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:
Possible values for ext-name: | |
bcmath | |
bz2 | |
calendar | |
ctype | |
curl | |
dba | |
dom | |
enchant |
<?php | |
$query = Model::findAll(); | |
var_dump($query->createCommand()->rawSql); exit; |
function toRad(degree) { return degree * Math.PI / 180; } | |
function toDeg(radian) { return radian * 180 / Math.PI; } | |
// round floating point errors | |
function rnd( float ){ | |
return (Math.floor(100000 * float) / 100000).toFixed(5); | |
} | |
function assert( a, b ){ |
FROM php:5.6-apache | |
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql | |
COPY src/ /var/www/html |
<?php | |
namespace common\models; | |
trait MasterTrait | |
{ | |
public static function getDb() | |
{ | |
$connection = clone \Yii::$app->getDb(); | |
$connection->enableSlaves = false; | |
return $connection; |
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
git diff -p \ | |
| grep -E '^(diff|old mode|new mode)' \ | |
| sed -e 's/^old/NEW/;s/^new/old/;s/^NEW/new/' \ | |
| git apply |
/* | |
* Validate Estonian national identification code. | |
* | |
* Copyright (c) 2009 Mika Tuupola | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
*/ | |
function isikukood(kood) { |