Skip to content

Instantly share code, notes, and snippets.

View surahmans's full-sized avatar

Surahman surahmans

  • SALT Indonesia
  • Depok, Jawa Barat, Indonesia
View GitHub Profile
@peterbrinck
peterbrinck / Laravel on VestaCP.md
Last active July 2, 2023 14:49
Laravel web templates for VestaCP

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 November 10, 2020 15:14
Easy to get image from a model - Laravel
<?php
namespace App;
use Gregwar\Image\Image;
use Symfony\Component\HttpFoundation\File\UploadedFile;
trait ImageTrait
{
protected $imageWidth, $imageHeight;
@mul14
mul14 / README.md
Last active February 10, 2023 00:55
Simple Laravel Search Trait

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 January 22, 2024 11:42
My .vimrc file
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