Skip to content

Instantly share code, notes, and snippets.

@gwleuverink
gwleuverink / webpack.mix.js
Created November 9, 2018 08:55
Laravel mix vendor.js + bundles setup
const mix = require('laravel-mix');
const fs = require('fs')
const resourcePath = 'resources/js/'
const assetPath = 'public/assets/'
/*
|--------------------------------------------------------------------------
| Helper functions
|--------------------------------------------------------------------------
@gwleuverink
gwleuverink / EmailValidation.php
Last active February 3, 2021 09:11
Experiment loading livewire component from gist
public $email;
public function updated($name)
{
$this->validateOnly($name, [
'email' => 'required|email',
]);
}
@gwleuverink
gwleuverink / progress-bar.blade.php
Last active April 9, 2024 10:31
Progress bar blade component
@props([
'percentage' => 0,
'failed' => false
])
@php
$done = $failed || $percentage == 100;
@endphp
<div {{ $attributes->merge(['class' => ' space-y-1'])->whereDoesntStartWith('wire:poll') }}
@gwleuverink
gwleuverink / DuskTestCase.php
Last active January 8, 2024 22:03
Dusk method for testing Blade
//--------------------------------------------------------------------------
// NOTE: This example uses Testbench Dusk inside of a package
//
// The `beforeServingApplication` hook doesn't exist in laravel dusk
// But i'm sure you can create a temporary route some other way
// when using this in a laravel project
//--------------------------------------------------------------------------
class DuskTestCase extends BaseTestCase
{
@gwleuverink
gwleuverink / settings.json
Last active January 31, 2024 21:25
Make every vscode theme compatible with Operator Mono like fonts
{
/*
|--------------------------------------------------------------------------
| Typography
|
| Variations are specific to my MonoLisa. Check what your font supports
| See the next section for the textmate rules I use
|--------------------------------------------------------------------------
*/
@gwleuverink
gwleuverink / App Icon Template.svg
Created December 11, 2024 23:58 — forked from thecodewarrior/App Icon Template.svg
An SVG template for creating macOS app icons, including guides and the standard drop shadow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.