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
@jasperf
jasperf / .php-cs-fixer.dist.php
Last active December 16, 2023 03:40
PHP CS Fixer Rules Laravel
<?php
/* https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 */
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
@jasperf
jasperf / cors.conf
Created December 7, 2023 08:15
Deal with CORS on Laravel Valet based of off https://rias.be/blog/adding-cors-headers-to-laravel-valet
# You can solve this by creating a file at ~/.config/valet/Nginx/cors.conf that contains the following:
# CORS Rules
add_header Access-Control-Allow-Origin *;
# END of CORS Rules #
@jasperf
jasperf / thinktific-mollie.md
Last active November 27, 2023 03:00
Thinktific Payments via native checkout and Mollie Integration via API or Zapier
awk '($9 ~ /200/) { i++;sum+=$10;max=$10>max?$10:max; } END { printf("Maximum: %d\nAverage: %d\n",max,i?sum/i:0); }' /var/www/vhosts/site.nl/logs/access_ssl_log
// results example:
// Maximum: 1675502
// Average: 12756
@jasperf
jasperf / exclude.js
Created November 15, 2023 04:47
Fancy Product Designer scripts exclusion WP Rocket
// JS Execution Deferral exceptions
/jquery-?[0-9.](.*)(.min|.slim|.slim.min)?.js
/wp-content/plugins/fancy-product-designer/assets/js/fabric.min.js
/wp-content/plugins/fancy-product-designer/assets/js/FancyProductDesigner-all.min.js
/wp-content/plugins/fancy-product-designer/assets/js/frontend.js
/wp-content/plugins/fancy-product-designer/assets/js/frontend-shortcode.js
/wp-content/plugins/fancy-product-designer/assets/js/frontend-woo.js
/wp-content/plugins/fancy-product-designer/assets/js/frontend-woo-variations.js
// Delay exclusion
@jasperf
jasperf / woocommerce_defer_transactional_emails.php
Created November 15, 2023 03:55 — forked from jessepearson/woocommerce_defer_transactional_emails.php
This will turn on deferred transactional emails in WooCommerce. This may help if you are experiencing slow checkouts or checkout timeouts.
<?php // Do not copy this line
/**
* This will turn on deferred transactional emails in WooCommerce. This may help if you
* are experiencing slow checkouts or checkout timeouts.
*/
add_filter( 'woocommerce_defer_transactional_emails', '__return_true' );
@jasperf
jasperf / wp-config.php
Last active November 15, 2023 02:35 — forked from JRyven/wp-config.php
WordPress Debugging Options
// general PHP and WordPress warnings, error messages and status information
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WPS_DEBUG', true );
// script and style
define( 'WPS_DEBUG_SCRIPTS', true );
@jasperf
jasperf / element or-gallery-columns-mobile.css
Created November 1, 2023 02:00
Elementor gallery custom column number for mobile
@jasperf
jasperf / gif2mp4.hs
Last active October 26, 2023 01:29
Animated .gif conversion to mp4 that also works on Quicktime . Size chosen here is 500 by 250
ffmpeg -i animated.gif -s 500x250 -pix_fmt yuv420p video-500x250-qt.mp4
@jasperf
jasperf / andrea-egli-1.css
Last active November 10, 2023 09:34
Elementor Vertical Carousel by Template Monster - https://www.youtube.com/watch?v=MBWP1bRDYN4 and Andrea Egli - https://www.youtube.com/watch?v=i13Az30Kwa8 using CSS Animation . Andrea uses Elementor containers or Flexbox
// 1st Vertical Carousel (left-hand side)
.carouselverticalone {
animation: looping 10s linear 0s infinite none;
}
.verticalcolumnone {
max-height: 750px;
height: 750px;