Skip to content

Instantly share code, notes, and snippets.

Trevor Morris trovster

View GitHub Profile
trovster / deploy.yml
Last active May 27, 2020
Switching the baseUrl in Eleventy.js
View deploy.yml
name: Build and Deploy
branches: [ master ]
runs-on: ubuntu-latest
- name: Checkout 🛎️
uses: actions/checkout@v2
trovster / example.html
Created Apr 29, 2020
Using Tailwind with BEM
View example.html
<button class="button">
Standard Button
<button class="button button--red">
Red Button
<button class="button button--inline">
Inline Button
trovster / Base.php
Last active Oct 23, 2019
WordPress taxonomy integrated with Lumberjack.
View Base.php
// phpcs:disable SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint,SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint
namespace App\Models\Taxonomy;
use App\Exceptions\TaxonomyRegistrationException;
use Rareloop\Lumberjack\ScopedQueryBuilder;
use Spatie\Macroable\Macroable;
use Tightenco\Collect\Support\Collection;
trovster / shortcodes.php
Created Oct 21, 2019
WordPress shortcode integration with Twig templates.
View shortcodes.php
namespace App\Functions;
use App\Models\Sector;
use App\ViewModels\Sectors as ViewModel;
class Shortcode {
/** const array */
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 Jan 8, 2020
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 Jan 8, 2020
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
You can’t perform that action at this time.