Quick and easy class created to modify the WP_Query on specific calls and pull in all posts within a radius from a given latitude and longitude.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hyperquest from 'hyperquest' | |
import JSONStream from 'JSONStream' | |
import es from 'event-stream' | |
import { format } from 'date-fns' | |
const scraper = async () => { | |
const scryfallJSONUrl = | |
'https://archive.scryfall.com/json/scryfall-default-cards.json' | |
await hyperquest(scryfallJSONUrl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div x-data="{ 'showModal': false }" @keydown.escape="showModal = false"> | |
<!-- Trigger for Modal --> | |
<button type="button" @click="showModal = true">Open Modal</button> | |
<!-- Modal --> | |
<div | |
class="fixed inset-0 z-30 flex items-center justify-center overflow-auto bg-black bg-opacity-50" | |
x-show="showModal" | |
> | |
<!-- Modal inner --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="progress-bar"> | |
<div class="filled-bar" :style="{ transform: `translate3d(-${100-value}%, 0, 0)` }"></div> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: ['value'] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
scroll-behavior: smooth; | |
} | |
:target:before { | |
content: ""; | |
display: block; | |
height: 100px; | |
margin: -100px 0 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header | |
x-data="header()" | |
class="fixed top-0 left-0 right-0 bg-black z-30" | |
@scroll.window="hasScrolled = window.scrollY > 260" | |
> | |
<!-- Logo to go here --> | |
<!-- Navigation El --> | |
<nav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Livewire; | |
use App\Models\Account; | |
use Livewire\Component; | |
class AccountAutocomplete extends Component | |
{ | |
public $query= ''; |
So far the following areas are covered in this gist:
- Removing tabs on the product page.
- Cleaning the WooCommerce loading of scripts/styles on pages with no woo elements.
- Changing the call order of features on the single product.
- Removing all WooCommerce called styles.
- Ajaxifying the cart add
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PHP Switcher | |
phpv() { | |
valet stop | |
brew unlink php@5.6 php@7.0 php@7.1 php@7.2 php | |
brew link --force --overwrite $1 | |
brew services start $1 | |
composer global update | |
valet install | |
} |
NewerOlder