Skip to content

Instantly share code, notes, and snippets.

View sohelrana820's full-sized avatar
I may be slow to respond.

Sohel Rana sohelrana820

I may be slow to respond.
View GitHub Profile
sohelrana820 / hover.css
Last active February 9, 2024 18:53
How to stop navbar items shaking on css hover
* Put anchor (<a> tag) link text inside the title attribute text
.link::before {
display: block;
content: attr(title);
font-weight: 600;
height: 0;
overflow: hidden;
visibility: hidden;
sohelrana820 / OrdinaryCarsController.php
Last active July 12, 2022 08:20
Delete file after download
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . $zip['name']);
header('Content-Transfer-Encoding: binary');
header('Connection: Keep-Alive');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
//header('Content-Length: ' . $size);
sohelrana820 / expression.txt
Created June 21, 2022 05:57
Regular Expression for Validating Bangladeshi Mobile number
Regulat Expression Patter: ^(?:\\+?\\+880|880|0)?1\d{9}$
sohelrana820 /
Last active July 7, 2022 07:02 — forked from a-h-abid/example.lifecycle.json
MinIO MC Commands Quick Sheet

MinIO Commands

## Alias to Minio Server
mc alias set myminio http://localhost:9000 <access-key> <secret-key>

## List Directories (Root Buckets + Directories)
mc ls myminio
mc ls myminio bucket/folder
sohelrana820 / html-to-pdf.html
Last active July 3, 2022 10:00
HTML to PDF using jQuery
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>HTML to PDF</title>
<link href="" rel="stylesheet">
sohelrana820 / is_domain_contain.php
Created March 12, 2021 14:29
Check text string contain domain ot not.
* This function will check the text and find the domain name from test.
* If any domain found then it will validate domain name. If domain valid
* then return true otherwise return false.
* @param $textString
* @return bool
sohelrana820 / GoogleVisionApi.php
Created December 27, 2020 21:01
Using Google Visio API
namespace app\Components;
use Vision\Annotation\SafeSearchAnnotation;
use Vision\Request\Image\Base64Image;
use Vision\Vision;
sohelrana820 / XMLRPCClient.php
Created September 17, 2018 10:55
XML RPC Client Example
* Class XMLRPCClient
class XMLRPCClient
* @var
sohelrana820 / print_external_page_without_opening_it.html
Created September 16, 2018 10:28
Print an external page without opening it
<!doctype html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>MDN Example</title>
<script type="text/javascript">
function closePrint () {
sohelrana820 / xero-html-template-navbar.html
Created September 9, 2018 18:09
Fixed Navbar of XERO HTML Template
<header class="main-header sticky-header" id="main-header-2">
<div class="container">
<div class="row">
<div class="col-12">
<nav class="navbar navbar-expand-lg navbar-light rounded">
<a class="navbar-brand logo mr-auto" href="index.html">
<img src="assets/img/logos/black-logo.png" alt="logo">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="fa fa-bars"></span>