Skip to content

Instantly share code, notes, and snippets.

Trevor Morris trovster

Block or report user

Report or block trovster

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
trovster / phpcs.xml
Created Jun 20, 2019
Code Sniffer config for Laravel 5 Applications
View phpcs.xml
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="iSite">
<description>Code Sniffer Laravel, including PSR2, SlevomatCodingStandard and ImportDetection.</description>
trovster / .zshrc
Created May 7, 2019
ZSH Helpers for git
View .zshrc
# List with git branch next to them (requires gawk). (brew install gawk)
ls-git () {
ls -alF "$@" | gawk '{
match($0,/^(\S+\s+){8}(.+)$/, f);
b = "";
c = "git -C \""f[2]"\" branch 2>/dev/null";
while ((c|getline g) > 0) {
if (match(g,/^\* (.+)$/,a)) {
trovster / clients.test.js
Created Apr 14, 2019
Mocha test for clients.
View clients.test.js
const assert = require('assert');
const page = require('../../pages/Website/Clients.js');
describe('website clients (as admin)', () => {
before(() => {
browser.url(page.url + '/client');
it('should see the clients listing screen', () => {
trovster / Dockerfile
Created Aug 1, 2018
Laravel in Docker
View Dockerfile
FROM php:5.6-apache
# Install gd, iconv, mbstring, mcrypt, mysql, soap, sockets, zip, and zlib extensions
# see example at
RUN apt-get update && apt-get install -y \
libbz2-dev \
libfreetype6-dev \
libgd-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
trovster /
Last active Nov 23, 2018
Starting point for a script to setup development environment (MAMP)
# chmod a+x
# General functionality
brew install git
brew install openssl
brew install node
brew install npm
brew install yarn
brew install bat
trovster /
Last active Aug 1, 2018
Install software via CLI
# chmod a+x
# Install Brew
/usr/bin/ruby -e "$(curl -fsSL"
brew tap homebrew/core
brew tap homebrew/cask
brew tap homebrew/cask-drivers
trovster / middlware.php
Created Nov 9, 2015
Laravel 5 Middlewere, using AuthorizesRequests trait but adding a custom message based on action (index, show, destroy etc)
View middlware.php
namespace App\Http\Middleware\Admin;
use Closure;
use Illuminate\Contracts\Auth\Access\Gate;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use App\Models\Site as Model;
View Controller.php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\AdminController as Controller;
use App\Models\User\User;
use App\Models\User\Role as UserRole;
use App\Http\Requests\UserRequest;
trovster / Controllers-Deposit.php
Created Oct 29, 2015
Deposit controller, model and request using Laravel 5.1
View Controllers-Deposit.php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\AdminController as Controller;
use App\Models\Deposit;
use App\Http\Requests\DepositRequest;
trovster / AuthController.php
Created Oct 28, 2015
Laravel 5.1 Auth functionality.
View AuthController.php
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Password;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use App\Http\Controllers\Controller;
You can’t perform that action at this time.