The Ubuntu 20.04 image appears to come without extra modules, so they need to be installed additionally:
$ sudo apt install linux-modules-extra-$(uname -r)Then simply install zram-config
$ sudo apt install zram-configThe Ubuntu 20.04 image appears to come without extra modules, so they need to be installed additionally:
$ sudo apt install linux-modules-extra-$(uname -r)Then simply install zram-config
$ sudo apt install zram-config| <?php | |
| $arr = [ | |
| 'form_id' => 'https://example.ru/', | |
| 'status' => 'validation_failed', | |
| 'message' => 'Одно или несколько полей содержат ошибочные данные. Пожалуйста, проверьте их и попробуйте ещё раз.', | |
| 'invalid_fields' => [ | |
| [ | |
| 'field' => 'messaging', | |
| 'message' => 'Пожалуйста, заполните все обязательные поля', | |
| 'idref' => '', |
| // https://212d.ru/blog/otpravka-pochty-cherez-smtp-s-pomoshchyu-php | |
| <?php | |
| /** | |
| * SendMailSmtpClass | |
| * | |
| * Класс для отправки писем через SMTP с авторизацией | |
| * Может работать через SSL протокол | |
| * Тестировалось на почтовых серверах yandex.ru, mail.ru и gmail.com, smtp.beget.com | |
| * |
| cd /site.com/public_html/ | |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
| php composer-setup.php | |
| php -r "unlink('composer-setup.php');" | |
| php composer.phar require drupal/smtp |
| var temporaryPromises = block.getAttribute('data-imgs').split(',').map(function(src){ | |
| return new Promise(function (resolve, reject) { | |
| return resolve(true); | |
| // return resolve(false); // надо явно передавать результат + Promise.all прервется если будет хотя бы один reject | |
| }); | |
| }); | |
| Promise.all(temporaryPromises).then(function (arr) { // в arr будет массив результатов - в данном случае, true/false | |
| console.log(arr); | |
| }); |
| js: | |
| /** | |
| * Form submit | |
| */ | |
| document.querySelectorAll('form').forEach(function(el){ | |
| el.addEventListener('submit', function(e){ | |
| var path = window.location.pathname+'php/sender.php'; | |
| var debug = false; |
| .styled-scrollbars { | |
| --scrollbar-foreground: #a6a6a6; | |
| --scrollbar-background: rgba(255, 255, 255, 0); | |
| --scrollbar-fake-background: #f0f0f3; | |
| --scrollbar-size: 5px; | |
| --scroll-thumb-start: 40px; | |
| --scroll-thumb-end: 40px; | |
| --scrollbar-radius: 20px; | |
| padding-right: 1px; /* экстра-отступ */ | |
| margin-right: -1px; |
| <?php | |
| // based on https://stackoverflow.com/a/21389439/18216946 | |
| $unserialized = "a:2:{s:2:"aaaaaaaaaaaaa";}"; // some potentially broken data | |
| $fixed_data = preg_replace_callback ( '!s:(\d+):"(.*?)";!', function($match) { | |
| return ($match[1] == strlen($match[2])) ? $match[0] : 's:' . strlen($match[2]) . ':"' . $match[2] . '";'; | |
| },$unserialized ); | |
| $final = unserialize($fixed_data); |
The Super Page Cache for Cloudflare plugin has recently added the feature for using the Cache Everything pagerule withing the ?swcfpc=1 cache buster query paramater. This opens up so many new doors where users previously had to use the Cloudflare Workers to remove the cache buster.
With this new option now users are able to take advantage of Cloudflare Cache Everything page rule and take it to the next level by using the new Rulesets released by Cloudflare. Basically this is achived by taking advantage of the all new Cache Rules feature implemented by Cloudflare.
The first thing that you need to do is, log-in to your Cloudflare Dahsbord and go to the domain/zone doe which you are setting up the [Super Page Cache for Cloudflare](https://wordpress.org/plug
| /** | |
| * Cюда поместим отправляемые параметры | |
| */ | |
| var query = { | |
| 'action': 'loadMore', | |
| 'hdden_data': { | |
| 'posttype': 'news', | |
| } | |
| }; |