If you switch from PHP 5.x to 7.1 you will get the following message:
"Function mcrypt_encrypt() is deprecated"
Now it is the right time to refactor this old function :-)
function encrypt(string $data, string $key, string $method): string| /** | |
| * Filters an array of objects with multiple criteria. | |
| * | |
| * @param {Array} array: the array to filter | |
| * @param {Object} filters: an object with the filter criteria as the property names | |
| * @return {Array} | |
| */ | |
| function multiFilter(array, filters) { | |
| const filterKeys = Object.keys(filters); | |
| // filters all elements passing the criteria |
| # Optimized my.cnf configuration for MySQL/MariaSQL | |
| # | |
| # by Fotis Evangelou, developer of Engintron (engintron.com) | |
| # | |
| # === Updated May 2018 === | |
| # | |
| # The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
| # If you have less or more resources available you should adjust accordingly to save CPU, | |
| # RAM and disk I/O usage. | |
| # The settings marked with a specific comment or the word "UPD" after the value |
| <?php | |
| namespace App\Console\Commands; | |
| use DB; | |
| use Illuminate\Console\Command; | |
| class UpgradeTimestamps extends Command | |
| { | |
| /** |
| <?php | |
| # Cron job command for Laravel 4.2 | |
| # Inspired by Laravel 5's new upcoming scheduler (https://laravel-news.com/2014/11/laravel-5-scheduler) | |
| # | |
| # Author: Soren Schwert (GitHub: sisou) | |
| # | |
| # Requirements: | |
| # ============= | |
| # PHP 5.4 |
| # Install linux update, followed by GCC and Make | |
| sudo yum -y update | |
| sudo yum install -y gcc make | |
| # Install Nginx and php56-FPM | |
| sudo yum install -y nginx php56-fpm | |
| # Install php56 extensions | |
| sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap |
| if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
| var Storage = function (type) { | |
| function createCookie(name, value, days) { | |
| var date, expires; | |
| if (days) { | |
| date = new Date(); | |
| date.setTime(date.getTime()+(days*24*60*60*1000)); | |
| expires = "; expires="+date.toGMTString(); |
| git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --author='Ionut Colceriu' > ~/log.csv |