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 | |
/* | |
* Plugin Name: Disable Automatic Updates | |
* Description: Prevents WordPress from performing automatic updates | |
* Author: Jon Insley | |
* Author URI: https://joninsley.com/ | |
* License: GNU General Public License v2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
* | |
*/ |
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
function preload_featured_image() { | |
if (has_post_thumbnail()) { | |
$attachment_image = wp_get_attachment_url(get_post_thumbnail_id()); | |
if ($attachment_image) { | |
echo '<link rel="preload" fetchpriority="high" as="image" href="' . esc_url($attachment_image) . '">'; | |
} | |
} | |
} | |
add_action('wp_head', 'preload_featured_image'); |
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
// Button background gradient has been hard-coded in the form below | |
import { addPropertyControls, ControlType, RenderTarget, withCSS } from "framer" | |
import { HTMLMotionProps, motion } from "framer-motion" | |
import * as React from "react" | |
import { | |
containerStyles, | |
usePadding, | |
useRadius, | |
paddingControl, |
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
<svg width="236" height="68" viewBox="0 0 236 68" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.5 0.5H89C90.6569 0.5 92 1.84315 92 3.5V29C92 30.6569 93.3431 32 95 32H148.5C150.157 32 151.5 33.3431 151.5 35V64C151.5 65.6569 152.843 67 154.5 67H235.5" stroke="url(#paint0_linear)"></path><defs><linearGradient id="paint0_linear" gradientUnits="userSpaceOnUse" x1="272.78000000000065" y1="0" x2="390.99050000000085" y2="49.05000000000008"><stop stop-color="#2EB9DF" stop-opacity="0"></stop><stop stop-color="#2EB9DF"></stop><stop offset="1" stop-color="#9E00FF" stop-opacity="0"></stop></linearGradient></defs></svg> |
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
[phases.setup] | |
nixpkgsArchive = '0e2e5ebac4c621a80f14c3bb3671697e960f7faf' |
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 { ZodTypeAny } from 'zod'; | |
/* | |
* .safeParse | |
*/ | |
interface ZodResponseSuccess<T> { | |
success: true; | |
data: T; | |
} |
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 { useEffect, useState } from 'react'; | |
const [isMetamaskInstalled, setIsMetamaskInstalled] = useState<boolean>(false); | |
// Check if Metamask wallet is installed and window.ethereum exists | |
useEffect(() => { | |
if (typeof (window as any)?.ethereum !== 'undefined' && (window as any)?.ethereum?.isMetaMask) { | |
setIsMetamaskInstalled(true); | |
} else { | |
setIsMetamaskInstalled(false); |
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 React, { useEffect } from 'react'; | |
interface IntersectionObserverProps { | |
root?: React.RefObject<Element | null>; | |
target: React.MutableRefObject<HTMLElement | null>; | |
onIntersect: () => void; | |
threshold?: number | number[]; | |
rootMargin?: string; | |
enabled?: boolean; | |
} |
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
enum Method { | |
GET = 'GET', | |
POST = 'POST', | |
PUT = 'PUT', | |
PATCH = 'PATCH', | |
DELETE = 'DELETE', | |
} | |
const useFetch = (endpoint: string, apiKey?: object) => { | |
const defaultHeader = { |
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 { useEffect, useState } from 'react'; | |
export default function useDebounce<T>(value: T, delay: number): T { | |
// State and setters for debounced value | |
const [debouncedValue, setDebouncedValue] = useState<T>(value); | |
useEffect( | |
() => { | |
// Update debounced value after delay | |
const handler = setTimeout(() => { |
NewerOlder