Skip to content

Instantly share code, notes, and snippets.

View sh6210's full-sized avatar
🎯
Focusing

Sohag Hossain sh6210

🎯
Focusing
View GitHub Profile
/etc/hosts
/etc/apache2/sites-available/000-default
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName phpmyadmin.dev
ServerAlias www.phpmyadmin.dev
DocumentRoot /var/www/html/phpmyadmin
<Directory "/var/www/html/phpmyadmin">
AllowOverride all
@sh6210
sh6210 / Virtual Host
Last active September 11, 2021 18:54
/etc/apache2/sites-available/000-default
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName test.loc
ServerAlias www.test.loc
DocumentRoot /var/www/html/test
<Directory "/var/www/html/test">
AllowOverride all
Require all granted
@sh6210
sh6210 / commands.txt
Last active September 17, 2021 06:35
Ubuntu necessary commands for setting up a dev machine
sudo apt-get update && sudo apt-get upgrade -y
sudo snap install code --classic
sudo snap install skype --classic
sudo apt install git-all
sudo apt install npm
@sh6210
sh6210 / switch php version bash file
Last active January 12, 2022 19:31
Bash script for switching php version.
REQUESTED_VERSION=${1?Error: no version given}
CURRENT_VERSION=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')
echo Current Version: $CURRENT_VERSION
echo Requested Version: $REQUESTED_VERSION
sudo a2dismod php"$CURRENT_VERSION" \
&& sudo a2enmod php"$REQUESTED_VERSION" \
&& sudo update-alternatives --set php /usr/bin/php"$REQUESTED_VERSION" \
&& sudo service apache2 restart
@sh6210
sh6210 / Installation.md
Last active October 26, 2021 08:28
Prepare machine after MacOS fresh installation

install homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

install git

brew install wget

xcode-select —-install