Skip to content

Instantly share code, notes, and snippets.

stidges / tailwind.itermcolors
Last active November 30, 2023 21:00
An iTerm2 color scheme based on the Tailwind CSS color scheme (
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<key>Ansi 0 Color</key>
<key>Alpha Component</key>
<key>Blue Component</key>
stidges / Request.php
Created January 1, 2018 16:33
Code to accompany the 'Reusable Validation Rules with Laravel Form Requests' post (
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Validator;
abstract class Request extends FormRequest

Keybase proof

I hereby claim:

  • I am stidges on github.
  • I am stidges ( on keybase.
  • I have a public key ASCfoJPTZueL1UgrbhO7O8vSDv5UEqmtxxAdhaQpnOeorAo

To claim this, I am signing this object:

stidges / TestCase.php
Last active September 16, 2017 20:33
Easily test your Laravel middleware classes. Blog post:
namespace Tests;
use Illuminate\Foundation\Testing\TestResponse;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use PHPUnit\Framework\Assert;
abstract class TestCase extends BaseTestCase
stidges / AllowedUsernameValidator.php
Created March 10, 2017 18:21
Code to accompany the 'Writing an Allowed Username Validator in Laravel' (
# app/Validation/AllowedUsernameValidator.php
namespace App\Validation;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Routing\Router;
use Illuminate\Config\Repository;
stidges / example.php
Created December 19, 2016 12:17
Using when() in the Laravel query builder
namespace App\Http\Controllers;
use App\Post;
use Illuminate\Http\Request;
class PostsController extends Controller
public function index(Request $request)
stidges / CacheBustingLaravelValetDriver.php
Last active August 21, 2018 02:20
Rewrite filename-based cache busting URIs (e.g. jquery.1476809927.js) to the correct filename in Laravel Valet
class CacheBustingLaravelValetDriver extends LaravelValetDriver
public function isStaticFile($sitePath, $siteName, $uri)
$result = parent::isStaticFile($sitePath, $siteName, $uri);
if ($result !== false) {
return $result;
namespace Acme\Html;
use Illuminate\Html\FormBuilder as IlluminateFormBuilder;
class FormBuilder extends IlluminateFormBuilder {
* An array containing the currently opened form groups.
stidges / spinner.css
Last active August 29, 2015 14:01
Simple single-element spinner using CSS3 animations
body {
background-color: #d6e0e6;
.spinner {
position: absolute;
top: 50%;
left: 50%;
margin-left: -21.5px;
margin-top: -21.5px;