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
C:\> netstat -a -b |
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
SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;') | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE ENGINE='MyISAM' | |
AND table_schema = 'mydatabase'; |
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
mysql> SHOW VARIABLES LIKE "general_log%"; | |
+------------------+----------------------------+ | |
| Variable_name | Value | | |
+------------------+----------------------------+ | |
| general_log | OFF | | |
| general_log_file | /var/run/mysqld/mysqld.log | | |
+------------------+----------------------------+ | |
mysql> SET GLOBAL general_log = 'ON'; |
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
ncftpput -R -u user -p pass ftp.domain.com remote_dir local_dir | |
-z to incremental |
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
// similar behavior as an HTTP redirect | |
window.location.replace("http://stackoverflow.com"); | |
// similar behavior as clicking on a link | |
window.location.href = "http://stackoverflow.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 | |
$gravity_form_id = 1; // gravity form id, or replace {$gravity_form_id} below with this number | |
add_filter( "gform_after_submission_{$gravity_form_id}", 'hdco_set_post_metabox_field', 10, 2 ); | |
function hdco_set_post_metabox_field( $entry, $form ) { | |
$gf_images_field_id = 18; // the upload field id | |
$metabox_field_id = 'images_gallery'; // the metabox field id | |
if( isset( $entry['post_id'] ) ) { | |
$post = get_post( $entry['post_id'] ); |
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
msgid "" | |
msgstr "" | |
"Project-Id-Version: \n" | |
"POT-Creation-Date: 2015-10-12 19:24+0200\n" | |
"PO-Revision-Date: 2015-10-12 19:35+0200\n" | |
"Last-Translator: \n" | |
"Language-Team: \n" | |
"Language: fr_FR\n" | |
"MIME-Version: 1.0\n" | |
"Content-Type: text/plain; charset=UTF-8\n" |
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_filter('woocommerce_appointments_time_slots_html', 'idl_woocommerce_appointments_time_slots_html', 10, 8); | |
function idl_woocommerce_appointments_time_slots_html($slot_html, $slots, $intervals, $time_to_check, $staff_id, $from, $timezone, $appointment) { | |
if ( empty( $intervals ) ) { | |
$default_interval = 'hour' === $appointment->get_duration_unit() ? $appointment->get_duration() * 60 : $appointment->get_duration(); | |
$custom_interval = 'hour' === $appointment->get_duration_unit() ? $appointment->get_duration() * 60 : $appointment->get_duration(); | |
if ( $appointment->get_interval_unit() && $appointment->get_interval() ) { | |
$custom_interval = 'hour' === $appointment->get_interval_unit() ? $appointment->get_interval() * 60 : $appointment->get_interval(); | |
} |
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 bin/magento module:status | |
php bin/magento module:enable Hdco_CatalogSearch | |
php bin/magento setup:upgrade | |
php bin/magento setup:di:compile | |
find pub/static -name js-translation.json -exec rm -rf {} \; | |
php bin/magento setup:static-content:deploy en_US fr_FR | |
php bin/magento cache:clean | |
php bin/magento indexer:reindex |
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
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ | |
RewriteRule ^app/uploads/gravity_forms/(.*)$ /index.php [NC,R=401,L] |