Skip to content

Instantly share code, notes, and snippets.

View JeffreyWay's full-sized avatar

Jeffrey Way JeffreyWay

View GitHub Profile
@JeffreyWay
JeffreyWay / example.html
Created February 25, 2021 20:23
CSS background gradient transition on hover example
<!doctype html>
<title>Gradient Transition Example</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<style>
.card {
position: relative;
background: linear-gradient(to bottom, #90cdf4, #2c5282)
}
@JeffreyWay
JeffreyWay / app.js
Last active July 15, 2023 02:41
Swappable Heading example
class SwappableHeading {
constructor(element, headings = []) {
this.element = element;
this.headings = headings;
this.current = 1;
}
async swap() {
while (true) {
await this.wait(2000);
/**
* 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 January 31, 2025 11:54
Recaptcha Example using Laravel, Blade Components, and Alpine
<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 July 21, 2020 19:47
Alpine.js Essentials: Handling Custom Events
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Alpine Examples</title>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js"
defer
></script>
@JeffreyWay
JeffreyWay / web.php
Created July 17, 2020 16:04
Array Filtering + Casting Demo
<?php
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
});
Route::get('/names', function () {
<!DOCTYPE html>
<html>
<head>
<title>CSS Quirks</title>
<link
href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
rel="stylesheet"
/>
<style>
.clamp {
<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 June 29, 2020 14:08
Alpine.js Transition demo
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Alpine Examples</title>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js"
defer
></script>
@JeffreyWay
JeffreyWay / demo.html
Last active January 4, 2022 11:19
How and When to Extract Alpine Component Logic - https://laracasts.com/series/alpine-essentials/episodes/5
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Alpine Examples</title>
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js"
defer
></script>