Skip to content

Instantly share code, notes, and snippets.

In the desert

Stephen Howells stephenhowells

In the desert
View GitHub Profile
tanthammar / HasLinks.php
Last active Jul 5, 2022
No more controllers! Only Laravel LiveWire routes and a handy Eloquent Model trait.
View HasLinks.php
tanthammar / session-timeout-alert-after-livewire-scripts.blade.php
Last active Aug 18, 2022
Laravel Livewire Turbolinks Blade component to keep session alive
View session-timeout-alert-after-livewire-scripts.blade.php
{{-- You do not need to add this component if you are using the permanent option in the head component --}}
if (!window.sessionTimerPermanent && window.Livewire) {
window.livewire.hook('afterDomUpdate', startSessionTimer)
// if you are on livewire > 1.3.1 and want to avoid the default error alert
window.livewire.onError(statusCode => {
if (statusCode === 419) {
laravel-shift / .php-cs-fixer.php
Last active Sep 25, 2022
PHP CS Fixer - Laravel Coding Style Ruleset
View .php-cs-fixer.php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
fzldn / beautifier.js
Last active Feb 18, 2022
VS Code Laravel Blade formatter using extension Beautify 1.5.0 by HookyQR with js-beautify hacks
View beautifier.js
Beautifier.prototype.beautify = function() {
var source_text = this._source_text;
source_text = source_text.replace(/\{\{(--)?((?:(?!(--)?\}\}).)+)(--)?\}\}/g, function(m, ds, c, dh, de) {
JaminFarr / blade-mixins.pug
Last active Apr 16, 2020
Laravel Blade mixins for jade for use with laravel-elixir-jade
View blade-mixins.pug
//- For use with
mixin blade()
mixin phpblock()
!='\r\n<?php '
franzose / jade-to-laravel-blade-mixins.jade
Last active Dec 30, 2019
Jade -> Laravel Blade mixins
View jade-to-laravel-blade-mixins.jade
//- As you may know, Laravel 5 provides the Elixir to compile assets with no pain.
These mixins is for those of you who want to use Jade power combined with that of Laravel Blade.
The syntax mimic Blade statements, however identation differs in some cases.
- var newline = "\r\n"
- var loopIterator = '$iterator'
//- @extends mixin
Example: +extends('layouts/master')
Compiled: @extends('layouts/master')
kevinelliott /
Last active Aug 2, 2022
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

laracasts / MailTestCase.php
Created Jun 14, 2014
Use Mailcatcher to test email.
View MailTestCase.php
use GuzzleHttp\Message\Response;
class MailTestCase extends TestCase {
protected $mailcatcher;
function __construct()



qguv / solarized-dark.css
Last active Apr 5, 2021 — forked from nicolashery/solarized-dark.css
Solarized theme for Jekyll, updated to reflect toned-down line numbers
View solarized-dark.css
/* Solarized Dark
For use with Jekyll and Pygments
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content