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
travel

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 […]

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
learning

Git Merge vs Rebase

I wanted to better understand these git procedures, so this project’s aim was to help me understand the differences and advantages of using git rebase or git merge. I invented a fake project, and made commits, merges, and rebases as a simple mock of a potential portion of an actual project’s git repo. The end result repos and […]

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 […]