Skip to content

Instantly share code, notes, and snippets.

View ironmanMA's full-sized avatar
🏠
Working from home

Mohammad Arafath ironmanMA

🏠
Working from home
View GitHub Profile
@ironmanMA
ironmanMA / gistlog.yml
Created June 15, 2023 09:37 — forked from askilondz/gistlog.yml
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets

Keybase proof

I hereby claim:

  • I am ironmanMA on github.
  • I am ironmanma (https://keybase.io/ironmanma) on keybase.
  • I have a public key whose fingerprint is 226A 05C7 2046 14A5 D2D4 AC9D 53AE 087A 1589 AAB5

To claim this, I am signing this object:

@ironmanMA
ironmanMA / killAllLinkeInInvites
Created July 18, 2017 13:50
kil lAll LinkeIn Pending Invites
/*
run this on https://www.linkedin.com/mynetwork/invitation-manager/sent/
*/
setInterval(function() { jQuery('.mn-person-card__card-actions .mn-person-card__person-btn-ext')[0].click()}, 200);
setInterval(function() { window.scrollBy(0,500)}, 100);
import random
__author__ = 'mohammad'
_memoization_map={}
def try_collatz(num):
try:
# print num
if num == 1:
@ironmanMA
ironmanMA / autoscale_sample.py
Last active June 4, 2016 13:08 — forked from liamf/autoscale_sample
Demonstrates using patched boto to create an autoscaling group of servers, scaled up/down by CPU Utilisation
#################################################################################
# Import modules
#################################################################################
import os
import time
import sys
import socket
import string
@ironmanMA
ironmanMA / 00.howto_install_phantomjs.md
Created January 25, 2016 13:10 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@ironmanMA
ironmanMA / bucket_policy.js
Created September 23, 2015 23:19 — forked from philfreo/bucket_policy.js
AWS S3 bucket policy to make all files public (+CORS)
{
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::bucket_name_here/*"
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import urllib
import urllib2
import httplib
import json
import sys, cv2
# Refactored https://realpython.com/blog/python/face-recognition-with-python/
def cascade_detect(cascade, image):
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
return cascade.detectMultiScale(
gray_image,
scaleFactor = 1.15,
minNeighbors = 5,
@ironmanMA
ironmanMA / tomcat8.sh
Last active August 29, 2015 14:15 — forked from boniface/tomcat8.sh
Startup Script for tomcat8
#Create Group
# groupadd tomcat
# useradd -g tomcat -d /usrlocal/tomcat8 tomcat
# usermod -G www-data tomcat
# chown tomcat:tomcat /usrlocal/tomcat8 -R
# vim /etc/init.d/tomcat
#!/bin/sh