Skip to content

Instantly share code, notes, and snippets.

View gentritabazi's full-sized avatar
🎯
Focusing

Gentrit Abazi gentritabazi

🎯
Focusing
View GitHub Profile
var wb = new xl.Workbook();
const styleThinBorder = wb.createStyle({
border: {
left: {
style: 'thin',
color: 'black',
},
right: {
style: 'thin',
@gentritabazi
gentritabazi / copyDirectory.php
Last active September 12, 2024 13:09
Copy all files from one folder to another folder using PHP script
<!-- 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 {
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';
'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 "
<?php
namespace Infrastructure\Http\Middlewares;
use Closure;
class SwaggerProtect
{
/**
* Handle an incoming request.
name: SSH Laravel Deploy
on:
push:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
<?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') {
@gentritabazi
gentritabazi / autoexec.cfg
Last active February 16, 2021 15:37
CSGO AUTOEXEC
// Autoexec file
// Download file
// Copy file to {SteamPath}\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg
// Open CSGO and run in console: exec autoexec
// General
sensitivity "2.0"
// Rates
@gentritabazi
gentritabazi / Logger.php
Created January 12, 2021 09:03
Logger Middleware Laravel
<?php
namespace Infrastructure\Http\Middlewares;
use Closure;
use DB;
use Illuminate\Http\Request;
use Log;
class Logger