Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Md. Sumon Islam sumonst21

🏠
Working from home
Block or report user

Report or block sumonst21

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thomsh
thomsh / nginx-vod-module-install-debian-stretch.sh
Last active Sep 28, 2019
Rebuild nginx on Debian Stretch with Kaltura nginx-vod-module
View nginx-vod-module-install-debian-stretch.sh
#!/bin/bash
set -euxo pipefail
# Install latest Nginx from backports on Debian Stretch
# with nginx-vod-module from https://github.com/kaltura/nginx-vod-module
# This script/doc will rebuild the deb package
# Requirement : run on Debian Stretch with backports repository enabled
if ! egrep '^deb .+ stretch-backports' -- /etc/apt/sources.list /etc/apt/sources.list.d/*.list ; then
echo 'deb http://deb.debian.org/debian/ stretch-backports main contrib non-free' |tee /etc/apt/sources.list.d/bpo.list
fi
@sumonst21
sumonst21 / types-of-database-management-systems.md
Last active Feb 10, 2019
Types of Database Management Systems
View types-of-database-management-systems.md

Types of Database Management Systems

There are multiple types of database management systems such as relational, object, and document. In this article we discuss the types of Database Management Systems or DBMS.

Database Management Systems

A Database is a collection of records. Database management systems are designed as the means of managing all the records. Database Management is a software system that uses a standard method and running queries with some of them designed for the oversight and proper control of databases.

Types of Database Management Systems

There are four structural types of database management systems:

  • Hierarchical databases
@mrbar42
mrbar42 / README.md
Last active Oct 13, 2019
Secured HLS setup with Nginx as media server
View README.md

Secured HLS setup with Nginx as media server

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
@ve3
ve3 / Encryption.js
Last active Oct 13, 2019
Encrypt and decrypt between programming languages (PHP & JavaScript).
View Encryption.js
/**
* Encryption class for encrypt/decrypt that works between programming languages.
*
* @author Vee Winch.
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {
@mrbar42
mrbar42 / README.md
Last active Sep 27, 2019
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)
View README.md

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
      |- 360p.m3u8
@nepsilon
nepsilon / how-to-force-a-file-download-with-ningx.md
Last active Aug 10, 2019
How to force a file download with Nginx? — First published in fullweb.io issue #73
View how-to-force-a-file-download-with-ningx.md

How to force a file download with Nginx?

In short:

add_header Content-Disposition 'attachment; filename="foo.txt"';

We’re just adding a Content-Disposition header in the response. You can specify the file name, here we’re using foo.txt.

@jeoliva
jeoliva / gist:a3c4ef62b7f52926d0f339b395c0cd0c
Last active Sep 3, 2019
Get Keyframe interval (GOP size) of a stream/video using ffprobe
View gist:a3c4ef62b7f52926d0f339b395c0cd0c
ffprobe -of compact -select_streams v -show_packets [VIDEO_FILE OR STREAM_URL] | grep K$ | awk 'BEGIN{FS="|";last=-1}{split($5,a,"="); if(last != -1) {print "Keframe pos: " a[2] ", Interval: " a[2]-last " seconds"} else {print "Keyframe: " a[2]}; last=a[2]}'
@use-sparingly
use-sparingly / iframe-probe.py
Last active Sep 16, 2019
Shows GOP structure for video file using ffmpeg --show-frames output
View iframe-probe.py
#!/usr/bin/env python
#
# Shows GOP structure of video file. Useful for checking suitability for HLS and DASH packaging.
# Example:
#
# $ iframe-probe.py myvideo.mp4
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
View force_download_nginx.ini
# Force download for certain URLs with ?force_download
set $forceDownload "";
set $filename "";
if ($request_filename ~ /([^/]+)$) {
set $filename $1;
}
if ($request_uri ~ [\?&]force_download(=(?<filename>[^&$]+)|&|$)) {
set $forceDownload "attachment; filename=\"$filename\"";
View force-css-js-to-go-live-immediately.php
<?php
// Version CSS file in a theme
wp_enqueue_style(
'theme-styles',
get_stylesheet_directory_uri() . '/style.css',
array(),
filemtime( get_stylesheet_directory() . '/style.css' )
);
You can’t perform that action at this time.