Skip to content

Instantly share code, notes, and snippets.

Jeffrey Way JeffreyWay

Block or report user

Report or block JeffreyWay

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
JeffreyWay / AppServiceProvider.php
Last active Oct 22, 2019
Laracasts Widgets Lesson
View AppServiceProvider.php
namespace App\Providers;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
JeffreyWay / example.html
Last active Oct 22, 2019
Floating navigation bar example using the Intersection Observer API
View example.html
<!DOCTYPE html>
<title>Floating Navigation</title>
<link href="^1.0/dist/tailwind.min.css" rel="stylesheet">
@keyframes slide-nav-down {
100% {
transform: translateY(0);
JeffreyWay /
Created Jul 28, 2012
PHP: Set value if not exist

You know how, in JavaScript, we can set a value to a variable if one doesn't, like this:

name = name || 'joe';

This is quite common and very helpful. Another option is to do:

name || (name = 'joe');
JeffreyWay / .vimrc
Created Jan 28, 2016
Laracasts: Vim Mastery - Episode 3 .vimrc progress
View .vimrc
syntax enable
colorscheme desert
"-------------General Settings--------------"
set backspace=indent,eol,start "Make backspace behave like every other editor.
let mapleader = ',' "The default leader is \, but a comma is much better.
set number "Let's activate line numbers.
JeffreyWay / .vimrc
Last active Oct 6, 2019
My .vimrc file
View .vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
View .bash_profile
# laravel new-app
alias laravel="git clone -o laravel -b develop"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package
JeffreyWay / PjaxMiddleware.php
Last active Aug 27, 2019
Laravel middleware for working with pjax.
View PjaxMiddleware.php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\DomCrawler\Crawler;
class PjaxMiddleware
JeffreyWay / snippet.xml
Created Sep 13, 2012
Laravel Resource - Sublime Text 2 Snippet
View snippet.xml
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');
JeffreyWay / ex.php
Created Apr 13, 2015
Access Laravel from a test that uses the Integrated Selenium extension.
View ex.php
use Laracasts\Integrated\Extensions\Selenium;
use Laracasts\Integrated\Services\Laravel\Application as Laravel;
class AuthTest extends Selenium
use Laravel;
* @tearDown
JeffreyWay / countries.php
Created Jul 23, 2015
Country Names + Codes
View countries.php
"United States" => "us",
"Afghanistan" => "af",
"Albania" => "al",
"Algeria" => "dz",
"American Samoa" => "as",
"Andorra" => "ad",
"Angola" => "ad",
"Anguilla" => "ai",
"Antarctica" => "aq",
You can’t perform that action at this time.