Skip to content

Instantly share code, notes, and snippets.

Working from home

Jasper Frumau jasperf

Working from home
View GitHub Profile
jasperf / functions.php
Created Feb 12, 2021 — forked from mikejolley/functions.php
woocommerce_flat_rate_shipping_add_rate example for theme functions.php
View functions.php
add_action( 'woocommerce_flat_rate_shipping_add_rate', 'add_another_custom_flat_rate', 10, 2 );
function add_another_custom_flat_rate( $method, $rate ) {
$new_rate = $rate;
$new_rate['id'] .= ':' . 'next_day'; // Append a custom ID
$new_rate['label'] = 'Next Day'; // Rename to 'Rushed Shipping'
$new_rate['cost'] += 2; // Add $2 to the cost
jasperf / pod.yaml
Created Jan 10, 2021 — forked from matthewpalmer/pod.yaml
kubernetes nginx php-fpm pod
View pod.yaml
# Create a pod containing the PHP-FPM application (my-php-app)
# and nginx, each mounting the `shared-files` volume to their
# respective /var/www/html directories.
kind: Pod
apiVersion: v1
name: phpfpm-nginx-example
View htaccess: Boilerplate
# BEGIN HTML5 Boilerplate
### This contains the HTML5 Boilerplate .htaccess that can be found at:
### Added:
### Block access to WordPress files that reveal version information.
### Removed:
jasperf / tabs.php
Created Sep 18, 2020 — forked from jmccole83/tabs.php
Add the below file to yourtheme/woocommerce/single-product/tabs/tabs.php. This will update the tabs to be an accordion. Update as required.
View tabs.php
* Single Product tabs
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/tabs/tabs.php.
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
jasperf / class-walker-nav-menu.php
Created Sep 14, 2020 — forked from ezetojo/class-walker-nav-menu.php
Tailwind Navigation Implementation for Wordpress
View class-walker-nav-menu.php
* Nav Menu API: Walker_Nav_Menu class
* @package WordPress
* @subpackage Nav_Menus
* @since 4.6.0
jasperf /
Last active May 31, 2020 — forked from myusuf3/
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule <name>"
  • Delete the now untracked submodule files rm -rf path_to_submodule
jasperf / rcWidget.js
Created May 19, 2020 — forked from milesw/rcWidget.js
View rcWidget.js
import 'core-js/es6/array';
import 'core-js/es6/object';
import 'core-js/es6/string';
// Global options
import defaults from './_config';
// general helper functions
import Helper from './_helpers';
// general pricing and currency functions
import Pricing from './_pricing';
// throttle and debounce manager
View Configurations for Laravel app on Kubernetes - Dockerfile
FROM php:7.2-fpm
COPY app /var/www/
jasperf / wp-config-debug.php
Created Feb 19, 2020 — forked from jrfnl/wp-config-debug.php
Code to add to wp-config.php to enhance information available for debugging.
View wp-config-debug.php
* == About this Gist ==
* Code to add to wp-config.php to enhance information available for debugging.
* You would typically add this code below the database, language and salt settings
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
jasperf / gist-oembed.php
Created Feb 14, 2020 — forked from ninnypants/gist-oembed.php
Quick WordPress plugin to add gists to oEmbed
View gist-oembed.php
Plugin Name: Gist oEmbed
Plugin URI:
Description: Embed gists into posts
Version: 1.0
Author: ninnypants
Author URI:
License: GPL2