Skip to content

Instantly share code, notes, and snippets.

View vanderb's full-sized avatar

Freerk van Zeijl vanderb

  • fpvz
  • Mannheim, Germany
View GitHub Profile
@wmandai
wmandai / AppServiceProvider.php
Created June 23, 2021 21:21 — forked from greenspace10/AppServiceProvider.php
Laravel, Livewire, Alpine JS Toast Notifications
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Component::macro('notify', function ($message, $title = '', $type = 'success') {
$this->dispatchBrowserEvent('notify', ['message' => $message, 'title' => $title, 'type' => $type]);
});
@johanvanhelden
johanvanhelden / lang.php
Created January 19, 2021 12:01
lang route
<?php
declare(strict_types=1);
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Route;
// Localization
@JesseRWeigel
JesseRWeigel / commands.txt
Created April 28, 2017 19:22
ImageMagick Compression Commands
// Must install ImageMagick first
http://www.imagemagick.org/script/index.php
//This compresses a jpg with no visible loss of quality. Add in your own file names for target.jpg and result.jpg
convert -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% target.jpg result.jpg
// This does the same as above but to an entire folder (will overwrite original files):
mogrify -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% *.jpg
//This does the same thing but to all subfolders as well (Be careful with this one it will overwrite all original files)