Skip to content

Instantly share code, notes, and snippets.

View MarouaneSH's full-sized avatar
🏠
Working from home

Marouane Souah MarouaneSH

🏠
Working from home
View GitHub Profile
@MarouaneSH
MarouaneSH / javascript Datediff for human
Created June 12, 2018 13:26
Javascript Datediff for human ( CARBON DATEDIFF)
function timeSince(date) {
var seconds = Math.floor((new Date() - date) / 1000);
var interval = Math.floor(seconds / 31536000);
if (interval > 1) {
return interval + " years";
}
interval = Math.floor(seconds / 2592000);
sudo apt-get install python-software-properties -y
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install php7.2 php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml
sudo apt-get install libapache2-mod-php7.2 -y
sudo a2dismod php5
sudo a2enmod php7.2
sudo service apache2 restart