Skip to content

Instantly share code, notes, and snippets.

View codeperl's full-sized avatar

Mohammad Ahsrafuddin Ferdousi codeperl

  • 43,44, tin shed quarter, Mirpur-1, Dhaka-1216, Bangladesh.
View GitHub Profile
@cawecoy
cawecoy / CustomGoogleTagManagerMiddleware.php
Last active November 23, 2021 06:20
Flash multiple events to Google Tag Manager with spatie/laravel-googletagmanager
<?php
namespace App\Http\Middleware;
use Closure;
class CustomGoogleTagManagerMiddleware extends \Spatie\GoogleTagManager\GoogleTagManagerMiddleware
{
/**
* Handle an incoming request.
@johndatserakis
johndatserakis / install-imagick-docker-php-7-1-alpine.md
Last active December 7, 2023 12:01
Install imagick In Docker FROM php:7.1-fpm-alpine

docker-library/php#105

RUN set -ex \
    && apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS imagemagick-dev libtool \
    && export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
    && pecl install imagick-3.4.3 \
    && docker-php-ext-enable imagick \
    && apk add --no-cache --virtual .imagick-runtime-deps imagemagick \
 &amp;&amp; apk del .phpize-deps
@nuhil
nuhil / js.md
Last active November 20, 2021 18:06
Javascript Handbook
@simonhamp
simonhamp / AppServiceProvider.php
Last active March 26, 2024 15:56
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@MicrowaveDev
MicrowaveDev / ImageToInstagramController.php
Last active January 6, 2023 19:09
Laravel Intervention Image place to square for instagram(fill background, vertical or horizontal align a image) plus blur option.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AdminController extends Controller
{
public function imageFillToSquare(Request $request){