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: Install the sftp-cloudfs tool. You can download the tool from GitHub and install it following the instructions provided. Configure the SFTP client with your Rackspace Cloud Files … Read more

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: curl -H “Host: customhost.com” https://example.com This is useful when testing or accessing websites that have multiple domain names pointing to the same IP address. The host header allows the server to determine which domain name … Read more

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: # pmap PID Replace PID with the process ID of the … Read more

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: Classic for loop: for i := 0; i < 10; i++ { fmt.Println(i) } This loop will start from 0, continue until i is less than 10, and increment i by 1 on … Read more

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: add_filter(‘the_excerpt’, ‘do_shortcode’); This code adds a filter to the the_excerpt function, which runs the do_shortcode function on the excerpt before it is displayed. The do_shortcode … Read more