Skip to content

Instantly share code, notes, and snippets.

View sanishan's full-sized avatar

M. Sanaullah sanishan

View GitHub Profile
const regex = /\.profile_view_img_(.*?) { background-image: url\('https:\/\/www\.like4like\.org\/img\/(.*?)'\);/g;
const str = document.body.innerHTML;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
@sanishan
sanishan / FileType.php
Created August 13, 2022 20:37
Get Type Name for the Extenstion
<?php
if (!function_exists("extDetect")) {
function extDetect($filename)
{
$ext = pathinfo($filename, PATHINFO_EXTENSION);
// dd($ext);
return fileTypeDetect($ext);
}
}