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:
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\File; | |
use Illuminate\Support\Str; | |
/** | |
* Generates a JSON file with all translations. |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class SanctumAbilities | |
{ | |
/** | |
* Handle an incoming request. |
#!/bin/bash | |
# SOURCE: https://git-scm.com/docs/githooks | |
# SOURCE: https://gist.github.com/bartoszmajsak/1396344 | |
# get the branch name | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD 2> /dev/null) | |
if [ "$BRANCH_NAME" == "master" ] || [ "$BRANCH_NAME" == "develop" ] || [ "$BRANCH_NAME" == "test" ] || [[ "$BRANCH_NAME" = release* ]]; then | |
# if "master" or "develop", then exit normally and don't modify the commit |
const tailwindcss = require('tailwindcss') | |
const purgecss = require('@fullhuman/postcss-purgecss') | |
const autoprefixer = require('autoprefixer') | |
const postcssImport = require('postcss-import') | |
module.exports = { | |
plugins: [ | |
postcssImport, | |
tailwindcss('./tailwind.js'), | |
purgecss({ |
<?php | |
$posts = new App\Post; | |
echo $post->id; // won't fail |
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use File; | |
class MakeViewCommand extends Command | |
{ | |
/** |
protected function parseBladeCode($string, array $args = []) | |
{ | |
$generated = $this->container['blade.compiler']->compileString($string); | |
ob_start(); | |
extract($args, EXTR_SKIP); | |
try { | |
eval('?>' . $generated); |
// usage: v-selectize-dropdown="dataKeyToBindTo" | |
Vue.directive('selectize-dropdown', { | |
twoWay: true, | |
priority: 1000, | |
bind: function () { | |
var self = this; | |
$(this.el).selectize({ | |
create: true, | |
sortField: 'text', | |
onChange: function (val) { |
// Alerts | |
@include alert-variant($background, $border, $text-color); | |
// Background Variant | |
@include bg-variant($parent, $color); | |
// Border Radius | |
@include border-top-radius($radius); | |
@include border-right-radius($radius); | |
@include border-bottom-radius($radius); |