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
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
JeffreyWay / PjaxMiddleware.php
Last active Dec 5, 2019
Laravel middleware for working with pjax.
View PjaxMiddleware.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\DomCrawler\Crawler;
class PjaxMiddleware
View .bash_profile
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@JeffreyWay
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",
@JeffreyWay
JeffreyWay / ex.js
Created Jun 23, 2015
Laracasts.com Episode: Algolia + JavaScript + Vue
View ex.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Algolia with JS</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
@JeffreyWay
JeffreyWay / ex.php
Created Apr 13, 2015
Access Laravel from a test that uses the Integrated Selenium extension. https://github.com/laracasts/integrated
View ex.php
use Laracasts\Integrated\Extensions\Selenium;
use Laracasts\Integrated\Services\Laravel\Application as Laravel;
class AuthTest extends Selenium
{
use Laravel;
/**
* @tearDown
View Gulpfile.js
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
gulp.task('browserify', function() {
return browserify('./js/app.js')
.transform(babelify, { stage: 0 })
.bundle()
.on('error', function(e){
View gist:191acba11c041e486427
return gists.map(function(gist) {
return newGist(gist);
});
// Becomes:
return gists.map(gist => newGist(gist))
@JeffreyWay
JeffreyWay / routes.sh
Created Oct 15, 2014
Add this to your ~/.bashrc file (or anywhere related) to give yourself an easy way to view the routes in your Laravel app, or filter the results down to a particular search query.
View routes.sh
function routes()
{
if [ $# -eq 0 ]; then
php artisan route:list
else
php artisan route:list | grep ${1}
fi
}
View ex.php
<?php
/**
* @Middleware("auth")
*/
class Admin {
// ...
}
You can’t perform that action at this time.