Categories
guides troubleshooting

Too Many Redirects error on WordPress Site

Yesterday, a site I was helping with had an issue where requests were erroring out with a browser message saying there were too many redirects or an infinite redirect loop. The site had been working for months, and no one could recall making any changes to the site since the last known working state. The […]

Categories
guides

Add Script to WP Site Head

To be added to theme’s functions.php For things like Google Analytics, etc…

Categories
guides

Viewing Ruby Object/Hash Contents

I don’t know what I’m doing, so lots of times, I am working with a Ruby variable that I don’t know the contents of, and when I try to just output it to my webpage, I just get something like #<Variable:0x123abc1don7kn0w> – I’ve found these two methods of viewing the variable contents, depending on if […]

Categories
guides

Create new WP Admin from Command Line (WP-CLI)

Prerequisites: SSH access to WordPress host server WP-CLI installed on server src

Categories
guides

Less.css: Escape a Less function in favor of CSS3 function

When trying to use a CSS3 function (like min(), calc(), etc) inside a Less (.less) file, you need to escape the native Less function if it has the same name as a CSS function. You can do this using by putting the CSS function in quotes, and prepending that with a ~. Example using CSS […]

Categories
guides

Webpage Auto-Scrolls Down on Load

I was working on a webpage, and it was auto-scrolling to the bottom of the page. I thought it was maybe because my <main role=”main”> element was further down, but was unable to reproduce the issue in testing elsewhere. Turned out, I had a form input at the bottom of the page set to autofocus.

Categories
guides

Count Files in Folder (including Subfolders)

To count the number of files in a folder (including its subfolders, pipe the output of a find command to the wc (word count) command. The -type f switch on find tells it to only find files. The output of this is one file per line. The -l switch on wc tells it to count […]

Categories
guides

Turn on SSH for GoDaddy Hosting

I had already gone in to cPanel, added my SSH key, and authorized it, but when attempting to use it, I got the error: Turns out there is a site wide switch to enable shell access as well as authorizing keys inside cPanel. This toggle (shown above) can be found by: Click your username in […]

Categories
guides

Sync Files to Backblaze B2

To sync a local folder to a B2 bucket using filesize as the comparison to more accurately ensure sync (until hash is supported) (source)

Categories
guides

TAR Guide

To Compress: note: tar stores path relative to foldername above, best to run command from parent folder. Consider sudo to ensure permissions to all files intended for compression. To Compress Excluding Folder: –exclude=’path/to/folder’ excludes folder, must follow tar command before source/dest or other options, exclude multiple folders by repeating –exclude option with new folder value […]