recovering root password for debian 9

If you happen to forget the root password and you don’t have sudo configured, then don’t give up just yet and think about reinstalling the operating system again. There is a way to reset the root password. First reboot your computer. You should see the GRUB menu when your computer boots as shown in the screenshot below. Select Debian GNU/Linux and press e. You should see … Read more

FreePBX admin password reset

Check for the user of the web session data su that user Log into your FreePBX server via SSH as the root user, using a tool such as PuTTY on Windows, or Terminal on Mac. Next, bring up your FreePBX web interface in a web browser. Once the page has loaded, press Ctrl + A on your … Read more

30 python best practices

1. Use Python 3 In case you missed it: Python 2 is officially not supported as of January 1, 2020. This guide has a bunch of examples that only work in Python 3. If you’re still on Python 2.7, upgrade now. 2. Check for a minimum required Python version You can check for the Python version in your code, … Read more

Javascript Reduce function

Reduce Finally, we come to .reduce(), which, admittedly, is the most confusing of the three methods. The name of the method refers to reducing multiple values to one. However, I found that it’s easier to think of it as building up rather than reducing. The method works by defining a starting point. As the method iterates … Read more

Javascript Filter function

Filter On to the .filter() method, which is used when you want to extract a subset of values from the iterable. When using .filter(), remember that we are filtering in values, not filtering out. This means that each item in the iterable that evaluates true will be included in the filter. Let’s use an example of keeping only … Read more

Map function

Map The .map() method is used when you want to 1. perform a set of statements with every value in the iterable and 2. return the (presumably) modified value. Let’s use a simple example of calculating sales tax on an array of prices. const prices = [19.99, 4.95, 25, 3.50]; let new_prices = [];for(let i=0; i < … Read more

How to install or upgrade to PHP 7 on CentOS 7

Instructions The following guide will either upgrade your current PHP 5 to PHP 7 or will  install new PHP 7 on your CentOS system. Check your current PHP version ( if applicable ): # php –version PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) … Read more