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
ext_if="vtnet0" | |
icmp_types = "{ echoreq unreach }" | |
table <bruteforce> persist | |
table <rfc6890> { 0.0.0.0/8 10.0.0.0/8 100.64.0.0/10 127.0.0.0/8 169.254.0.0/16 \ | |
172.16.0.0/12 192.0.0.0/24 192.0.0.0/29 192.0.2.0/24 192.88.99.0/24 \ | |
192.168.0.0/16 198.18.0.0/15 198.51.100.0/24 203.0.113.0/24 \ | |
240.0.0.0/4 255.255.255.255/32 } |
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:
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
ffmpeg -i input.mp4 -profile:v baseline -level 3.0 -s 640x360 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls index.m3u8
kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.8/deploy/manifests/00-crds.yaml | |
kubectl create namespace cert-manager | |
kubectl label namespace cert-manager certmanager.k8s.io/disable-validation="true" | |
helm repo add jetstack https://charts.jetstack.io | |
helm repo update |
kubectl -n cattle-system patch deployments cattle-cluster-agent --patch '{ | |
"spec": { | |
"template": { | |
"spec": { | |
"hostAliases": [ | |
{ | |
"hostnames": | |
[ | |
"{{ rancher_server_hostname }}" | |
], |
output/ |
#!/bin/sh | |
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
# delete all evicted pods from all namespaces | |
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all containers in ImagePullBackOff state from all namespaces | |
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces |
import sqlite3 | |
from netaddr import IPNetwork | |
def is_private_ip(value): | |
return IPNetwork(value).is_private() | |
connection = sqlite3.connect(':memory:') | |
cur = connection.cursor() | |
cur.execute(""" |
import asyncio | |
import functools | |
import json | |
import secrets | |
import aiohttp | |
from concurrent.futures import ALL_COMPLETED | |