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
Для предотвращения просмотра директорий сайта добавьте в .htaccess следующий код: | |
Options All -Indexes |
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
Изменить origin адрес репозитория двумя способами: | |
1) Первый способ задать url репозитория: | |
использовать команду git remote set-url origin, например: | |
git remote set-url origin [email protected]:vicman-wi/wi-backend.git | |
2) Второй способ: |
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 | |
// Переопределяем метод и добавляем стоимость доставки. | |
class CustomOrder extends msOrderHandler{ | |
public function getCost($with_cart = true, $only_cost = false) { | |
$response = $this->ms2->invokeEvent('msOnBeforeGetOrderCost', array( | |
'order' => $this, |
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 | |
$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() { | |
if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext"); | |
});</script>'); | |
//Создать плагин на событие OnDocFormRender |
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 // PHP код должен быть заключен в теги <?php | |
// Если ваш файл содержит только PHP-код, то можно | |
пропустить закрывающий ?> | |
// А так начинаются комментарии | |
# Это тоже комментарий но // предпочтительнее |
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 `', t.`TABLE_SCHEMA` , '`.`', t.`TABLE_NAME` , '` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' ) AS sqlcode | |
FROM `information_schema`.`TABLES` t | |
WHERE 1 | |
AND t.`TABLE_SCHEMA` = 'My_DB_for_convert' | |
ORDER BY 1 | |
LIMIT 0 , 90 |
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 | |
error_reporting(E_ALL); | |
$ftp_server = ''; | |
$ftp_user_name = ''; | |
$ftp_user_pass = ''; | |
$destination_file = ''; | |
$source_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
#!/bin/bash | |
#Читаем название сайта | |
echo "Введите название каталога" | |
read catalogName | |
echo "Нужна установка MODX и создание базы для него?" | |
read setup |
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
LD_PRELOAD=/lib/x86_64-linux-gnu/libresolv.so.2 /opt/Unity/Editor/Unity |
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 | |
# MySQL root password | |
ROOTPASS='password' | |
TIMEZONE='Europe/Moscow' | |
MYSQLPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
SFTPPASS=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12` | |
############## |