Skip to content

Instantly share code, notes, and snippets.

View atorscho's full-sized avatar

Alex Torscho atorscho

  • France & Slovakia
View GitHub Profile
@atorscho
atorscho / .zshrc
Last active April 23, 2022 09:34
ZSH Configuration
# Load additional aliases
source $HOME/.zshrc-aliases
#################
### FUNCTIONS ###
#################
# Create a directory and open it right after
mkcd() {
mkdir $1 && cd "$_";
@atorscho
atorscho / PackageServiceProvider.php
Last active August 29, 2015 14:27
Service Provider for a Laravel 5 package.
<?php
namespace App\Package;
use Blade;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Foundation\Application;
use Illuminate\Support\ServiceProvider;
class PackageServiceProvider extends ServiceProvider
@atorscho
atorscho / SemanticUIPagination.php
Created August 6, 2015 19:21
Custom pagination view template for Laravel 5.x projects.
<?php
namespace App\Http;
use Illuminate\Pagination\BootstrapThreePresenter;
class SemanticUIPagination extends BootstrapThreePresenter
{
public function getActivePageWrapper($text)
{
@atorscho
atorscho / AssertionHelper.php
Last active August 29, 2015 14:26
Assertion and check helper functions for Laravel.
<?php
namespace App\Helpers;
use Request;
use Route;
use URL;
use View;
class AssertionHelper
@atorscho
atorscho / FileHelper.php
Last active September 19, 2022 09:32
Helpers to manipulate with files and images for Laravel projects.
<?php
namespace App\Helpers;
use Closure;
use Image;
use Intervention\Image\Constraint;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class FileHelper
@atorscho
atorscho / MiscHelper.php
Last active August 29, 2015 14:24
A helper class for Laravel projects.
<?php
namespace App\Helpers;
use App\Http\SemanticUIPagination;
use Carbon\Carbon;
use Illuminate\Pagination\Paginator;
use Request;
class MiscHelper