Linux

Why Python Replaced Perl

Both Perl and Python are powerful scripting languages that are used extensively in software development, system administration, and data analysis. Here are some key differences between the two languages: In recent years, Python has become the preferred language for many tasks, particularly in the areas of data science, machine learning, and web development. This is… read more »

How to Write Bash Script with User Input

Here’s a Linux bash script that performs the following tasks: #!/bin/bash # Prompt user to enter directory path echo “Enter a directory path:” read directory # Check if directory exists and create it if not if [ ! -d “$directory” ]; then mkdir “$directory” echo “Directory created: $directory” fi # Prompt user to enter file… read more »

What are Varargs in Java and How to Use Them

In Java, varargs (variable-length arguments) are a feature that allows a method to accept an arbitrary number of arguments of the same type. The varargs feature was introduced in Java 5 and is denoted by an ellipsis … after the parameter type in the method signature. Here’s an example of a method that uses varargs:… read more »

Common Mistakes Which Leave a Linux Vulnerable

Securing a Linux system can be a complex task, and there are many potential pitfalls and mistakes that can compromise the system’s security. Here are some of the most common mistakes with examples: To improve the security of a Linux system, here are some best practices that you should follow: In summary, securing a Linux… read more »

When and How to Use Iptables and Ipsets

iptables and ipsets are both tools that are commonly used in Linux-based operating systems for managing network traffic. However, they serve different purposes and have different capabilities. iptables is a firewall tool that allows you to configure rules for filtering and manipulating network traffic. It uses a set of predefined chains (INPUT, OUTPUT, and FORWARD)… read more »

Java Performance on Linux vs Windows

Java is a cross-platform language, which means that Java applications can run on a variety of operating systems, including Linux and Windows. The performance of Java applications can depend on a variety of factors, including the specific implementation, the hardware and software environment, and the workload of the application. In general, Java applications tend to… read more »

Introduction to Tengine Web Server

Tengine seems to be a popular web server for Chinese websites. I’ve come upon it while browsing through Aliexpress and stumbling upon a 404 error: This error and more specifically its footer “Powered by Tengine” stirred up my interest and so I started looking for more information about this unknown to me web server. Here… read more »

Getting Started with Chef and Chef-solo

Chef (the systems integration framework) provides a standalone tool called chef-solo. With chef-solo you can run locally chef recipes without the need for a centralised server (Chef master). This is great for getting started with chef, testing recipes or when you just don’t want a centralised Chef master. In this article we’ll go through a… read more »

AppArmor Php-Fpm Configuration with ChangeHat

AppArmor is the default Mandatory Access Control module on Ubuntu, SuSE and other Linux distributions. Thanks to it, you can limit the filesystem access of a process. There are already some good howtos for getting a basic setup of Apparmor for Php-fpm. Though, in cases such as that of┬árunning multiple sites securely with Php-fpm, you… read more »

How to Install Azure Python Package

You can install Azure Python package either for Python 2 or Python 3 using pip (Python package index). Before you are able to install it though you have to: First, make sure pip is installed, of course. It’s available on most Linux distributions such as python-pip (for Python 2) or python3-pip (for Python 3). Second,… read more »

Sidebar