Skip to content

Instantly share code, notes, and snippets.

View IftekharDani's full-sized avatar

Iftekhar Dani IftekharDani

  • Ahmedabad.
View GitHub Profile
@IftekharDani
IftekharDani / jwt.js
Last active April 10, 2018 11:17
Node Js + express + MongoDb role-based permissions middleware.
const jwt = require('jwt-simple');
const jwtUtil = {};
jwtUtil.getAuthToken = (data) => {
return jwt.encode(data, process.env.JwtSecret);
};
jwtUtil.decodeAuthToken = (token) => {
if (token) {
@jmsaavedra
jmsaavedra / ffmpeg_install.md
Last active February 29, 2024 09:36
Install FFmpeg on a Linux Box

Install FFmpeg via CLI on Linux box

These steps walk through installing a static binary of any ffmpeg version on to your linux machine. If you want to compile from source, there are several ways to do so. Here's the official guide. Tested and works on an AWS EC2 Ubuntu instance, but should work on any Linux machine.

  • SSH into your instance and become root