Debian 7 Wheezy: Install Flash Player

Adobe Flash Player is not included in Debian 7 Wheezy by default, but you can install it manually. Here’s how: Download the latest version of the Flash Player plugin for Linux from the Adobe website: https://get.adobe.com/flashplayer/ Extract the downloaded archive and navigate to the extracted folder in the terminal. Install the package using the following … Read more

Mac OS X: Install GCC Compiler with Xcode

GCC (GNU Compiler Collection) is not included in Mac OS X by default, but you can install it using Xcode. Here’s how: Install Xcode: You can download Xcode from the Mac App Store or from the Apple Developer website. Open Xcode and go to “Preferences.” Go to the “Downloads” tab and select “Command Line Tools.” … Read more

CentOS / RHEL: Check If A Service Is Running Or Not

On CentOS/RHEL, you can use the systemctl command to check if a service is running or not. Example:   systemctl is-active <service-name>.service Replace <service-name> with the actual name of the service you want to check. The .service extension is necessary to specify that it is a system service. The systemctl is-active command returns “active” if … Read more

Linux: Find Out Directory Size Command

You can use the du command in a terminal to find the size of a directory in Linux. Example:   du -sh /path/to/directory The -s flag summarizes the directory size, and -h displays the output in a “human-readable” format (i.e., in GB or MB, instead of blocks). Replace /path/to/directory with the actual path to the … Read more

Awk Floating Point Number Addition Results Are Unexpected

When working with floating-point numbers in awk, unexpected results may occur due to the limitations of floating-point arithmetic. Floating-point numbers are stored in a binary format, which can cause inaccuracies in arithmetic operations, especially when adding or subtracting large or small numbers. Here are some tips to avoid unexpected results when working with floating-point numbers … Read more

Nginx Redirect Mobile / Smart Phone Traffic To Mobile Version Of the Web Site

To redirect mobile/smartphone traffic to the mobile version of a website using Nginx, you can use the if directive in your Nginx configuration file. Here’s an example configuration that redirects all mobile devices to a separate URL: server { listen 80; server_name example.com; root /var/www/example.com; if ($http_user_agent ~* ‘(iPhone|iPod|blackberry|android.*mobile|windows.*phone)’) { return 302 http://m.example.com$request_uri; } # … Read more