Skip to content

Instantly share code, notes, and snippets.

Jeffrey Way JeffreyWay

View GitHub Profile
JeffreyWay / recaptcha.blade.php
Last active Aug 5, 2020
Recaptcha Example using Laravel, Blade Components, and Alpine
View recaptcha.blade.php
<script src=""></script>
View demo.html
<x-tabs active="First">
<x-tab name="First">
First content goes here.
<x-tab name="Second">
Second content goes here.
JeffreyWay / laravel.js
Last active Aug 1, 2020
Want to send a DELETE request when outside of a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. (Requires jQuery, but doesn't have to.) To use, import script, and create a link with the `data-method="DELETE"` attribute.
View laravel.js
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
(function() {
JeffreyWay / .vimrc
Last active Jul 31, 2020
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 demo.php
<!DOCTYPE html>
<title>CSS Quirks</title>
.clamp {
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 / demo.html
Created Jul 21, 2020
Alpine.js Essentials: Handling Custom Events
View demo.html
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<title>Alpine Examples</title>
<script src=""
JeffreyWay / web.php
Created Jul 17, 2020
Array Filtering + Casting Demo
View web.php
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
Route::get('/names', function () {
JeffreyWay / PjaxMiddleware.php
Last active Jul 16, 2020
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
View gist:5105516
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;font-size:16px}</style><div id="e"></div><script src="" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/php");</script>
You can’t perform that action at this time.