Guides
How website valuation actually works, what traffic estimates can and cannot tell you, and which once-standard metrics have quietly stopped existing.
How To Check Swap Usage Size and Utilization in Linux
To check the swap usage size and utilization in Linux, you can use the free command with the -h option to display the output in human-readable format. n n n free -h n n n The output will show the total amount of swap memory, used swap memory, and free swap memory, as well as other information about
Debian / Ubuntu: Fatal error: Python.h: No such file or Directory
The error "Fatal error: Python.h: No such file or directory" usually occurs when you're trying to build a Python extension or module and the required header files are not present on the system. To resolve this issue, you need to install the development files for Python. On Debian-based systems li
Debian / Ubuntu: Find Information ( Description ) About Installed Packages
To find information about installed packages on a Debian-based system such as Ubuntu, you can use the apt-cache command. For example, to find information about the python3 package, you can run the following command:rn rn rn apt - cache show python3rn rn rnThis will display detailed information about
wget Command: Download Compressed File By Sending gzip Headers
To download a compressed file using wget and send the gzip headers, you can use the following command:rn rn rn wget --header= 'Accept-Encoding: gzip' <URL>rn rn rnReplace <URL> with the URL of the file you want to download. The --header option allows you to specify an HTTP header to be s
Nginx Redirect (Rewrite) Old Domain To New Domain With HTTP 301
To redirect an old domain to a new domain using an HTTP 301 redirect in Nginx, you can add the following code to your Nginx configuration file:rn rn rn server {rn listen 80 ;rn server_name olddomain.com;rn return 301 $scheme ://newdomain .com $request_uri ;rn}rn rn rnThis code will redirect all traf
Linux: Install pip Client To Install Python Packages
To install the pip client on Linux, you can use the package manager for your distribution. Here are the commands for some popular distributions: For Debian/Ubuntu:rn rn rn sudo apt- get install python-piprn rn rnFor Fedora:rn rn rn sudo dnf install python-piprn rn rnFor CentOS/RHEL:rn rn rn sudo
Linux / Unix ssh-keygen: Create A Host Key File
The ssh-keygen command is used to create SSH keys, which are used to authenticate an SSH client to an SSH server. To create a host key file, you can use the ssh-keygen command with the -t option to specify the type of key you want to generate and the -f option to specify the output file name. Her
Rackspace Cloud Files: Upload Files Using Linux / Unix FTP Command
Rackspace Cloud Files can be accessed using FTP (File Transfer Protocol). Here are the steps to upload files using the FTP command on Linux/Unix: n n Install the ftp command line client if it is not already installed. You can install it using your operating system’s package manager. n Connect
Python pip: Upgrade Packages Command Under Unix or Linux
To upgrade a package using pip , you can use the pip install command with the --upgrade or -U option. For example, to upgrade the requests package: n n pip install --upgrade requests n n n You can also upgrade all packages to their latest version by using the following command: n n n pip freeze -- l
Rackspace Cloud Files: Upload Files Using Secure FTP (SFTP) Client [ sftp-cloudfs ]
Rackspace Cloud Files supports uploading files using SFTP (Secure FTP) through a tool called sftp-cloudfs . Here are the steps to upload files to Rackspace Cloud Files using SFTP: n n Install the sftp-cloudfs tool. You can download the tool from GitHub and install it following the instructions provi
Linux / Unix: curl Command Pass Host Headers
The curl command can pass custom host headers using the -H option. For example, to pass a custom host header:rn rn rn curl -H "Host: customhost.com" https : //example.com rn rn rnThis is useful when testing or accessing websites that have multiple domain names pointing to the same IP address. The ho
HowTo: Speedup ping and traceroute Command Responses under Linux / Unix
The speed of the ping and traceroute commands can be affected by a number of factors, including network congestion, distance to the target host, and routing issues. However, you can try the following methods to speed up their responses:rn rn Decrease the number of packets sent by using the -c option
Linux View Process Address Space
You can view the address space of a process in Linux using the pmap command. pmap is a tool that shows the memory usage of each process and its shared libraries, mapping information and the stack. Here's an example of how to use pmap :rn rn rn # pmap PID rn rn rnReplace PID with the process ID of
Go Language for Loop Examples
Go provides several ways to perform looping, including the for loop. Here are some examples of using the for loop in Go:rn rn Classic for loop: rn rn rn rn for i := 0 ; i < 10 ; i ++ {rn fmt .Println ( i )rn}rn rn rnThis loop will start from 0, continue until i is less than 10, and increment i by
WordPress Add Shortcodes To Excerpts
By default, WordPress does not allow shortcodes to be executed in excerpts. To enable shortcodes in WordPress excerpts, you need to add the following code to your theme's functions.php file:rn rn rn add_filter( 'the_excerpt' , 'do_shortcode' );rn rn rnThis code adds a filter to the the_excerpt funct
FreeBSD Allow Normal Users To Mount CDROMs/DVDs/USB Devices
In FreeBSD, you can allow normal users to mount CDROMs, DVDs, and USB devices by adding them to the operator group. The operator group is automatically granted the ability to mount removable devices. To add a user to the operator group, use the pw utility as follows:rn rn rn sudo pw groupmod oper
Bash Check If Shell Is Interactive or Not Under Linux / Unix Oses
You can check if the shell is interactive or not by checking the value of the -o option of the PS1 environment variable:rn rn rn if ; then rn echo "Interactive shell" rn else rn echo "Not an interactive shell" rn fi rn rn rnIn this example, "${-#*i}" expands to the value of the $- variable with the
HowTo: Nginx Webserver Send Charset utf-8 Under Unix / Linux
To send the charset utf-8 with Nginx web server under Unix / Linux, you need to add the following code to your Nginx configuration file:rn rn rn http {rn # ... rn add_header 'Content-Type' 'text/html; charset=UTF-8' ;rn # ... rn}rn rn rnYou can add this code inside the http block of your Nginx confi
PHP: Disable APC Module At Command Line CLI Scripts / Cron Scripts
To disable the APC (Alternative PHP Cache) module in PHP command line scripts or cron scripts, you need to add the following code at the beginning of your script:rn rn rn <?php rn ini_set ( 'apc.enabled' , 0 );rn // rest of your script here rn ?> rn rn rnThis sets the apc.enabled configuration
4 Linux Commands To View Page Faults Statistics
Here are four Linux commands to view page fault statistics:rn rn vmstat - This is a versatile command that provides information on system resource utilization, including page faults. The vmstat command reports the number of page faults in the "faults" column. rn rn rn rn vmstatrnprocs --------- --me
2,685 guides published.
