Skip to content

Instantly share code, notes, and snippets.

View tarikmanoar's full-sized avatar
🎯
Focusing On Web Development

Tarik Manoar tarikmanoar

🎯
Focusing On Web Development
View GitHub Profile
@tarikmanoar
tarikmanoar / .htaccess
Last active June 4, 2024 02:03
Helpful .htaccess
// .htaccess for park main domain to a dir
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteCond %{REQUEST_URI} !^/dir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /dir/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteRule ^(/)?$ dir/ [L]
@tarikmanoar
tarikmanoar / composer.json
Created March 20, 2024 08:50
Inserting Images (Like prothomalo.com)
Install Latest "intervention/image": "3.5.0",
composer require intervention/image 3.5.0
@tarikmanoar
tarikmanoar / backup.txt
Last active March 20, 2024 13:23
Laravel 10 Google Drive Backup
For generating refresh token
https://developers.google.com/oauthplayground
for any help
https://www.youtube.com/watch?v=OPDkQ3V4Goo&ab_channel=ImranicShow
composer require spatie/laravel-backup [docs: https://spatie.be/docs/laravel-backup/v8/installation-and-setup]
eta dia config file publish korben
php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"
@tarikmanoar
tarikmanoar / subdomain-laravel.md
Created July 12, 2023 03:44
This script used for creating subdomain and / path base url

In ENV

WEBSITE_HOST="example.com"

Web.php

$websiteHost = env('WEBSITE_HOST');
@tarikmanoar
tarikmanoar / sidebar-search.md
Created July 11, 2023 01:30
Sidebar/Menu searching

Search Input

<form action="">
    <div class="form-group py-0">
        <input name="term" type="text" class="form-control sidebar-search ltr"
            value="" placeholder="{{ __('Search Menu Here') }}...">
    </div>
</form>
@tarikmanoar
tarikmanoar / country.json
Created May 8, 2023 04:43
Country List with Bangla and English name
{
"afghanistan": { "bn": "আফগানিস্তান", "en": "Afghanistan" },
"albania": { "bn": "আলবেনিয়া", "en": "Albania" },
"algeria": { "bn": "আলজেরিয়া", "en": "Algeria" },
"american_samoa": { "bn": "আমেরিকান সামোয়া", "en": "American Samoa" },
"andorra": { "bn": "এন্ডোরা", "en": "Andorra" },
"angola": { "bn": "অ্যাঙ্গোলা", "en": "Angola" },
"anguilla": { "bn": "এ্যাঙ্গুইলা", "en": "Anguilla" },
"antigua_barbuda": { "bn": "এন্টিগুয়া (বার্বুডা)", "en": "Antigua (Barbuda)" },
"argentina": { "bn": "আর্জেন্টিনা", "en": "Argentina" },
@tarikmanoar
tarikmanoar / generate a 10-digit unique number that never duplicates.php
Created March 10, 2023 10:59
you can generate a 10-digit unique number that never duplicates using various techniques. One common approach is to use a combination of random numbers and a checksum digit. Here's an example implementation in PHP:
function generate_unique_number() {
$number = mt_rand(1000000000, 9999999999); // Generate a random 10-digit number
$sum = 0;
for ($i = 2; $i <= 11; $i++) { // Calculate the checksum digit
$digit = substr($number, 11 - $i, 1);
$sum += $digit * $i;
}
$checksum = ($sum % 11) == 10 ? '0' : ($sum % 11); // If the checksum is 10, replace it with 0
return substr($number, 0, 9) . $checksum; // Return the number with the checksum digit appended
}
@tarikmanoar
tarikmanoar / textcomplete.js
Created September 3, 2021 05:16
This is textcomplete.js from Yuku Takahashi
/*!
* jQuery.textcomplete.js
*
* Repositiory: https://github.com/yuku-t/jquery-textcomplete
* License: MIT
* Author: Yuku Takahashi
*/
;(function ($) {
@tarikmanoar
tarikmanoar / wrap-plus.py
Created September 2, 2021 00:11
This script automatic invite friend and give u 1GB per invite
import urllib.request
import json
import datetime
import random
import string
import time
import os
import sys
os.system("title WARP-PLUS-CLOUDFLARE By ALIILAPRO")
os.system('cls' if os.name == 'nt' else 'clear')