Skip to content

Instantly share code, notes, and snippets.

View jasperf's full-sized avatar
🏠
Working from home

Jasper Frumau jasperf

🏠
Working from home
View GitHub Profile
Uncaught TypeError: Cannot read properties of undefined (reading 'timepicker')
at jquery-ui-timepicker-addon.min.js?ver=1.6.1:4:132
at jquery-ui-timepicker-addon.min.js?ver=1.6.1:4:85
at jquery-ui-timepicker-addon.min.js?ver=1.6.1:4:95Understand this errorAI
menu.min.js?ver=1.13.3:9 Uncaught TypeError: a.widget is not a function
at menu.min.js?ver=1.13.3:9:223
at menu.min.js?ver=1.13.3:9:178
at menu.min.js?ver=1.13.3:9:188Understand this errorAI
autocomplete.min.js?ver=1.13.3:9 Uncaught TypeError: o.widget is not a function
at autocomplete.min.js?ver=1.13.3:9:217
@jasperf
jasperf / expire-headers-cache-control.sh
Created December 16, 2024 02:05
Check for expire headers and cache control for one single page
for url in $(curl -s https://autentical.nl/hoe-krijg-je-kaartjes-voor-de-caminito-del-rey/ | \
grep -Eo '(http|https)://[^"]+\.(js|css|jpg|jpeg|png|gif|woff|woff2|ttf|svg|eot)'); do
echo "Checking: $url"
curl -sI "$url" | grep -Ei 'cache-control|expires'
done
Checking: https://autentical.nl/wp-content/plugins/wd-google-maps/css/bootstrap.css
cache-control: max-age=31536000, public
expires: Tue, 16 Dec 2025 01:31:36 GMT
Checking: https://autentical.nl/wp-content/plugins/wd-google-maps/css/frontend_main.css
@jasperf
jasperf / optimize-tiqets-widget-loading.php
Created December 9, 2024 04:39
Optimize Tiqets widget loading
<?php
/**
* Optimize Tiqets widget loading by:
* 1. Adding resource hints (preconnect/dns-prefetch) for faster initial connection
* 2. Using Intersection Observer to detect when widgets come into viewport
* 3. Loading the Tiqets loader script only once when first widget becomes visible
* 4. Removing duplicate loader scripts from content
*
* Benefits:
* - Reduces initial page load by deferring widget loading

Having an issue with latest Sage 10 set up running yarn build:

yarn build
yarn run v1.22.22
$ bud build
(node:76623) ExperimentalWarning: CommonJS module /Users/user/code/site.com/site/web/app/themes/nynaeve/node_modules/tailwindcss/lib/lib/load-config.js is loading ES Module /Users/user/code/site.com/site/web/app/themes/nynaeve/tailwind.config.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

╭ sage [7c5a3ee7e664393f]                                                                                                  ./public
{
"__file": "wp_block",
"title": "Drinks V2",
"content": "<!-- wp:group {\"metadata\":{\"name\":\"container\",\"categories\":[\"intro\"],\"patternName\":\"intro-two-column-with-content-and-image\"},\"align\":\"full\",\"className\":\"alignfull\",\"style\":{\"spacing\":{\"padding\":{\"top\":\"calc( 0.5 * var(\\u002d\\u002dwp\\u002d\\u002dstyle\\u002d\\u002droot\\u002d\\u002dpadding-right, var(\\u002d\\u002dwp\\u002d\\u002dcustom\\u002d\\u002dgap\\u002d\\u002dhorizontal)))\",\"bottom\":\"calc( 0.5 * var(\\u002d\\u002dwp\\u002d\\u002dstyle\\u002d\\u002droot\\u002d\\u002dpadding-right, var(\\u002d\\u002dwp\\u002d\\u002dcustom\\u002d\\u002dgap\\u002d\\u002dhorizontal)))\",\"left\":\"var(\\u002d\\u002dwp\\u002d\\u002dstyle\\u002d\\u002droot\\u002d\\u002dpadding-left, var(\\u002d\\u002dwp\\u002d\\u002dcustom\\u002d\\u002dgap\\u002d\\u002dhorizontal))\",\"right\":\"var(\\u002d\\u002dwp\\u002d\\u002dstyle\\u002d\\u002droot\\u002d\\u002dpadding-right, var(\\u002d\\u002dwp\\u002d\\u002dcustom\\u002d\\u002dgap\\u002
@jasperf
jasperf / drinks-v2.json
Created September 14, 2024 04:14
Drink Menu Pattern JSON
{
"__file": "wp_block",
"title": "Drinks V2",
"content": "<!-- wp:group {\"metadata\":{\"name\":\"container\",\"categories\":[\"intro\"],\"patternName\":\"intro-two-column-with-content-and-image\"},\"align\":\"full\",\"className\":\"alignfull\",\"style\":{\"spacing\":{\"padding\":{\"top\":\"calc( 0.5 * var(\\u002d\\u002dwp\\u002d\\u002dstyle\\u002d\\u002droot\\u002d\\u002dpadding-right, var(\\u002d\\u002dwp\\u002d\\u002dcustom\\u002d\\u002dgap\\u002d\\u002dhorizontal)))\",\"bottom\":\"calc( 0.5 * var(\\u002d\\u002dwp\\u002d\\u002dstyle\\u002d\\u002droot\\u002d\\u002dpadding-right, var(\\u002d\\u002dwp\\u002d\\u002dcustom\\u002d\\u002dgap\\u002d\\u002dhorizontal)))\",\"left\":\"var(\\u002d\\u002dwp\\u002d\\u002dstyle\\u002d\\u002droot\\u002d\\u002dpadding-left, var(\\u002d\\u002dwp\\u002d\\u002dcustom\\u002d\\u002dgap\\u002d\\u002dhorizontal))\",\"right\":\"var(\\u002d\\u002dwp\\u002d\\u002dstyle\\u002d\\u002droot\\u002d\\u002dpadding-right, var(\\u002d\\u002dwp\\u002d\\u002dcustom\\u002d\\u002dgap\\u002
@jasperf
jasperf / index.html
Created September 7, 2024 00:54 — forked from JeffreyWay/index.html
Learn Vue 3: Step By Step - Episode 2, Attribute Binding and Event Handling - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/2
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Episode 2: Attribute Binding and Basic Events</title>
<script src="https://unpkg.com/vue@3"></script>
<style>
html, body {
height: 100%;
}
@jasperf
jasperf / cover.filter-v2.js
Last active August 26, 2024 11:42
Bud style WordPress block Filter (unfinished)
// Import necessary functions from @wordpress/hooks
import { addFilter } from '@wordpress/hooks';
import { createHigherOrderComponent } from '@wordpress/compose';
import { InspectorControls } from '@wordpress/block-editor';
import { PanelBody, ToggleControl, TextControl } from '@wordpress/components';
import { Fragment } from '@wordpress/element';
import React from 'react'; // Ensure React is imported for JSX and cloneElement
/**
* @see {@link https://developer.wordpress.org/block-editor/reference-guides/filters/block-filters/#blocks-registerblocktype}
@jasperf
jasperf / gutenberg-block-line.html
Created August 12, 2024 06:58
HTML Line Block Gutenberg
<hr style="display: block;height: 1px;border: 0;border-top: 2px solid #d4b767;margin: 0;padding:0;width:100%;" />
@jasperf
jasperf / build-and-deploy.yml
Last active May 24, 2024 06:36
Github workflow for Laravel Vue application and deployment on Ploi managed server
name: Build and Deploy
on:
push:
branches:
- staging
pull_request:
branches:
- master