Skip to content

Instantly share code, notes, and snippets.

@IsraelOrtuno
IsraelOrtuno / imagick3.6.0-PHP8-forge.sh
Last active December 28, 2021 12:46
Install Imagick 3.6.0 on PHP 7.4 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.6.0.tgz
tar xvzf imagick-3.6.0.tgz
@IsraelOrtuno
IsraelOrtuno / steps.blade.php
Created August 29, 2017 07:57
Unlimited CSS Step bar with Laravel Blade, SASS and FontAwesome
<div class="progress">
@foreach ($steps as $step)
<div class="{{ $step[0] }}
{{ $loop->iteration > $currentStep ? '' : 'progress__step--active' }}
{{ $loop->iteration >= $currentStep ? '' : 'progress__step--done' }}">
{{ $step[1] }}
</div>
@endforeach
</div>
@IsraelOrtuno
IsraelOrtuno / Hexagons.php
Created May 25, 2017 14:57
Hexagon gallery with CSS3
<div class="hexagons">
<div class="hexagons__row">
<div class="hexagon">
<div class="hexagon__image" style="background-image: url('image.jpg');"></div>
<div class="hexagon__description">
<h5>Description title</h5>
<p>Description content</p>
</div>
</div>
<div class="hexagon">
<?php
FormBuilder::macro('openOrModel', function ($post, $put, $model = null) {
return ! $model
? \Form::open(['route' => $post, 'method' => 'post'])
: \Form::model($model, ['route' => $put, 'method' => 'put']);
});
// Use it like this:
//
@IsraelOrtuno
IsraelOrtuno / dropdown-megamenu.scss
Last active May 2, 2019 09:09
Bootstrap 4 Megamenu dropdown
// Mega menu canvas
.dropdown--canvas {
// Reset margin and padding
.dropdown-menu {
left : auto;
padding : 0;
margin : 0;
}
@IsraelOrtuno
IsraelOrtuno / example.html
Last active March 11, 2016 16:07
CSS only treeview built in SASS
<div class="Treeview">
<ul>
<li>
<a class="Treeview__Item" href="#">Equipos</a>
<ul>
<li><a href="#" class="Treeview__Item">Fuentes</a></li>
<li><a href="#" class="Treeview__Item">Dispensadores</a></li>
<li><a href="#" class="Treeview__Item">Osmosis</a></li>
<li><a href="#" class="Treeview__Item">Descalcificadores</a></li>
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
<?php
namespace Devio\Propertier;
use Throwable;
trait SavesUsingTransaction
{
protected $savingTransaction = true;
<?php
class TestCase extends Illuminate\Foundation\Testing\TestCase
{
/**
* The base URL to use while testing the application.
*
* @var string
*/
protected $baseUrl = 'http://samples.dev';
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**