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
REM This file converts all of the Markdown files to HTML. | |
REM Converting in the current directory | |
REM %%~ni returns just the filename of %%i, not its extension | |
for %%i in (*.markdown) do pandoc -f markdown -t html5 %%~ni.markdown > html/%%~ni.html | |
REM Converting a subdirectory - just slap it on front | |
for %%i in (report_pages/*.markdown) do pandoc -f markdown -t html5 report_pages/%%~ni.markdown > html/report_pages/%%~ni.html |
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
#!/bin/bash | |
# Converts HTML from https://exportmyposts.jazzychad.net/ exports to Markdown | |
POSTS_DIR=/Users/richard/Desktop/d6y/posts | |
for file in $POSTS_DIR/*.html | |
do | |
echo $file |
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 | |
// A função abaixo demonstra o uso de uma expressão regular que identifica, de forma simples, telefones válidos no Brasil. | |
// Nenhum DDD iniciado por 0 é aceito, e nenhum número de telefone pode iniciar com 0 ou 1. | |
// Exemplos válidos: +55 (11) 98888-8888 / 9999-9999 / 21 98888-8888 / 5511988888888 | |
function phoneValidate($phone) | |
{ | |
$regex = '/^(?:(?:\+|00)?(55)\s?)?(?:\(?([1-9][0-9])\)?\s?)?(?:((?:9\d|[2-9])\d{3})\-?(\d{4}))$/'; | |
if (preg_match($regex, $phone) == false) { |
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
{ | |
"key": "dcwd_flip_card_group", | |
"title": "Flip Card", | |
"fields": [ | |
{ | |
"key": "front_image", | |
"label": "Front image", | |
"name": "card_front", | |
"type": "image", | |
"return_format": "array", |
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: wp_filter functions | |
Plugin URI: http://www.damiencarbery.com/2017/06/list-functions-attached-to-an-action/ | |
Description: List functions attached to all actions and filters. DON'T DO IT! | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
add_action( 'wp_head', 'wp_filter_the_wrong_way' ); |
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
Workato | |
Apiant | |
Inegromat | |
Snaplogic | |
CloudHQ | |
Boomi | |
Tibco | |
Jitterbit | |
AWS Lambda | |
Mulesoft |
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: Conditional WooCommerce Checkout Fields | |
* Description: Adds the abilitiy to conditionally show / hide checkout fields. | |
* Version: 1.0 | |
* Author: Caleb Burks | |
* Author URI: http://calebburks.com | |
*/ | |
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 | |
/** | |
* Skip cart and redirect to direct checkout | |
* | |
* @package WooCommerce | |
* @version 1.0.0 | |
* @author Alessandro Benoit | |
*/ | |
// Skip the cart and redirect to check out url when clicking on Add to cart |
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
/* | |
* Custom AJAX spinner on WooCommerce checkout | |
* The class used to load the overlay is .blockUI .blockOverlay | |
* The class used to load the spinner is .woocommerce .loader:before | |
* | |
*/ | |
.woocommerce .blockUI.blockOverlay:before,.woocommerce .loader:before { | |
height: 3em; | |
width: 3em; | |
position: absolute; |
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 // Don't add this line if inserting in a functions.php file. | |
add_filter( 'wp_nav_menu_items', function( $items, $args ) { | |
// Only used on main menu | |
if ( 'main_menu' != $args->theme_location ) { | |
return $items; | |
} | |
// Add custom item |