Posts

Showing posts with the label tutorials

Modify DocumentRoot in Apache (Mac)

After you've installed Apache with Homebrew on macOS , you might want to change the DocumentRoot which points to the directory where your website resources reside (e.g. HTML, CSS, images). By default, DocumentRoot is located in /usr/local/var/www 1 . Here are the steps to follow to change DocumentRoot to map to a custom directory path: Place your website folder to the desired place. For example: /usr/local/var/www/my_website Open the file /usr/local/etc/httpd/httpd.conf with your favorite editor, search for DocumentRoot , and modify the following line by substituting your directory path within the double quotes: DocumentRoot "/your/directory/path" Also change the next line: <Directory "/your/directory/path"> Restart your Apache server (if you want Apache to restart at login): $ sudo brew services restart httpd or if you don't want Apache to run as a background service: $ sudo apachectl restart Test the changes to DocumentRo...

Heroku tutorials, definitions and useful commands

I followed the  PHP  and  Python  Heroku tutorials from their official website. While doing so, I saved some notes that might help you in installing the required software for using Heroku locally on your machine. These notes might assist you if you find yourself blocked while following one of the two tutorials because of an error message for example. Let's get started! NOTE:  the following notes make use of PHP 7.2.7, Python 3.6.4, Composer 1.6.5, and Heroku CLI 7.7.7 Contents 1. Notes for Tutorial 1: Getting Started on Heroku with PHP      1.1  Prerequisites      1.2 Install Composer (Linux/Unix/macOS)      1.3  Install PHP dependencies locally 2. Notes for Tutorial 2: Getting Started on Heroku with Python      2.1 Prerequisites      2.2  Install Python dependencies locally      2.3  Postgres issue 1: No manual entry for psql [mac...

Install the MAMP (Mac, Apache, MySQL, PHP) stack

Image
There are two ways that you could install ( freely ) the whole MAMP stack: installing the MAMP (version 4.5) software bundle is the easiest way since it is a one-click-solution for setting up a personal webserver install each components (Apache, MySQL, and PHP) separately. This second method consists in installing Apache and PHP with Homebrew, and MySQL with the  package Installer . It is the hardest method but it enables you more control over the installation process, e.g you can install specific versions of each components, or install extra PHP extensions. NOTE:  MAMP 4.5, Apache 2.4.33, MySQL 8.0.11, PHP 7.2.7, and phpMyAdmin 4.8.2 are installed in the following tutorial Contents 1. Method 1: install the MAMP software bundle 2. Method 2: install each components (Apache, MySQL, and PHP) separately      2.1 Apache+PHP           2.1.1 Install Apache+PHP           2.1.2  Change A...

Draw arrows with GIMP plugins

Image
Sample arrows that you can create with GIMP plugins If you want to create professionally-looking arrows with GIMP because you are tired of creating arrows that look like you drawn them drunk, then don't despair. I will show you three GIMP plugins for creating great-looking arrows: ArrowsCreator-0.4 is a Python plugin that supports 7 styles of arrows arrow.scm by B-Ranger is a script-fu plugin to "draw an arbitrary arrow into an image or a new layer" arrow.scm by programmer_ceds is a modified version of the previous script that allows you to draw curved arrows ArrowsCreator-04 Here are the steps to install the Python plugin ArrowsCreator-04 : Download the zip file ArrowsCreator-0.4.py.zip , and extract the two files ArrowsCreator-0.4.py and ArrowsModule.py Copy the two Python files into the plugins folder which on macOS is located at /Applications/GIMP.app/Contents/Resources/lib/gimp/2.0/plug-ins For other platforms, check out this guide...