Change express-generator app port

The express-generator package helps a lot in the development of web applications with Node, because it generates the skeleton of an application. A small disadvantage is that, when generating the code, we do not know how to change some very basic things, for example, the port on which the app listens (the default port is 3000). In this post I will show you how to change the port in some app generated by express-generator. ...

June 21, 2019 · 1 min · 184 words · Parzibyte

Migrate customers table from MijoShop to OpenCart 3

When we migrate customers from MijoShop to OpenCart there is a little problem: the methods to hash passwords are different and thus when our customers try to login the passwords do not match. In this post I will show you how to migrate and fix the problem. ...

June 2, 2019 · 12 min · 2419 words · Parzibyte

Reset OpenCart user password manually (in database)

Today we will see how to reset the OpenCart password (e-commerce system in PHP) manually, directly in the database; generating the hash and the salt manually with a function created by me. Function that generates salt and new password Here I leave the code, and the explanation at the end. <?php function token($length = 32) { // Create random token $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $max = strlen($string) - 1; $token = ''; for ($i = 0; $i < $length; $i++) { $token .= $string[mt_rand(0, $max)]; } return $token; } function generar_pass($passTextoPlano){ $sal = token(9); $hash = sha1($sal . sha1($sal . sha1($passTextoPlano))); return [ "sal" => $sal, "hash" => $hash, ]; } // Demostrar uso $datosPass = generar_pass("hunter2"); $pass = $datosPass["hash"]; // Este va en el campo password $sal = $datosPass["sal"]; // Este va en el campo salt printf("La sal es %s y la pass es %s", $sal, $pass); The function returns an array that has the salt and the password, the way to call it is to pass the password in plain text. ...

June 2, 2019 · 2 min · 359 words · Parzibyte

How to install Node.js and NPM on Android using Termux app

In this post we will see how to install Node.Js and NPM (Node package manager) in Android. At the end we will be able to run Node.js applications as if we had a Linux server. We will also see how to install dependencies using the npm install command, since it is a possible thing in Android thanks to Termux. Specifically we will install version 6.9.0 of NPM and version 12.3.1 of node, although perhaps when you read this post you will install a newer version. ...

May 31, 2019 · 3 min · 434 words · Parzibyte

How to install OpenCart 3 on Windows and Linux

In this tutorial I will show how to install OpenCart in its version 3 on a server with PHP. You can mount it directly on a server in production, or on your localhost for testing. ...

May 31, 2019 · 6 min · 1091 words · Parzibyte

How to install Apache and PHP 7 on Android with Termux

Install web server and process PHP files: build a LAMPP stack on Android This is not a post of those who use tricks to attract visitors, we are really going to install an Apache server on Android, configure it to process PHP files and finally write a Hello World: everything running from our mobile device. ...

April 28, 2019 · 6 min · 1082 words · Parzibyte

How to install MySQL (MariaDB) on Android with Termux

Install MySQL on Android Android mobile devices are not designed to be servers (although some of them are powerful), however it is always interesting to see how technology advances and day by day we can do more things with our phones. Today we will see how to install the MySQL or MariaDB server on Android, thanks to the Termux application. For that it is enough to execute a few simple commands and voila, we will have a MySQL database server in our Android; fully functional and ready to execute queries. If we want to put it for production, we can do it as long as we configure security. In short, we will not see more advanced topics; we will only see how to install mysql on Android. Here we will use MariaDB and MySQL as synonyms; that is, if you see that I say MariaDB do not get confused, I mean MySQL; and vice versa. I know that there are really more differences especially with the licenses, but that is another topic and you can search it in Google if you wish. ...

April 16, 2019 · 5 min · 972 words · Parzibyte

Configure Termux on Android (Linux in our pocket)

Install Termux on Android Today we will see how to install and configure Termux on Android, as well as a brief introduction to its use. Termux is an application that will allow us to have a terminal on our device, but apart from that it gives us the possibility of installing very interesting packages; and if we configure them well and install well, we can have a complete and stable server on our mobile. This application does not require root access, you only need that our Android phone has a recent version (I think it works from Android 6). ...

April 15, 2019 · 3 min · 485 words · Parzibyte

C: convert string to lowercase and uppercase

Introduction Today we will see how to convert a string in C to uppercase. We will also see how to convert a string to lowercase. That is, to convert something like “Hello World” to “hello world”. Or something like “Good night” to “GOOD NIGHT”. For this we will use some functions that the standard library has: tolower and toupper. ...

April 2, 2019 · 2 min · 422 words · Parzibyte

How to install and configure Python 3 and pip on Windows 10

Introduction In this post we will see how to install and configure the Python interpreter in its version 3 on Windows 10 (works even for 7, 8 and 8.1). At the end we will be able to execute scripts and also to install third-party libraries using pip; which will make things easier for us. ...

April 2, 2019 · 3 min · 467 words · Parzibyte