This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################# | |
# K3d # | |
# How to run Kubernetes locally # | |
# https://youtu.be/mCesuGk-Fks # | |
################################# | |
# Referenced videos: | |
# - How to run local multi-node Kubernetes clusters using kind: https://youtu.be/C0v5gJSWuSo | |
# - Kaniko - Building Container Images In Kubernetes Without Docker: https://youtu.be/EgwVQN6GNJg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################## | |
# How to run local multi-node Kubernetes clusters using kind # | |
# https://youtu.be/C0v5gJSWuSo # | |
############################################################## | |
######### | |
# Setup # | |
######### | |
# Install kind (https://kind.sigs.k8s.io/docs/user/quick-start/#installation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Convert ACF PHP to JSON | |
* Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON. | |
*/ | |
namespace ConvertAcfPhpToJson; | |
/** | |
* Add submenu item under 'Custom Fields' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
/* Adjust font size */ | |
font-size: 100%; | |
-webkit-text-size-adjust: 100%; | |
/* Font varient */ | |
font-variant-ligatures: none; | |
-webkit-font-variant-ligatures: none; | |
/* Smoothing */ | |
text-rendering: optimizeLegibility; | |
-moz-osx-font-smoothing: grayscale; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Converts the WooCommerce country codes to 3-letter ISO codes | |
* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 | |
* @param string WooCommerce's 2 letter country code | |
* @return string ISO 3-letter country code | |
*/ | |
function kia_convert_country_code( $country ) { | |
$countries = array( | |
'AF' => 'AFG', //Afghanistan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add the code below to your theme's functions.php file to add a confirm password field on the register form under My Accounts. | |
add_filter('woocommerce_registration_errors', 'registration_errors_validation', 10,3); | |
function registration_errors_validation($reg_errors, $sanitized_user_login, $user_email) { | |
global $woocommerce; | |
extract( $_POST ); | |
if ( strcmp( $password, $password2 ) !== 0 ) { | |
return new WP_Error( 'registration-error', __( 'Passwords do not match.', 'woocommerce' ) ); | |
} |