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 […]
Add Script to WP Site Head
To be added to theme’s functions.php For things like Google Analytics, etc…
Go look at this, read it! It is so worth the click. If for some reason that link doesn’t work, you can try this or this, but please try the above one first since it is (as best I can tell) the original source.
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 […]
Prerequisites: SSH access to WordPress host server WP-CLI installed on server src
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 […]
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.
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 […]
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 […]
Multi-Currency MasterCard
The Short Version I use a card from a company called TransferWise (now just called “Wise”), I’m very happy with it. I use its app to load USD on to it from my bank account, and then in the same app I can convert between currencies at the best overall rate I’ve been able to […]