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
| # SETUP # | |
| DOMAIN=example.com | |
| PROJECT_REPO="[email protected]:example.com/app.git" | |
| AMOUNT_KEEP_RELEASES=5 | |
| RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S) | |
| RELEASES_DIRECTORY=~/$DOMAIN/releases | |
| DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME | |
| # stop script on error signal (-e) and undefined variables (-u) |
| <?php | |
| /** | |
| * WP SmartPay - bKash Gateway | |
| * | |
| * Plugin Name: WP SmartPay - bKash Gateway | |
| * Plugin URI: https://wpsmartpay.com/ | |
| * Description: | |
| * Tags: bKash | |
| * Version: 0.1 |
| function toUTF8Array(str) { | |
| var utf8 = []; | |
| for (var i=0; i < str.length; i++) { | |
| var charcode = str.charCodeAt(i); | |
| if (charcode < 0x80) utf8.push(charcode); | |
| else if (charcode < 0x800) { | |
| utf8.push(0xc0 | (charcode >> 6), | |
| 0x80 | (charcode & 0x3f)); | |
| } | |
| else if (charcode < 0xd800 || charcode >= 0xe000) { |
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:
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
| <link media="all" rel="stylesheet" href="https://unpkg.com/[email protected]/dist/video-js.css"> | |
| <script src="https://unpkg.com/[email protected]/dist/video.js"></script> | |
| <video-js id="player"> | |
| <source src="//video/index.m3u8" type="application/x-mpegURL" /> | |
| </video-js> | |
| <script> | |
| var player = videojs("player"); | |
| var prefix = "key://"; | |
| var urlTpl = "https://domain.com/path/{key}"; |
It turns out that some kind hearted people already set up wildcarded domains for you already. You can use any domain below and/or any subdomain of these and they will always resolve back to 127.0.0.1 (your local machine). Here's the list of ones I know about. Let me know if there are more!
localhost - It will always works. Do you know why? I hope so.[*.]fuf.me - Managed by @fidian; it will always point to localhost for IPv4 and IPv6[*.]localtest.me[*.]127-0-0-1.org.uk[*.]vcap.me[*.]yoogle.com| <?php | |
| /** | |
| * Asssign any elementor widget to a different category | |
| * | |
| * To override the existing category just pass [ 'your-custom-category' ] | |
| * And to keep existing [ 'your-custom-category', 'basic' ] | |
| * here 'your-custom-category' is any registered category slug | |
| * | |
| * @param array $config |
| <?php | |
| /** | |
| * Disable elementor registered widget. | |
| * | |
| * This will disable all WordPress native widgets | |
| * | |
| * @param \Elementor\Widgets_Manager $widgets_manager Instance of elementor widgets manager | |
| * | |
| * @author obiPlabon <https://obiPlabon.im> | |
| * |
| /** | |
| * Changes the redirect URL for the Return To Shop button in the cart. | |
| * | |
| * @return string | |
| */ | |
| function wc_empty_cart_redirect_url() { | |
| return 'http://yourdomain.com/your-page/'; | |
| } | |
| add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' ); |