From 2338885b8d313af90d9db7c4a8399de464b4baf2 Mon Sep 17 00:00:00 2001 From: Imran Ali <1mr4n.ia@gmail.com> Date: Mon, 21 Jan 2019 21:25:27 +0530 Subject: [PATCH 1/8] added option to install complete C/C++ development environment --- tech/languages/c/cpp_installation.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tech/languages/c/cpp_installation.md b/tech/languages/c/cpp_installation.md index 21dda36e..d4d000ac 100644 --- a/tech/languages/c/cpp_installation.md +++ b/tech/languages/c/cpp_installation.md @@ -37,6 +37,13 @@ To view all the options that G++ can use, visit the manual page by typing: You will see that the manual page is identical with the one shown for GCC. + +## To install complete C/C++ development environment: + +``` +$ sudo dnf groupinstall "C Development Tools and Libraries" "Development Tools" +``` + ## CLANG installation Clang works both for C++ and C and the installation is the same as for C: From 49efc89ebe1f6d40bc6624b47ae53012ff656681 Mon Sep 17 00:00:00 2001 From: Imran Ali <1mr4n.ia@gmail.com> Date: Mon, 21 Jan 2019 21:26:25 +0530 Subject: [PATCH 2/8] typo fixed --- tech/languages/c/cpp_installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tech/languages/c/cpp_installation.md b/tech/languages/c/cpp_installation.md index d4d000ac..7dd8dff6 100644 --- a/tech/languages/c/cpp_installation.md +++ b/tech/languages/c/cpp_installation.md @@ -41,7 +41,7 @@ You will see that the manual page is identical with the one shown for GCC. ## To install complete C/C++ development environment: ``` -$ sudo dnf groupinstall "C Development Tools and Libraries" "Development Tools" +# sudo dnf groupinstall "C Development Tools and Libraries" "Development Tools" ``` ## CLANG installation From 613c8bce0a4daf6af81f3e01c99b7ea07716fe6e Mon Sep 17 00:00:00 2001 From: Imran Ali <1mr4n.ia@gmail.com> Date: Mon, 21 Jan 2019 21:44:28 +0530 Subject: [PATCH 3/8] Fix Access denied for phpMyAdmin Fix Access denied for user 'root'@'localhost' for phpMyAdmin --- tech/database/mariadb/about.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tech/database/mariadb/about.md b/tech/database/mariadb/about.md index 641b9b09..60a680b3 100644 --- a/tech/database/mariadb/about.md +++ b/tech/database/mariadb/about.md @@ -218,3 +218,19 @@ $ dnf install mariadb-oqgraph-engine In Fedora, MariaDB server is available also as a dynamic library, that can be handy in some applications. This library (`libmysqld.so`) is available in the package `mariadb-embedded` and header files for building an application against this library are available in the package `mariadb-embedded-devel`. However the use of the embedded library is discouraged. MySQL 8 dropped the embedded library and I expect MariaDB to go in the same direction. + +# Troubleshooting: +* Fix Access denied for user 'root'@'localhost' for phpMyAdmin + +(Mysql tries to authenticate root using plugin, not password. You need to disable plugin usage for root) + +``` +$ sudo mysql -u root -p +``` + +``` +[mysql]> use mysql; +[mysql]> update user set plugin='' where User='root'; +[mysql]> flush privileges; +[mysql]> \q +``` From 863444c5664be127fd18a7cf780e787050d1c4bf Mon Sep 17 00:00:00 2001 From: Imran Ali <1mr4n.ia@gmail.com> Date: Mon, 21 Jan 2019 21:56:09 +0530 Subject: [PATCH 4/8] php in docker Running your PHP Applications in Docker --- tech/languages/php/php-installation.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tech/languages/php/php-installation.md b/tech/languages/php/php-installation.md index 218e6ff4..a033071e 100644 --- a/tech/languages/php/php-installation.md +++ b/tech/languages/php/php-installation.md @@ -43,3 +43,15 @@ You can start PHP development server by typing this in your project's root: $ sudo php --server localhost:8080 --docroot . ``` Server will be accessible on `http://localhost:8080/`. + + +## Running your PHP Applications in Docker + +After installing docker on your machine, you can start a web server with one command. The following will download a fully functional Apache installation with the latest PHP version, map `/path/to/your/php/files` to the document root, which you can view at `http://localhost:8080` + +``` +$ docker run -d --name my-php-webserver -p 8080:80 -v /path/to/your/php/files:/var/www/html/ php:apache + +``` + +This will initialize and launch your container. `-d` makes it runs in the background. To stop and start it, simply run `docker stop my-php-webserver` and `docker start my-php-webserver` (the other parameters are not needed again) From 813f313682831dbecbaf309433e6c6b4d3be9510 Mon Sep 17 00:00:00 2001 From: Imran Ali <1mr4n.ia@gmail.com> Date: Mon, 21 Jan 2019 22:17:47 +0530 Subject: [PATCH 5/8] install sqlitebrowser install sqlitebrowser for Sqlite Graphical clients --- tech/database/sqlite/about.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tech/database/sqlite/about.md b/tech/database/sqlite/about.md index 8e263a42..376d12dd 100644 --- a/tech/database/sqlite/about.md +++ b/tech/database/sqlite/about.md @@ -24,12 +24,16 @@ $ sudo dnf install sqlite-devel sqlite-tcl sqlite-jdbc ## Graphical clients The `sqlite` client shipped with the basic database engine is command line (CLI) -based. If you prefer an application with graphical user interface (GUI), install -the `sqliteman` package: +based. If you prefer an application with graphical user interface (GUI), you can install +the `sqliteman` package and `sqlitebrowser`: ``` $ sudo dnf install sqliteman ``` +or +``` +$ sudo dnf install sqlitebrowser +``` ## Working with SQLite @@ -44,13 +48,14 @@ $ sqlite3 hello-world.db After executing this command, you will be greeted with a SQLite prompt and can now insert the SQL commands to execute. -If you prefer using GUI, the [Sqliteman][sqliteman] application enables you to +If you prefer using GUI, the [Sqliteman][sqliteman] or [Sqlitebrowser][sqlitebrowser] application enables you to construct your SQL queries using visual tool. If you are new to SQL databases and would like to learn more, you can visit a [W3CSchools SQL tutorial][sql-tut], which should give you a nice head start. [sqliteman]: http://sqliteman.yarpen.cz/ "Sqliteman home page" +[sqlitebrowser]: https://sqlitebrowser.org/ "Sqlitebrowser home page" [sql-tut]: http://www.w3schools.com/sql/default.asp "W3CSchools SQL Tutorial" ## Getting help with SQLite From 79e9dc19888842bb40674681d33f09134b2dc8b4 Mon Sep 17 00:00:00 2001 From: Imran Ali <1mr4n.ia@gmail.com> Date: Mon, 21 Jan 2019 23:21:33 +0530 Subject: [PATCH 6/8] django in pipenv How to install Django using pipenv --- tech/languages/python/django-installation.md | 50 ++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/tech/languages/python/django-installation.md b/tech/languages/python/django-installation.md index 7851927d..69c2c5d6 100644 --- a/tech/languages/python/django-installation.md +++ b/tech/languages/python/django-installation.md @@ -67,6 +67,56 @@ When you finish your work, just deactivate the virtual environment. (project_venv) $ deactivate ``` + +## How to install Django using pipenv +Create a new project folder and open it. + +``` +$ mdkir django_pipenv +$ cd django_pipenv +``` +then + +``` +pipenv install django +``` + +It will automatically create a virtual environment for the project. It will also create a `Pipfile` and a `Pipfile.lock` and will install `django` latest version with required dependencies. + +#### To activate the virtual environment just run + +``` +$ pipenv shell +``` + +#### Check the requirements or installed packages + +``` +(django_pipenv) $ pipenv lock -r +``` + +That's all, you have sucessfully installed Django in the virtual environment using `pipenv`. Now you can start working on your project as described in the above example. + +#### When you finish your work, just `deactivate` the virtual environment. + +``` +(django_pipenv) $ exit +``` + +### WHEN PROJECT IS REAY TO MOVE TO PRODUCTION: + +#### Update the `Pipfile.lock` + +``` +$ pipenv lock +``` + +#### Install in the Production environment (Install from `Pipfile.lock` , ignore pipfile) + +``` +$ pipenv install --ignore-pipfile +``` + ### What next? * [Django Documentation](https://docs.djangoproject.com/) From b6dc6789824a25403118276cdb85d5a6f027e06d Mon Sep 17 00:00:00 2001 From: Imran Ali <1mr4n.ia@gmail.com> Date: Tue, 29 Jan 2019 11:14:56 +0530 Subject: [PATCH 7/8] Docker reference added --- tech/languages/php/php-installation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tech/languages/php/php-installation.md b/tech/languages/php/php-installation.md index a033071e..8648a7b0 100644 --- a/tech/languages/php/php-installation.md +++ b/tech/languages/php/php-installation.md @@ -47,6 +47,8 @@ Server will be accessible on `http://localhost:8080/`. ## Running your PHP Applications in Docker +To install docker in your system, see [docker installation guide](https://developer.fedoraproject.org/tools/docker/about.html) for more details. + After installing docker on your machine, you can start a web server with one command. The following will download a fully functional Apache installation with the latest PHP version, map `/path/to/your/php/files` to the document root, which you can view at `http://localhost:8080` ``` From 3cc1b367c6ddb1a8f0cbb1c2ed84fac9f1183755 Mon Sep 17 00:00:00 2001 From: Imran Ali <1mr4n.ia@gmail.com> Date: Tue, 29 Jan 2019 11:29:50 +0530 Subject: [PATCH 8/8] name changed as suggested --- tech/languages/python/django-installation.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tech/languages/python/django-installation.md b/tech/languages/python/django-installation.md index 69c2c5d6..9b3d316d 100644 --- a/tech/languages/python/django-installation.md +++ b/tech/languages/python/django-installation.md @@ -72,13 +72,13 @@ When you finish your work, just deactivate the virtual environment. Create a new project folder and open it. ``` -$ mdkir django_pipenv -$ cd django_pipenv +$ mdkir my_project +$ cd my_project ``` then ``` -pipenv install django +$ pipenv install django ``` It will automatically create a virtual environment for the project. It will also create a `Pipfile` and a `Pipfile.lock` and will install `django` latest version with required dependencies. @@ -92,7 +92,7 @@ $ pipenv shell #### Check the requirements or installed packages ``` -(django_pipenv) $ pipenv lock -r +(my_project) $ pipenv lock -r ``` That's all, you have sucessfully installed Django in the virtual environment using `pipenv`. Now you can start working on your project as described in the above example. @@ -100,7 +100,13 @@ That's all, you have sucessfully installed Django in the virtual environment usi #### When you finish your work, just `deactivate` the virtual environment. ``` -(django_pipenv) $ exit +(my_project) $ exit +``` + +#### Run command in Pipenv environment without activating pipenv environment + +``` +$ pipenv run python ``` ### WHEN PROJECT IS REAY TO MOVE TO PRODUCTION: