## 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Catch php output buffering data over jQuery AJAX | |
* | |
* @author: Sohel Rana (me.sohelrana@gmail.com) | |
* @author url: https://blog.sohelrana.me | |
* @link: https://blog.sohelrana.me/catch-php-output-buffering-data-jquery-ajax/ | |
* @licence MIT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = $_POST['data']; | |
$name = $data['name']; | |
$from = $data['email']; | |
$subject = $data['subject']; | |
$message = $data['message']; | |
$to = 'hayley@studioeighty7.co.uk'; | |
$headers = "MIME-Version: 1.0"; | |
$headers .= "Content-type: text/plain; charset=iso-8859-1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author: Sohel Rana <me.sohelrana@gmail.com> | |
* @author URI: http://sohelrana.me | |
* @description: Create zip file and download in PHP | |
*/ | |
function createZipAndDownload($files, $filesPath, $zipFileName) | |
{ | |
// Create instance of ZipArchive. and open the zip folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Feeds array with title and time | |
$feeds = array( | |
array( | |
'title' => 'Some Feeds.', | |
'time' => '2015-03-31 13:06:00' | |
), | |
array( | |
'title' => 'And another.', | |
'time' => '2015-03-23 13:06:00' | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```php | |
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>HTML to PDF</title> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Regulat Expression Patter: ^(?:\\+?\\+880|880|0)?1\d{9}$ | |
Input: | |
============ | |
01711091770 | |
00711091770 | |
1711091770 | |
8801711091770 | |
881711091770 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>MDN Example</title> | |
<script type="text/javascript"> | |
function closePrint () { | |
document.body.removeChild(this.__container__); | |
} |
NewerOlder