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 new tabs with the content of Advanced Custom Fields. | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'bau_woo_remove_product_tabs', 98 ); | |
function bau_woo_remove_product_tabs( $tabs ) { | |
// Define, the meta_key of the | |
$bautabs = array( | |
'alergenos' => array( | |
'title' => __('Alérgenos'), |
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
function wc_ninja_remove_password_strength() { | |
if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) { | |
wp_dequeue_script( 'wc-password-strength-meter' ); | |
} | |
} | |
add_action( 'wp_print_scripts', 'wc_ninja_remove_password_strength', 100 ); |
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
# Swift useful and common gists |
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 checkbox field to the checkout | |
**/ | |
$myCheckboxKey = 'my_checkbox'; | |
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field'); | |
function my_custom_checkout_field( $checkout ) { |
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
# Start a new feature | |
git checkout -b new-feature master | |
# Edit some files | |
git add <file> | |
git commit -m "Start a feature" | |
# Merge in the new-feature branch | |
git checkout master | |
git merge new-feature |
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
# Ban an IP Attack | |
iptables -A INPUT -s 191.96.249.53 -j DROP |
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
array( | |
array( | |
672037005 => array( | |
"condition" => "subtotal", | |
"operator" => ">=", | |
"value" => "150" | |
), | |
672037010 => array( | |
"condition" => "country", | |
"operator" => "==", |
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/sh | |
# Install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Apple hides old versions of stuff at https://developer.apple.com/download/more/ | |
# Install the latest XCode (8.0). | |
# We used to install the XCode Command Line Tools 7.3 here, but that would just upset the most recent versions of brew. | |
# So we're going to install all our brew dependencies first, and then downgrade the tools. You can switch back after | |
# you have installed caffe. | |
# Install CUDA toolkit 8.0 release candidate | |
# Register and download from https://developer.nvidia.com/cuda-release-candidate-download |
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
.latido { | |
-moz-animation: latir 2s infinite; | |
-webkit-animation: latir 2s infinite; | |
animation: latir 2s infinite; } | |
/*$animation_first: translateY(0);*/ | |
/*$animation_first: translateY(0);*/ | |
/*$animation_second: translateY(-20px);*/ | |
/*$animation_second: translateY(-20px);*/ |
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
public void onClickOpenAddressButton(View v) { | |
String addressString = "plaza mayor 1, Madrid"; | |
Uri.Builder builder = new Uri.Builder(); | |
builder.scheme("geo") | |
.path("0,0") | |
.query(addressString); | |
Uri addressUri = builder.build(); | |
showMap(addressUri); | |
} |
OlderNewer