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
<!-- https://stackoverflow.com/a/25780354/6055141 --> | |
function copyDirectory($source, $destination) | |
{ | |
$directory = opendir($source); | |
@mkdir($destination); | |
while (false !== ($file = readdir($directory))) { | |
if (($file != '.') && ($file != '..')) { | |
if (is_dir($source . '/' . $file)) { | |
copy_directory($source . '/' . $file, $destination . '/' . $file); | |
} else { |
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
var wb = new xl.Workbook(); | |
const styleThinBorder = wb.createStyle({ | |
border: { | |
left: { | |
style: 'thin', | |
color: 'black', | |
}, | |
right: { | |
style: 'thin', |
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
function create_thumbnail($max_width, $max_height, $source_file, $dst_dir) | |
{ | |
$imgsize = getimagesize($source_file); | |
$width = $imgsize[0]; | |
$height = $imgsize[1]; | |
$mime = $imgsize['mime']; | |
switch ($mime) { | |
case 'image/png': | |
$image_create = 'imagecreatefrompng'; |
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
'Main Function | |
Function SpellNumber(ByVal MyNumber) | |
Dim Dollars, Cents, Temp | |
Dim DecimalPlace, Count | |
ReDim Place(9) As String | |
Place(2) = " Thousand " | |
Place(3) = " Million " | |
Place(4) = " Billion " | |
Place(5) = " Trillion " | |
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 | |
$target = '/home/p146762461/domains/domain-name/laravel-app/public'; | |
$link = '/home/p146762461/domains/domain-name/public_html'; | |
symlink($target, $link); |
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 | |
namespace Infrastructure\Http\Middlewares; | |
use Closure; | |
class SwaggerProtect | |
{ | |
/** | |
* Handle an incoming request. |
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 | |
function deleteCommentsFromFolder($dir) | |
{ | |
$di = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS); | |
$it = new RecursiveIteratorIterator($di); | |
$fileArr = []; | |
foreach ($it as $file) { | |
if (pathinfo($file, PATHINFO_EXTENSION) == 'php') { |
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 | |
namespace Infrastructure\Http\Middlewares; | |
use Closure; | |
use DB; | |
use Illuminate\Http\Request; | |
use Log; | |
class Logger |
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
<html lang="en"> | |
<head> | |
<meta name="google-signin-scope" content="profile email"> | |
<meta name="google-signin-client_id" content="{client_id}"> | |
<script src="https://apis.google.com/js/platform.js" async defer></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script> | |
</head> | |
<body> | |
<div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div> |
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
import moment from 'moment'; | |
export default { | |
methods: { | |
formatDate: function (date, dateFormat) { | |
return moment(date).format(dateFormat); | |
} | |
} | |
} |
OlderNewer