Skip to content

Instantly share code, notes, and snippets.

View JamesJosephFinn's full-sized avatar

James Joseph Finn JamesJosephFinn

View GitHub Profile
@rynaldos-zz
rynaldos-zz / wc-hide-shipping-keep-lpp.php
Last active June 5, 2017 21:23
[WooCommerce 3.0] Hide all other shipping methods, but keep free shipping / local pickup plus
function hide_shipping_when_free_is_available( $rates, $package ) {
$new_rates = array();
foreach ( $rates as $rate_id => $rate ) {
// Only modify rates if free_shipping is present.
if ( 'free_shipping' === $rate->method_id ) {
$new_rates[ $rate_id ] = $rate;
break;
}
}
@dwelch2344
dwelch2344 / installOpenVbx.sh
Last active February 11, 2018 22:24
A simple install script to setup OpenVbx on an Ubuntu 14.04 box
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
export DBNAME=openvbx
export DBUSER=openvbx
export DBPASS=openvbxPass
@cvrebert
cvrebert / survey.md
Last active May 8, 2024 16:13
Click and focus behavior across browsers & OSes

Test apparatus: http://jsfiddle.net/hRub4/

(Windows = Windows 8.1 desktop)

  • Windows Chrome 39
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click and via keyboard tabbing
  • Windows Firefox 30.0
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click and via keyboard tabbing
  • Windows Internet Explorer 11