Home » Articles by: Stefan Durand

LibreNMS: What is it and how does it work?

LibreNMS gUIDE

This article covers the LibreNMS network monitoring tool, from installation and configuration to features and usage. Introduction to LibreNMS LibreNMS is a powerful open-source network monitoring solution that can be used to monitor devices and services on your network. It offers a wide range of features, including support for a variety of protocols, performance monitoring, alerts, and more. LibreNMS is easy to install and configure, and it can be used on a variety of platforms. In this guide, we will cover the basics of LibreNMS, … Read more

Home » Articles by: Stefan Durand

How to Install and Use Netstat on Linux (CentOS/RHEL, Debian/Ubuntu, OpenSuse & Arch Linux)

How to Install and Use Netstat on Linux

This article provides a tutorial on how to install and use Netstat, a command-line network tool, on Linux. Netstat is a command-line utility that can be used to view network connections, routing tables, and a variety of other network-related information on Linux systems. While Netstat is typically used to troubleshoot network issues, it can also be used for tasks such as monitoring server traffic or checking which ports are open on a system. Why Use Netstat? Netstat is a network monitoring tool that can be … Read more

Home » Articles by: Stefan Durand

Refresh or Redirect a Page using PHP, With Examples

PHP Refresh Page

This article will show you how to refresh a web page in the browser using the PHP programming language. It’s sometimes necessary to set a page to reload automatically, usually at some interval, to keep the page updated with changing information. For example, you may have a scoreboard application that is displayed in a web browser on a projector and wish to have it periodically refresh to keep the displayed scores up to date with those stored. Periodic refreshing is also used to redirect to … Read more

Categories PHP

Home » Articles by: Stefan Durand

Check Python Version (Windows, Linux & macOS)

Check Python Version (Windows, Linux & macOS)

This tutorial explains how to check the version of Python that is installed on your system. The commands work on Windows, Linux & macOS, and with Python2 or Python3. Python is an incredibly popular and powerful programming language worldwide for everything from website development, content aggregation tools, link shortening, and writing scripts, to data analysis, virtual assistants, and machine learning. There are various versions available with different release dates, so how do you know which version is running on your machine? Here’s a quick guide … Read more

Home » Articles by: Stefan Durand

How to Get the Length of a List in Python

How to get the length of a list in Python

This tutorial will teach you how to find the length of a list (array) in Python using some code examples. There are four data structures built into Python: tuples, sets, dictionaries, and lists. They are important for programmers because they allow for iteration over their contents. When we talk about data structures such as lists in Python, we are referring to a collection data type. Lists in Python can be ordered and changed. Also, unlike the sets collection type, a list allows for duplicated entries, … Read more

Home » Articles by: Stefan Durand

How to Reverse a List in Python

How to Reverse a List in Python

Even outside of programming, people perform list reversal regularly, for example, to re-order eBay items from high to low then low to high. It is a handy operation, and Python provides several ways to accomplish it. Method 1: Using the built-in reverse() function This method has the advantage of being simple and easy to understand when using someone else’s code. For example, if we have stored our list in “staffNames”: staffNames = [“Abigail”, “Chris”, “Denise”, “Fred”] staffNames.reverse() When executed, this method doesn’t automatically give a … Read more

Home » Articles by: Stefan Durand

FAQ: How to disable/remap a keyboard key in Linux?

disable remap a keyboard key in Linux

Q: How can I disable one or several keys on my laptop keyboard in Linux? When I press the DELETE key, it gets stuck and deletes everything 🙂

A: No problem! You can use the following command to remap or disable any key of your keyboard:

xmodmap -e 'keycode <value>=<action>'

For example, you could run the following command to disable your DELETE key:

xmodmap -e 'keycode 107='

How to get the correct keycode

You can get the keycode that corresponds to a specific keyboard button in one of two ways.

The first method is by using the simple command xev. xev opens a window and then monitors “events” such as keystrokes. It is suitable when you are running a GUI.

xev

The second method, which can be run with only the console, is showkey. This command will monitor for keystrokes for 10 seconds, or until a SIGTERM signal is received.

List of all keycodes

The full list of available keycodes and actions assigned to them on UK keyboard is below…

Read more

Home » Articles by: Stefan Durand

Linux cp Command: How to Copy Files and Directories

Linux cp command How to copy files and directories

In this tutorial, we explain how to use the cp command in Linux to copy files or directories. Examples are included below. Linux is one of the most popular Operating Systems on the planet and is the basis for all Android devices. It is open-source and has some clear advantages over other systems such as Windows or macOS. Within Linux, there are a considerable number of different commands that programmers use regularly. What is the cp command? The copy (cp) command is one of the … Read more

Home » Articles by: Stefan Durand

How to Make Multiline Comments in Python

How to make multi line comments in Python

In this tutorial, we explain the two methods used to make multiline comments in Python, with examples. There are some drawbacks to one of the methods, so pay attention. Code without comments is like a story written in a language you only half understand. You might be able to figure out the main points, but you’ll miss some nuances and it would be way easier with a translation alongside it. Most coders hate code with no comments or limited comments, so finding ways to clearly … Read more

Home » Articles by: Stefan Durand

How to Save a File and Quit in Vim/Vi

How to Save a File and Quit in Vim Vi

In this guide, we explain how to save a file and quit/exit in Vim, how to save a file without exiting, and how to quit/exit without saving. Vim (Vi IMproved) is an open-source text editor for Unix or Linux. It’s used to write and edit text, either in the command line interface or independently through a GUI. It’s a great tool and like any software tool, one of the first things to learn about it is how to safely exit without losing all of your … Read more