Skip to content

Instantly share code, notes, and snippets.

View thisismzm's full-sized avatar
😁

Mohammad Zare Moghadam thisismzm

😁
View GitHub Profile
@thisismzm
thisismzm / no_zero_date.sql
Created May 12, 2018 05:12
Disable NO_ZERO_IN_DATE,NO_ZERO_DATE modes in sql
set sql_mode="ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";
set global sql_mode="ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";
@thisismzm
thisismzm / exphp
Last active May 3, 2018 23:51
This is a bash script for switch between PHP versions that are enable as Apache2 webserver module.
#!/bin/bash
sudo update-alternatives --set php "/usr/bin/php$2";
sudo update-alternatives --set "php-config" "/usr/bin/php-config$2";
sudo update-alternatives --set phpize "/usr/bin/phpize$2";
sudo a2dismod "php$1"
sudo a2enmod "php$2"
sudo service apache2 restart