Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
var tableToExcel = (function() { | |
var uri = 'data:application/vnd.ms-excel;base64,' | |
, template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>' | |
, base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) } | |
, format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } | |
return function(tableID, name) { | |
table = document.getElementById(tableID); | |
var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML}; | |
var link = document.createElement("a"); | |
link.download |
add_filter( 'woocommerce_product_add_to_cart_text', 'superbotics_add_to_cart_text', 20, 2); | |
add_filter( 'woocommerce_product_single_add_to_cart_text', 'superbotics_add_to_cart_text', 20, 2); | |
function superbotics_add_to_cart_text( $text, $_product ) { | |
if ( ! $_product->is_in_stock() ) { | |
$text = __('<Custom Text>', 'superbotics-customizations'); | |
} | |
return $text; | |
} |
#!/bin/bash | |
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 | |
find . -type f -iname "*.png" -exec optipng -nb -nc {} \; | |
find . -type f -iname "*.png" -exec advpng -z4 {} \; | |
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; | |
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \; |
/* | |
* Add our Custom Fields to simple products | |
*/ | |
function mytheme_woo_add_custom_fields() { | |
global $woocommerce, $post; | |
echo '<div class="options_group">'; | |
// Text Field |
add_filter('acf/validate_value/name=voucher', 'acf_validate_vocher_code_unique', 10, 4); | |
function acf_validate_vocher_code_unique($valid, $value, $field, $input_name) { | |
// Bail early if value is already invalid. | |
if ($valid !== true) { | |
return $valid; | |
} | |
$result = validate_voucher_unqiue($value); |
public static function acf_validate_vocher_code_unique($valid, $value, $field, $input_name) { | |
// Bail early if value is already invalid. | |
if ($valid !== true) { | |
return $valid; | |
} | |
$result = self::validate_voucher_unqiue($value); | |
if( !empty($result) ){ | |
return $result; |
afghanistan : Afghanistan | |
albania : Albania | |
algeria : Algeria | |
american_samoa : American Samoa | |
andorra : Andorra | |
angola : Angola | |
anguilla : Anguilla | |
antigua_and_barbuda : Antigua and Barbuda | |
argentina : Argentina | |
armenia : Armenia |
<div hidden id="tagManager-tag-manager-promo-desktop"> | |
<div id="corona-open-modal" class="modal-window"> | |
<div> | |
<a href="#" title="Close" class="modal-close">Fermer</a> | |
<h1>INFORMATION</h1> | |
<p>Notre activité (prise de commandes, suivi de commandes, renseignements techniques, expéditions) continue pendant cette période</p> | |
<p>Les délais de livraison pourraient parfois être rallongés.<br>N’hésitez pas à contacter notre équipe technique pour toute information ou pour tout renseignement.</p> | |
<div class="rectangle-1"><p>Livraison offerte à domicile pour toute commande</p></div> |
<div hidden id="tagManager-tag-manager-promo-desktop"> | |
<div id="tag-manager-promo-desktop-block" class="tag-manager-promo- hide-on-mobile"> | |
<!-- For Desktop Collapsed view --> | |
<img | |
class="img-responsive tag-manager-promo-desktop-block close" | |
id="desktop-open-code" | |
src="" | |
alt="tag-manager-promo-"> | |
<!-- For Desktop Expanded view --> | |
<img |