Skip to content

Instantly share code, notes, and snippets.

View luizbafilho's full-sized avatar

Luiz Filho luizbafilho

View GitHub Profile
@luizbafilho
luizbafilho / auth.lua
Created May 17, 2017 01:42 — forked from fur-q/auth.lua
nginx rtmp/hls server setup
-- add users:
-- $ htpasswd -s -c /etc/nginx-rtmp/.htpasswd streamname
-- stream:
-- $ ffmpeg -i foo.mp4 -c copy -f flv rtmp://abc.de/streamname?auth=password
local users = {}
for line in io.lines("/etc/nginx-rtmp/.htpasswd") do
local user, pass = line:match("([^:]+):{SHA}([^\n]+)")
users[user] = pass
end
@luizbafilho
luizbafilho / Makefile
Created February 22, 2017 01:36 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.