Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeffrey Way JeffreyWay

View GitHub Profile
@JeffreyWay
JeffreyWay / app.js
Last active Oct 29, 2020
Swappable Heading example
View app.js
class SwappableHeading {
constructor(element, headings = []) {
this.element = element;
this.headings = headings;
this.current = 1;
}
async swap() {
while (true) {
await this.wait(2000);
View commands.js
/**
* Fetch the body of an iFrame.
*/
Cypress.Commands.add('getIframe', () => {
return cy
.get('iframe')
.its('0.contentDocument.body', { log: false })
.should('not.be.empty')
.then((body) => {
cy.wrap(body, { log: false });
@JeffreyWay
JeffreyWay / recaptcha.blade.php
Last active Sep 23, 2020
Recaptcha Example using Laravel, Blade Components, and Alpine
View recaptcha.blade.php
<div
x-data="recaptcha()"
x-init="init"
@recaptcha.window="execute"
></div>
@push('scripts')
<script src="https://www.google.com/recaptcha/api.js?render=explicit"></script>
<script>
@JeffreyWay
JeffreyWay / demo.html
Created Jul 21, 2020
Alpine.js Essentials: Handling Custom Events
View demo.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Alpine Examples</title>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"
defer
></script>
@JeffreyWay
JeffreyWay / web.php
Created Jul 17, 2020
Array Filtering + Casting Demo
View web.php
<?php
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
});
Route::get('/names', function () {
View demo.php
<!DOCTYPE html>
<html>
<head>
<title>CSS Quirks</title>
<link
href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet"
/>
<style>
.clamp {
View series.blade.php
<x-layout>
<x-slot name="head">
<x-social-media-meta
title="Blade Component Examples"
description="Learn about all sorts of Blade component tips and tricks."
image="https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg"
card="summary"
/>
</x-slot>
@JeffreyWay
JeffreyWay / demo.html
Created Jun 29, 2020
Alpine.js Transition demo
View demo.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Alpine Examples</title>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"
defer
></script>
@JeffreyWay
JeffreyWay / demo.html
Last active Jun 23, 2020
How and When to Extract Alpine Component Logic - https://laracasts.com/series/alpine-essentials/episodes/5
View demo.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Alpine Examples</title>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"
defer
></script>
View x-model-example.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Alpine Examples</title>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js"
defer
></script>
You can’t perform that action at this time.