Skip to content

Instantly share code, notes, and snippets.

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

Okoya Usman mokoshalb

🏠
Available for freelance job
  • NodeTent - Web Development & IT Services Company
  • Lagos, Nigeria
View GitHub Profile
@mokoshalb
mokoshalb / 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)
@mokoshalb
mokoshalb / 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
*
@mokoshalb
mokoshalb / 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
@mokoshalb
mokoshalb / 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 {
@mokoshalb
mokoshalb / aoa.html
Created October 4, 2021 09:01
Ads over video player for iframe and hls players
<html>
<head>
<title>Ads Over Content</title>
<style>
.aoa_wrap{position:relative;z-index:999;max-width:100%;max-height:100%;overflow:hidden;margin:10px}
.aoa_overlay{display:block;width:100%;height:100%;position:absolute;top:0;left:0;background:rgba(0,0,0,.8);z-index:9999;color:#fff;overflow:hidden}
.aoa_content{display:inline-block;width:100%;text-align:center;vertical-align:middle;overflow:hidden;position:relative;top:50%;-ms-transform:translateY(-50%);-webkit-transform:translateY(-50%);transform:translateY(-50%)}
.aoa_close_btn{cursor:pointer;display:block;height:16px;width:16px;position:absolute;top:50%;right:50%;background:red;color:#fff;line-height:16px;font-size:12px;text-decoration:none !important;text-align:center;font-weight:700;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px}
</style>
<script>
@mokoshalb
mokoshalb / covid.js
Created September 10, 2021 09:17
API for live statistics relating to COVID-19
/*
Dependencies:
axios
cheerio
cors
express
quick.db
request
*/
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
@mokoshalb
mokoshalb / curl.php
Created December 15, 2020 12:39
My Perfect cURL for PHP
<?php
//my perfect cURL in PHP
$proxies = array(); //Declaring an array to store the proxy list
//Adding list of proxies to the $proxies array
$proxies[] = 'user:[email protected]:54253'; //Some proxies require user, password, IP and port number
$proxies[] = '173.234.92.107'; //Some proxies only require IP
$proxies[] = '173.234.94.90:54253'; //Some proxies require IP and port number
//Choose a random proxy from our proxy list
@mokoshalb
mokoshalb / .htaccess
Created May 3, 2020 12:29
HTACCESS script to rewrite base URL like WordPress permalink.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?id=$1 [QSA,L]
@mokoshalb
mokoshalb / page-obfuscator.php
Created April 21, 2020 21:26
PHP code to obfuscate an HTML page on the browser to encode source code.
<?php
function randomString($length = 3) {
$randomString = '';
$characters = implode("", array_merge(range('a', 'z'), range('A', 'Z')));
for ($i = 0; $i < $length; $i++) $randomString .= $characters[mt_rand(0, strlen($characters) - 1)];
return $randomString;
}
function encode($output) {
$randomFunc = randomString();
$randomOut = randomString();