Skip to content

Instantly share code, notes, and snippets.

View baznak's full-sized avatar
🤒
Out sick

mahmoud mansouri baznak

🤒
Out sick
View GitHub Profile
@baznak
baznak / download_file.php
Created August 29, 2022 12:32 — forked from saleemkce/download_file.php
PHP File Download Script - Download large file in chunks.
<?php
/*ini settings*/
set_time_limit(0);
ini_set('memory_limit', '512M');
//DOWNLOAD SCRIPT
$filePath = "G:/Software/versions/..PATH TO DOWNLOAD FILE...zip"; // set your download file path here.
download($filePath); // calls download function
function download($filePath)
{
@baznak
baznak / wiki-100k.txt
Created May 22, 2022 22:08 — forked from h3xx/wiki-100k.txt
Wictionary top 100,000 most frequently-used English words [for john the ripper]
#!comment: This is a list of the top 100,000 most frequently-used English words
#!comment: according to Wiktionary.
#!comment:
#!comment: It was compiled in August 2005 and coalesced into a handy list for
#!comment: use in John the Ripper.
#!comment:
#!comment:
#!comment: Pull date: Sun Jan 15 22:03:54 2012 GMT
#!comment:
#!comment: Sources:
@baznak
baznak / html5-video-play-file-blob.html
Created January 29, 2022 04:10 — forked from edin-m/html5-video-play-file-blob.html
HTML video play file blob object url
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<video></video>
<br/>
<input type="file" name="file" id="fileItem" onchange="onChange()" >
@baznak
baznak / Arabic character to Persian (Farsi) - PHP
Created September 18, 2019 15:55 — forked from amirasaran/Arabic character to Persian (Farsi) - PHP
convert Arabic character to Persian (Farsi) - PHP
<?php
public static function arabicToPersian($string)
{
$characters = [
'ك' => 'ک',
'دِ' => 'د',
'بِ' => 'ب',
'زِ' => 'ز',
'ذِ' => 'ذ',
'شِ' => 'ش',
@baznak
baznak / inc.php
Last active September 4, 2019 21:25
<?php
define('ROOT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/');
define('ROOTS', $_SERVER['DOCUMENT_ROOT'] . '/');
//define('ROOT_DIR', dirname(__FILE__).'/');
function getUrl($url, $time = 30)
{
$url = str_replace(' ', '%20', trim($url));
@baznak
baznak / sitemap.php
Created August 5, 2019 23:45 — forked from salayhin/sitemap.php
Class for create sitemap in PHP
<?php
/**
* Create Site map
*
* @category Model
* @author Md. Sirajus Salayhin <salayhin@gmail.com>
*
*/
@baznak
baznak / ConvertFinglishToFarsi.class.php
Created July 22, 2019 16:33 — forked from masihyeganeh/ConvertFinglishToFarsi.class.php
Finglish to Persian transliteration
<?php
@error_reporting(E_ALL);
@set_time_limit(0);
class ConvertFinglishToFarsi
{
/**
* Default Options
*/
public $useFarsiNumbers = false; //Replace English numbers with Persian numbers