Skip to content

Instantly share code, notes, and snippets.

View vigikaran's full-sized avatar
🎯
All the tools are out there and the only thing that limits us is our imagination

Vigikaran vigikaran

🎯
All the tools are out there and the only thing that limits us is our imagination
View GitHub Profile
@vigikaran
vigikaran / bitbucket-pipeline.yml
Created February 8, 2024 10:52 — forked from juniorb2ss/bitbucket-pipeline.yml
Bitbucket Pipeline Deploy Laravel to Elasticbeanstalk using parallel steps
image: atlassian/default-image:2
definitions:
services:
redis:
image: redis:3.2
memory: 512
mysql:
image: mysql:5.7
environment:
@vigikaran
vigikaran / ffmpeg_build.sh
Created September 25, 2020 14:54 — forked from talkingnews/ffmpeg_build.sh
Build ffmpeg and all needed codecs from latest git revisions
#!/bin/bash
sudo apt-get update -qq && sudo apt-get -y install \
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
@vigikaran
vigikaran / README.md
Created January 30, 2019 18:21 — 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
@vigikaran
vigikaran / sane-caching.nginx.conf
Created November 12, 2018 16:06 — forked from philipstanislaus/sane-caching.nginx.conf
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
@vigikaran
vigikaran / app.js
Created August 6, 2018 13:50 — forked from joshnuss/app.js
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./permission"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
Add a new user to the www-data group
In this example, add a new user called vivek to the www-data group, enter:
sudo useradd -g www-data vivek
### set the password for vivek user ###
sudo passwd vivek
@vigikaran
vigikaran / Instructions.sh
Created May 11, 2018 22:03 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@vigikaran
vigikaran / update_curl.sh
Created April 26, 2018 22:33 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@vigikaran
vigikaran / gist:b5c275a7937640cc2975f671ac743be0
Created April 24, 2018 14:18
FFmpeg command line examples

Simple Stream

ffmpeg -i rtmp://server.ip/application/streamname -c copy -f flv rtmp://server.ip/application/streamname

Copy to FLV

ffmpeg -i %1 -c copy -copyts %1.flv

Copy 5 minutes to MP4

ffmpeg -i %1 -t 00:05:00 -c copy -copyts %1.mp4

Encode to MP4 at 8k bitrate, veryfast preset and film tuning, AAC Audio

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.