This file contains hidden or 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 below function in theme functions.php file | |
| */ | |
| add_filter('woocommerce_product_addons_option_price', 'theme_name_product_addons_show_msrp', 20, 4); | |
| function theme_name_product_addons_show_msrp($html, $option, $idx, $type) { | |
| // User has chosen not to show MSRP, don't show it |
This file contains hidden or 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_filter( 'wpforms_email_headers', function ( $headers, $emails ) { | |
| // APPLY THE BCC TO THIS FORM ID ONLY. | |
| // CHANGE THE ID TO THE FORM YOU NEED. OR REMOVE THE WHOLE IF BLOCK IF NEEDED FOR ALL FORMS. | |
| if ( 384 !== $emails->form_data['id'] ) { | |
| return $headers; | |
| } | |
| // CHANGE THIS EMAIL ADDRESS TO YOURS: |
This file contains hidden or 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
| # ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use: | |
| # "${data.external.ssh_key_generator.result.public_key}" (contents) | |
| # "${data.external.ssh_key_generator.result.private_key}" (contents) | |
| # "${data.external.ssh_key_generator.result.private_key_file}" (path) | |
| data "external" "ssh_key_generator" { | |
| program = ["bash", "${path.root}/../ssh_key_generator.sh"] | |
| query = { | |
| customer_name = "${var.customer_name}" | |
| customer_group = "${var.customer_group}" |
This file contains hidden or 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
| [options] | |
| # | |
| # WARNING: | |
| # If you use the Odoo Database utility to change the master password be aware | |
| # that the formatting of this file WILL be LOST! A copy of this file named | |
| # /etc/odoo/openerp-server.conf.template has been made in case this happens | |
| # Note that the copy does not have any first boot changes | |
| #----------------------------------------------------------------------------- | |
| # Odoo Server Config File - TurnKey Linux |
This file contains hidden or 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
| /* | |
| * Add our Custom Fields to simple products | |
| */ | |
| function mytheme_woo_add_custom_fields() { | |
| global $woocommerce, $post; | |
| echo '<div class="options_group">'; | |
| // Text Field |
This file contains hidden or 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
| wget --spider -o wget.log -e robots=off -r -l 5 -p -S --header="X-Bypass-Cache: 1" live-mysite.gotpantheon.com | |
| # Options explained | |
| # --spider: Crawl the site | |
| # -o wget.log: Keep the log | |
| # -e robots=off: Ignore robots.txt | |
| # -r: specify recursive download | |
| # -l 5: Depth to search. I.e 1 means 'crawl the homepages'. 2 means 'crawl the homepage and all pages it links to'... | |
| # -p: get all images, etc. needed to display HTML page | |
| # -S: print server response |
This file contains hidden or 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_action( 'wp_footer', function() { | |
| ?> | |
| <script> | |
| (function($) { | |
| if ('object' !== typeof FWP) { | |
| return; | |
| } | |
| $(function() { |
This file contains hidden or 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
| DROP PROCEDURE IF EXISTS convertToInnodb; | |
| DELIMITER // | |
| CREATE PROCEDURE convertToInnodb() | |
| BEGIN | |
| mainloop: LOOP | |
| SELECT TABLE_NAME INTO @convertTable FROM information_schema.TABLES | |
| WHERE `TABLE_SCHEMA` LIKE DATABASE() | |
| AND `ENGINE` LIKE 'MyISAM' ORDER BY TABLE_NAME LIMIT 1; | |
| IF @convertTable IS NULL THEN | |
| LEAVE mainloop; |
This file contains hidden or 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
| DROP PROCEDURE IF EXISTS convertToInnodb; | |
| DELIMITER // | |
| CREATE PROCEDURE convertToInnodb() | |
| BEGIN | |
| mainloop: LOOP | |
| SELECT TABLE_NAME INTO @convertTable FROM information_schema.TABLES | |
| WHERE `TABLE_SCHEMA` LIKE DATABASE() | |
| AND `ENGINE` LIKE 'MyISAM' ORDER BY TABLE_NAME LIMIT 1; | |
| IF @convertTable IS NULL THEN | |
| LEAVE mainloop; |