Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block w4r0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
w4r0 / php.ini for development
Created Apr 27, 2019
PHP configuration for development machine
View php.ini for development
; For dev only
error_reporting = E_ALL
; Should be 'off' on prod server
w4r0 / gist:dfaac200e8a0c1b12ac8fda889f841f2
Last active Jul 18, 2019
My Recurring Linux Command Line
View gist:dfaac200e8a0c1b12ac8fda889f841f2
Copy a file into a directory and its subdirectories:
sudo find <target-dir> -type d -exec cp <the file> {} \;
Change permission files recursively:
sudo find /var/www/html/ -type d -exec chmod 775 {} +
Change permission directory and its subdirectories recursively:
sudo find /var/www/html/ -type f -exec chmod 644 {} +
Find files containing string 'happy birth' with matching line
w4r0 / gist:ff2b06464121d1aabec7287f37f00d1a
Last active Jan 10, 2019
Linux Aliases to Switch PHP Version
View gist:ff2b06464121d1aabec7287f37f00d1a
Assuming I have three different PHP versions on my system:
1. PHP 5.6
2. PHP 7.1
3. PHP 7.2
To switch two between versions, add these aliases into your ~/.bashrc file:
alias php5671='sudo a2dismod php5.6 ; sudo a2enmod php7.1 ; sudo service apache2 restart ; echo 2 | sudo update-alternatives --config php'
alias php5672='sudo a2dismod php5.6 ; sudo a2enmod php7.2 ; sudo service apache2 restart ; echo 3 | sudo update-alternatives --config php'
View gist:743a04fd3add430c19237c393a5103a9
$all_vars = get_defined_vars();
You can’t perform that action at this time.