Skip to content

Instantly share code, notes, and snippets.

View Braunson's full-sized avatar

Braunson Yager Braunson

View GitHub Profile

Learning Plan for Test Driven Development (TDD)

These learning resources primarily focus on Test Driven Development (TDD).

  • There is an emphasis on learning using PHP, Laravel and PHPUnit.
  • All these resources are free (at the time of writing)
@calebporzio
calebporzio / error_blade_directive.php
Created March 28, 2019 20:34
A little Blade directive to make working with validation errors a bit nicer.
<?php
// Usage:
// Before
@if ($errors->has('email'))
<span>{{ $errors->first('email') }}</span>
@endif
// After:
@bradtraversy
bradtraversy / docker_wordpress.md
Last active May 3, 2025 05:33
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@calebporzio
calebporzio / time_travel_helper.php
Last active August 18, 2019 00:00
A little Laravel helper function for hijacking Carbon's "now()" inside a callback
<?php
// Helper usage:
// timeTravel(Carbon::parse('one year ago'), function () {...});
function timeTravel($target, $callback) {
Illuminate\Support\Carbon::setTestNow($target);
return tap($callback(), function () {
Illuminate\Support\Carbon::setTestNow();
[user]
email = [email protected]
name = John Smith
[push]
default = simple
[alias]
co = checkout
ci = commit
czp = cz && git pu
st = status
@alariva
alariva / CanReportToRollbar.php
Last active December 18, 2018 14:50
Check Rollbar service with beyondcode/laravel-self-diagnosis
<?php
// File: app/SelfDiagnosis/Checks/CanReportToRollbar.php
namespace App\SelfDiagnosis\Checks;
use BeyondCode\SelfDiagnosis\Checks\Check;
use Dotenv\Dotenv;
use Illuminate\Foundation\Bootstrap\LoadConfiguration;
use Rollbar\RollbarLogger;
<?php
namespace App\Libraries\Queue;
use Illuminate\Events\Dispatcher;
use Illuminate\Queue\DatabaseQueue;
use Illuminate\Support\Str;
use Laravel\Horizon\Events\JobDeleted;
use Laravel\Horizon\Events\JobPushed;
use Laravel\Horizon\Events\JobReleased;
@jakebathman
jakebathman / logslaravel.sh
Created August 19, 2018 00:06
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@devSarry
devSarry / Microsoft.PowerShell_profile.ps1
Last active February 28, 2018 10:10
Laravel Powershell Commands -- Place in %UserProfile%\My Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
function art($arg1,$arg2,$arg3,$arg4,$arg5) { php artisan $arg1 $arg2 $arg3 $arg4 $arg5}
function migrate () {
art migrate
}
function migrate:r () {
php artisan migrate:refresh; php artisan migrate --seed
}
function c:i () {
@sliminality
sliminality / README.md
Last active December 10, 2023 04:30
Hidden dependencies in CSS

Hidden dependencies

Sarah Lim, Northwestern University

Update, September 2019: This Gist detailed an early idea which formed the basis for a major research project. For more information, you can read the resulting full paper, which received Best Paper Honorable Mention at UIST 2018. A tool based on this research is now available on Firefox Nightly.

What are hidden dependencies?

Hidden dependencies between CSS properties are a common source of beginner confusion. For instance, a user might write the following code in order to vertically align some text within a <div>: