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
| #!/bin/bash | |
| wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz | |
| tar zxvf ioncube_loaders_lin_x86-64.tar.gz | |
| PHP_CONFD="/etc/php/7.4/fpm/conf.d" | |
| PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") | |
| PHP_EXT_DIR=$(php-config --extension-dir) | |
| sudo cp "ioncube/ioncube_loader_lin_${PHP_VERSION}.so" $PHP_EXT_DIR | |
| sudo echo "zend_extension = ${PHP_EXT_DIR}/ioncube_loader_lin_${PHP_VERSION}.so" > "${PHP_CONFD}/00-ioncube.ini" | |
| PHP_CONFD="/etc/php/7.4/cli/conf.d" | |
| PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") |
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 // /app/Http/Middleware/Cors.php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| class Cors { | |
| public function handle($request, Closure $next) | |
| { | |
| return $next($request) |
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
| 1. sudo apt-get install virtualbox-guest-dkms | |
| 2. sudo apt-get -y install dkms build-essential linux-headers-$(uname -r) virtualbox-guest-additions-iso | |
| 2. Create the following shell script to automatically mount |
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
| In console with root user execute this command: | |
| visudo | |
| The "vi" editor will be opened. Add these lines: | |
| Defaults:git !authenticate | |
| git ALL=(www-data) ALL | |
| In result the file (that is opened in "vi" editor by calling "visudo") should look like this: | |
| # /etc/sudoers |
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
| # Add this file to the document root of the web server so that it will redirect the request to the public folder | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_URI} !^public | |
| RewriteRule ^(.*)$ public/$1 [L] | |
| </IfModule> |
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
| function hyphenize($string) { | |
| $dict = array( | |
| "I'm" => "I am", | |
| "thier" => "their", | |
| ); | |
| return strtolower( | |
| preg_replace( | |
| array( '#[\\s-]+#', '#[^A-Za-z0-9\. -]+#' ), | |
| array( '-', '' ), | |
| // the full cleanString() can be download from http://www.unexpectedit.com/php/php-clean-string-of-utf8-chars-convert-to-similar-ascii-char |