Skip to content

Instantly share code, notes, and snippets.

<details>
<summary>sw_vers</summary>
<pre>ProductName: macOS
ProductVersion: 12.2.1
BuildVersion: 21D62</pre>
</details>
<details>
<summary>valet --version</summary>
<pre>Laravel Valet 2.15.4</pre>
</details>
@iamroi
iamroi / gist:4180b80d281b96b2e09cf2e3be1b42ed
Created March 3, 2022 10:42
Nuxt3 - Sample router.options.ts
import qs from 'qs'
export default {
parseQuery: qs.parse,
stringifyQuery: qs.stringify,
scrollBehavior: () => {}
}
@iamroi
iamroi / tailwind-functions.php
Last active June 7, 2022 13:52
Wordpress <3 Tailwind Functions
<?php
/**
* Do this once to initiate the setup
* Works only on Local development. Configure isLocal() to your taste
* Run yourwebsite.dev?tw-init. This will create ANY existing posts-
* -as HTML files in your theme-root/posts-html directory
* Make sure to .gitignore the posts-html directory
*
* Update the Tailwind purge config like below and
@iamroi
iamroi / MoneyIntegerCast.php
Last active December 3, 2021 11:11
MoneyIntegerCast - For package https://github.com/cknow/laravel-money
<?php
namespace App\Casts;
use Cknow\Money\Money;
use Cknow\Money\MoneyCast;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
use InvalidArgumentException;
class MoneyIntegerCast extends MoneyCast implements CastsAttributes