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
| # send logs for all traffic (including non-html) to google analytics | |
| # | |
| # in server block: | |
| # set $google_analytics_id "UA-THECORRECT-ID"; | |
| # include /srv/nginx/google_analytics; | |
| # | |
| # in location blocks: | |
| # post_action @ga; | |
| # | |
| # notes: post_action has been referred to by nginx devs as a "dirty hack" and this approach may stop working one day. |
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
| 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 asyncio | |
| import functools | |
| import json | |
| import secrets | |
| import aiohttp | |
| from concurrent.futures import ALL_COMPLETED | |
| -- Get Max ID from table | |
| SELECT MAX(id) FROM table; | |
| -- Get Next ID from table | |
| SELECT nextval('table_id_seq'); | |
| -- Set Next ID Value to MAX ID | |
| SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
| # Basic Connection Config | |
| dev tun | |
| proto udp | |
| port 1194 | |
| keepalive 10 120 | |
| max-clients 5 | |
| # Certs | |
| ca ca.crt | |
| cert server.crt |
| <?php | |
| /** | |
| * Coin Dashboard by Christian Haschek | |
| * https://blog.haschek.at | |
| * | |
| * Donations always welcome | |
| * BTC: 1ChrisHMgr4DvEVXzAv1vamkviZNLPS7yx | |
| * ETH: 0x1337C2F18e54d72d696005d030B8eF168a4C0d95 | |
| * | |
| * Read more at |