Skip to content

Instantly share code, notes, and snippets.

View sumonst21's full-sized avatar
💭
Starred for hope, forked for later

Md. Sumon Islam sumonst21

💭
Starred for hope, forked for later
View GitHub Profile
@sumonst21
sumonst21 / Install Nginx.md
Created June 20, 2019 17:31 — forked from janikvonrotz/Install Nginx.md
Ubuntu: Install Nginx #Nginx #Markdown

Introduction

Nginx (pronounced "engine-ex") can be used as an open source reverse proxy server, as well as a load balancer, HTTP cache, and not to forget a fast and powerful web server.

Requirements

  • Ubuntu server

Installation

@sumonst21
sumonst21 / 1nginx.conf
Created June 28, 2019 20:09 — forked from josephbolus/1nginx.conf
Wordpress Nginx Config
# ---------------------------------------
# Main Module
# ---------------------------------------
user nginx;
# This number should be, at maximum, the number of CPU cores on your system.
worker_processes 2;
pid /var/run/nginx.pid;
# Only log critical errors
@sumonst21
sumonst21 / nginx.conf
Created July 2, 2019 23:52 — forked from CSRaghunandan/nginx.conf
Nginx configuration for serving mp4 videos
#user nobody;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@sumonst21
sumonst21 / README.md
Created July 3, 2019 02:42 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

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

Note: This is an older post that I did back when I thought I might have time to be a blogger. Oh I was oh so wrong. However, it has proven useful for some folks on stackoverflow. Thus I'm keeping it alive here on Gist.

One of my past projects dealt heavily with an open source Apple technology called HTTP Live Streaming. It’s an HTTP based streaming protocol that at its most fundamental level provides a way to stream video and audio from just about any server with nothing but a few free software tools provided by Apple**. However, it has a few additional features that I think make it a really exciting tool. Yet, I haven’t seen HTTP Live Streaming used very much. This is probably mainly due to the combination of a lack of good/clear documentation, and Apple’s Live Streaming Developer Tools being command line based also make the barrier to entry higher than many developers want to deal with.

The hope is to share my understanding of how to use this technology to:

@sumonst21
sumonst21 / gist:caca9481bd92f8b8030fac9ef7308e5f
Created July 8, 2019 23:54 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@sumonst21
sumonst21 / html5-video-play-file-blob.html
Created July 12, 2019 00:15 — forked from edin-m/html5-video-play-file-blob.html
HTML video play file blob object url
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<video></video>
<br/>
<input type="file" name="file" id="fileItem" onchange="onChange()" >

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

@sumonst21
sumonst21 / index.html
Created July 12, 2019 11:33 — forked from sbalay/index.html
Videojs hls example
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>videojs-contrib-hls embed</title>
<!--
Uses the latest versions of video.js and videojs-contrib-hls.
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {