Screenshot from 2019-01-20 20:58:31

c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory

Error c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory #include ^ compilation terminated. Traceback (most recent call last): File “”, line 17, in ———————————————————————- Here it is the problem of python devel For centos use “sudo yum install python-devel.x86_64” For Ubuntu use “sudo apt-get install python-dev”

Screenshot from 2019-01-20 20:58:31

Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0

configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. Try the –with-gmp, –with-mpfr and/or –with-mpc options to specify their locations. Source code for these libraries can be found at their respective hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also http://gcc.gnu.org/install/prerequisites.html for additional info. If you obtained GMP, MPFR and/or MPC from […]

Screenshot from 2019-01-20 20:58:31

Installing Maven 3.3.3 on Ubuntu 14

I am upgrading from 2.4 to 3.3.3 Pre-requisite: JDK 1.5 or above, JAVA_HOME set in environment variable Step 1) Download Maven-3.3.3 binary from a repository using the wget command. wget http://mirrors.sonic.net/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz Step 2) Untar the downloaded binary. tar -zxf apache-maven-3.3.3-bin.tar.gz Step 3) Move the application directory to /usr/local sudo cp -R apache-maven-3.3.3 /usr/local Step 4) […]

Screenshot from 2019-01-20 20:58:31

Database access class for MySql with Php

A php class to access mysql. It uses mysqli How to use: Include this Db file. create a Database object like $db = new Db(); For any query; $sql = ‘Mysql query’; $db->query($aql) $tableObject = new stdClass(); $tableObject->field_name1 = ‘field_value1’ $tableObject->field_name2 = ‘field_value2’ $tableObject->field_name3 = ‘field_value3’ $tableObject->field_name4 = ‘field_value3’ // Insert $db->insertObject(‘table_name’, $tableObject); // Update. […]

Screenshot from 2019-01-20 20:58:31

Add colors to git command output

Instead of seeing a plain output after a git command we can have the display in color. like when we execute git status to view changed or new files we can view each segment in colored way: or for when we execute git diff a_modified_file_name it is better to view deleted lines in red (-) […]

Screenshot from 2019-01-20 20:58:31

Common useful git commands

To go to last state after a conflicted merge: git reset –merge ORIG_HEAD To know the current active branch git branch this command show all branches available on local and highlights the active one. To know all available branch git branch -a