Skip to content

Instantly share code, notes, and snippets.

View OkoyaUsman's full-sized avatar
🏠
Available for freelance job

Okoya Usman OkoyaUsman

🏠
Available for freelance job
View GitHub Profile
@OkoyaUsman
OkoyaUsman / nginx.conf
Created January 12, 2023 11:57 — forked from spiermar/nginx.conf
Nginx RMTP to HLS and DASH
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid /var/run/nginx.pid;
events {
@OkoyaUsman
OkoyaUsman / nginx-rtmp.sh
Created January 18, 2023 16:30
Installation guide for Nginx with RTMP module on Ubuntu Server
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y git build-essential ffmpeg libpcre3 libpcre3-dev libssl-dev zlib1g-dev
git clone https://github.com/sergey-dryabzhinsky/nginx-rtmp-module.git
wget https://nginx.org/download/nginx-1.18.0.tar.gz
tar -xf nginx-1.18.0.tar.gz
cd nginx-1.18.0
sudo ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module
make -j 1
sudo make install
@OkoyaUsman
OkoyaUsman / instagramid.php
Last active January 12, 2024 18:32
Instagram Media ID to Shortcode & Shortcode to Media ID in PHP
<?php
class InstagramID
{
/**
* Base64 URL Safe Character Map.
*
* This is the Base64 "URL Safe" alphabet, which is what Instagram uses.
*
* @var string
*
@OkoyaUsman
OkoyaUsman / decrypt-fetch.js
Last active April 27, 2025 06:13
Decrypting HLS stream keys on the fly according to https://blog.jonlu.ca/posts/illegal-streams
(function() {
const originalFetch = window.fetch;
window.fetch = function(input, init){
if(init && init.method === 'GET' && input.indexOf("something.com/aes") !== -1) {
const rewrittenUrl = "https://example.com/key.php?key="+input;
init = { ...init, url: rewrittenUrl };
const modifiedRequest = new Request(rewrittenUrl, init);
return originalFetch.call(this, modifiedRequest);
}
return originalFetch.call(this, input, init);
@OkoyaUsman
OkoyaUsman / netnaija.py
Created September 1, 2023 12:13
A python script to auto download a series with all seasons and episodes from netnaija.com, saves the headache of popup ads.
import requests
import os
from bs4 import BeautifulSoup
SERIES_URL = "https://www.thenetnaija.net/videos/series/10134-bob-hearts-abishola" #stick the series url here and run
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36', 'Referer': 'https://www.thenetnaija.net/'}
def createFolder(folder_name):
if not os.path.exists(folder_name):
os.makedirs(folder_name)