Skip to content

Instantly share code, notes, and snippets.

MrBar42 mrbar42

Block or report user

Report or block mrbar42

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
mrbar42 /
Created Nov 28, 2018
How to open a Github issues like a pro

A Pro Example of a Github Issue

This issue is an overview about Github issues and their structure.

Detailed Description

There are many issues around software and development and many times despite a very good intention, the lack of information renders issues irrelevant and unaddressable.

This issue serves as an inspiration and as a practical example for info reach issue.

mrbar42 /
Last active Dec 3, 2019
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
mrbar42 /
Last active Apr 2, 2018
Convert images to one combined PDF file (based on pdftk and imagemagic)
#!/usr/bin/env bash
set -e
if [[ ! "$1" ]]; then
echo "Usage: pdfer page1.png page2.png..."
exit 1
mrbar42 /
Last active Dec 10, 2019
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)


bash beach.mkv

will produce:

      |- playlist.m3u8
      |- 360p.m3u8
mrbar42 /
Last active Jun 12, 2018
graceful exit for bash script with background children/subshells
#!/usr/bin/env bash
graceful_exit() {
# include this line: trap graceful_exit TERM INT HUP
echo "Exit requested..."
local timeout=${1:-4}
local list=""
for c in $(ps -o pid= --ppid $$); do
# request children shutdown
kill -0 ${c} 2>/dev/null && kill -TERM ${c} && list="$list $c" || true
You can’t perform that action at this time.