Skip to content

Instantly share code, notes, and snippets.

View trovster's full-sized avatar

Trevor Morris trovster

View GitHub Profile

Keybase proof

I hereby claim:

  • I am trovster on github.
  • I am trovster (https://keybase.io/trovster) on keybase.
  • I have a public key ASA_HaM551jlZGZZ67MsHbLBMQkb6rmajypbAP33jtbOTgo

To claim this, I am signing this object:

@trovster
trovster / deploy.yml
Last active May 27, 2020 16:43
Switching the baseUrl in Eleventy.js
name: Build and Deploy
on:
push:
branches: [ master ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
@trovster
trovster / example.html
Created April 29, 2020 09:28
Using Tailwind with BEM
<button class="button">
Standard Button
</button>
<button class="button button--red">
Red Button
</button>
<button class="button button--inline">
Inline Button
@trovster
trovster / Base.php
Last active October 23, 2019 19:53
WordPress taxonomy integrated with Lumberjack.
<?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
trovster / shortcodes.php
Created October 21, 2019 16:06
WordPress shortcode integration with Twig templates.
<?php
namespace App\Functions;
use App\Models\Sector;
use App\ViewModels\Sectors as ViewModel;
class Shortcode {
/** const array */
@trovster
trovster / phpcs.xml
Created June 20, 2019 15:20
Code Sniffer config for Laravel 5 Applications
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="iSite">
<description>Code Sniffer Laravel, including PSR2, SlevomatCodingStandard and ImportDetection.</description>
<file>app/</file>
<file>config/</file>
<file>public/</file>
<file>resources/</file>
<file>routes/</file>
<file>tests/</file>
@trovster
trovster / .zshrc
Created May 7, 2019 10:59
ZSH Helpers for git
# 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)) {
b="("a[1]")"
}
@trovster
trovster / clients.test.js
Created April 14, 2019 10:36
Mocha test for clients.
const assert = require('assert');
const page = require('../../pages/Website/Clients.js');
describe('website clients (as admin)', () => {
before(() => {
page.login();
browser.url(page.url + '/client');
});
it('should see the clients listing screen', () => {
@trovster
trovster / Dockerfile
Created August 1, 2018 11:57
Laravel in Docker
FROM php:5.6-apache
# Install gd, iconv, mbstring, mcrypt, mysql, soap, sockets, zip, and zlib extensions
# see example at https://hub.docker.com/_/php/
RUN apt-get update && apt-get install -y \
libbz2-dev \
libfreetype6-dev \
libgd-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
@trovster
trovster / development.sh
Last active December 26, 2021 14:33
Starting point for a script to setup development environment (MAMP)
#!/bin/sh
# chmod a+x development.sh
# General functionality
brew install git
brew install openssl
brew install node
brew install npm
brew install yarn
brew install bat