A collection of snippets to perform tasks to convert code syntax in some languages.
const EmailIcon = dynamic(() => import("images/icons/buttons/email-button.svg"))| <?php | |
| /* | |
| Plugin Name: WordPress APCu Object Cache Backend | |
| Plugin URI: https://github.com/l3rady/WordPress-APCu-Object-Cache | |
| Description: APCu backend for WordPress' Object Cache | |
| Version: 1.1 | |
| Author: Scott Cariss | |
| Author URI: http://scott.cariss.dev | |
| */ |
| $ cat /proc/cpuinfo | |
| processor : 0 | |
| vendor_id : GenuineIntel | |
| cpu family : 6 | |
| model : 61 | |
| model name : Intel Core Processor (Broadwell, no TSX, IBRS) | |
| stepping : 2 | |
| microcode : 0x1 | |
| cpu MHz : 2394.454 | |
| cache size : 16384 KB |
| import parseHttpHeader from "./parseHttpHeader" | |
| describe("functions/parseHttpHeader", function () { | |
| it.each([ | |
| [ | |
| "users=0-10/100", | |
| { | |
| users: "0-10/100", | |
| }, | |
| ], |
| <?php | |
| namespace WP_Disable_Plugin_Update_Notifications; | |
| $plugins = [ | |
| 'elementor/elementor.php', | |
| 'elementor-pro/elementor-pro.php', | |
| ]; | |
| add_filter( 'site_transient_update_plugins', function ( $value ) use ( $plugins ) { |
| <?php | |
| /** | |
| * Plugin Name: Custom | |
| * Plugin URI: https://gist.github.com/lightningspirit/4619cb99fcb662b390d9596df1479d41 | |
| * Description: Custom code for everybody | |
| * Author: Move Your Digital | |
| * Author URI: https://moveyourdigital.com | |
| * Version: 1.0.0 | |
| * |
| type ValueType = | |
| | string | |
| | number | |
| | boolean | |
| | null | |
| | undefined | |
| | (string | number | boolean | null | undefined)[] | |
| function mapBooleans(key: string, value: ValueType) { | |
| switch (value) { |
| import { useCallback, useEffect, useMemo, useState } from "preact/hooks" | |
| class StateTransitionError extends Error {} | |
| function useFSM<T extends string>( | |
| transitions: Record<T, T[]>, | |
| options: { | |
| throwOnTransitionError?: boolean | |
| } = { throwOnTransitionError: true }, | |
| ) { |