Skip to content

Instantly share code, notes, and snippets.

Avatar

Surahman surahmans

  • SALT Indonesia
  • Depok, Jawa Barat, Indonesia
View GitHub Profile
@peterbrinck
peterbrinck / Laravel on VestaCP.md
Last active Sep 24, 2022
Laravel web templates for VestaCP
View Laravel on VestaCP.md

I'm not using this or VestaCP anymore, so I can't confirm if still working or not.

I've made a new web template to make Laravel work easily on VestaCP, and so I wouldn't have to change my Laravel installation, if I ever wanted to deploy it elsewhere.

Each file should be put in /usr/local/vesta/data/templates/web/apache2

Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html

@mul14
mul14 / ImageTrait.php
Last active Nov 10, 2020
Easy to get image from a model - Laravel
View ImageTrait.php
<?php
namespace App;
use Gregwar\Image\Image;
use Symfony\Component\HttpFoundation\File\UploadedFile;
trait ImageTrait
{
protected $imageWidth, $imageHeight;
@mul14
mul14 / README.md
Last active Sep 16, 2022
Simple Laravel Search Trait
View README.md

Usage

Put SearchTrait.php in app directory. Then use SearchTrait in your model, like so

use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;

class Article extends Model 
{
@JeffreyWay
JeffreyWay / .vimrc
Last active Dec 10, 2021
My .vimrc file
View .vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15