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 | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Routing\Route; | |
use Illuminate\Support\Str; | |
class NewRelicMiddleware |
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 | |
/** | |
* Ищет по тексту в инфоблоке. | |
* | |
* @param $iblockId int | array - ID инфоблока в котором искать. Может быть массивом. | |
* @param $query string - поисковый запрос. может содержать специфичные для Sphinx операторы ( * ) - будет передан прямо в Sphinx. | |
* рекомендуется передавать запрос вида <code>"*" . $searchQuery . "*"</code> | |
* @param $sectionId int - ID раздела в каталоге, в рамках которого искать | |
* @return array - список 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
https://www.ndchost.com/wiki/cloudlinux/how-to-add-commands-to-cagefs-users | |
https://www.supportsages.com/add-commandbinary-cagefs/ | |
# Adding packages to CageFS users | |
cagefsctl --addrpm <packagename> | |
cagefsctl --force-update |
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
# bash установить права на файлы и папки только на чтение | |
find ./ -type f -exec chmod 444 {} \; | |
find ./ -type d -exec chmod 555 {} \; | |
# показать фоновые задания | |
jobs | |
# отвязать фоновые задания | |
disown |
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 | |
/** | |
* Масштабирует фото, сохраняет копию файла и возвращает путь к нему | |
* либо возвращает ссылку на картинку-заглушку | |
* | |
* --- | |
* | |
* Водяной знак - если существует файл /upload/watermark/watermark_original.png - он будет | |
* смасштабирован под фото и нанесен на всю поверхность с небольшим отступом от края. |
OlderNewer