Notes

My Lil Stack Overflow 😉

Problem

how to solve /bin/bash: line 92: scripts/get-api-data.sh: Permission denied

Solution

just add chmod +x to overwrite the file Permissions. for example do this:

chmod +x scripts/index.sh
Problem

how to create a virtual environment in python

Solution
pip install virtualenv
virtualenv venv
venv\Scripts\activate
Problem

how to create requirements.txt file which stores the packages used in a python project

Solution
pip freeze > requirements.txt
Problem

how to install jupyter notebooks on windows

Solution
pip install jupyterlab
pip install jupyter
jupyter-notebook

in case any error arises, do this

pip uninstall pyzmq
pip install pyzmq
Problem

how to configure a virtual host in apache on ubuntu

Solution

first do

sudo su
cd /etc
gedit hosts

enter the website’s ip and name as

127.0.0.1   example.com

then do

cd apache2/sites-available
cp 000-default.conf example.com.conf
gedit example.com.conf

add the following text into the file

<Directory /home/user/Documents/example.com/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
</Directory>

# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName example.com

ServerAdmin webmaster@example.com
DocumentRoot /home/user/Documents/example.com
a2ensite example.com.conf
systemctl reload apache2