-
Open the Terminal
-
Use
mysqldump
to backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql
-
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
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
server { | |
listen 80; | |
server_name app.rehanmanzoor.me; | |
charset utf-8; | |
client_max_body_size 1M; | |
location / { | |
proxy_pass http://127.0.0.1:8001; | |
proxy_http_version 1.1; |
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
<div id="app"> | |
<div id="hero"> | |
<h1>NEON<br/>CURSOR</h1> | |
</div> | |
</div> |
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
<div id="container"> | |
<!-- Edit the letter attr to: N, E, T, F, L, I or X --> | |
<netflixintro letter="N"> | |
<div class="helper-1"> | |
<div class="effect-brush"> | |
<span class="fur-31"></span> | |
<span class="fur-30"></span> | |
<span class="fur-29"></span> | |
<span class="fur-28"></span> | |
<span class="fur-27"></span> |
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 | |
/** | |
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
* | |
* You may also want a list of unofficial codes: | |
* | |
* 103 => 'Checkpoint', | |
* 218 => 'This is fine', // Apache Web Server | |
* 419 => 'Page Expired', // Laravel Framework |
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 | |
/* | |
* Generate prom.ua catalog | |
* | |
* @url https://support.prom.ua/hc/ru/articles/360004960817 | |
* @create CrazyBoy49z | |
* @date 06.05.2020 | |
*/ | |
$func = function ($value) { |
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 | |
$stercseo = $modx->getService('stercseo', 'StercSEO', $modx->getOption('stercseo.core_path', null, $modx->getOption('core_path').'components/stercseo/').'model/stercseo/', array()); | |
if (!($stercseo instanceof StercSEO)) { | |
return; | |
} | |
$resources = $modx->getCollection("modResource"); | |
foreach ($resources as $k => $resource) { | |
$properties = $resource->getProperties('stercseo'); | |
if (!empty($properties)) { |
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
У многих проблема с выводом тегов в фигурных скобках в Fenom MODX, Как обойты? | |
/** @var modX $modx */ | |
switch ($modx->event->name) { | |
case 'pdoToolsOnFenomInit': | |
$fenom->addModifier('ignore', function ($input) use ($modx) { | |
$input = "{ignore}{$input}{/ignore}"; | |
return $input; | |
}); | |
break; |
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
Все примеры расположены в порядке уменьшения нагрузки на БД и при равенстве кол-ва запросов в порядке уменьшения кол-ва строк кода. Сверху самый ресурсоёмкий по кол-ву запросов к БД. | |
/////////////////////////////////////////////////////////// | |
Пустая страница MODX при отключенном кэше: | |
кол-во зпросов/время запросов/время выполнения PHP кода/общее время | |
6/0.0002 s/0.0336 s/0.0338 s | |
*********************************************************** | |
1-ый код с pdoFetch, все методы: | |
$pdo = $modx->getService('pdoFetch'); | |
$pdo->setConfig(array( |
NewerOlder