I’m currently rewriting my Neovim configuration using lua rather than using vimscript. I’m using the coc.nvim plugin and want to map return (
Computing
vim.keymap.set() coc
Beginner Mastodon Intro
As a Mastodon beginner I wanted to document what I’ve learned while everything is still new and fresh to me. You can find me on Mastodon at phpc.social/@salcode.
Moving to a Different Mastodon Server
When I first signed up for Mastodon, I created my account salcode on https://mastodon.social/. Eventually I decided I wanted to be on a smaller server, specifically https://phpc.social/. These are my notes on how I made this move.
trailingslashit() vs untrailingslashit()
WordPress has two functions that can be helpful when dealing with the final character of a URL, trailingslashit() and untrailingslashit(). I find it preferable to use untrailingslashit() for two reasons: 1. It does not break empty checks and 2. It makes my sprintf() statements more readable.
HP Laserjet 1020 Printer on a Mac
My HP Laserjet 1020 printer no longer has supported drivers for my Mac. Here are the drivers and settings I used instead.
How to Disable beforeunload Event Listeners
I was doing some troubleshooting and wanted to disable the “beforeunload” event listeners on a page. This is how I accomplished it with the Chrome browser.
Revert Merge Commit
Typically a Git commit has exactly one parent, however a Git merge commit has two parents. The problem this creates with Git revert, is it is unclear which commit we want to revert to.
Always Bring Your Pull Requests Up to Date
A Pull Request (PR) should always be up to date with the branch into which it is being merged. Another way of saying this is you should be able to merge your PR as a fast-forward merge (even if you decide not to do a fast-forward merge). In this post we’ll look at how a safe looking PR that is out of date can be catastrophic to merge.
Quickly Delete Large Directory from the Command line
When deleting a large directory from the command line, it can take a frustratingly long time for the task to complete. This is a trick I use to speed things up.
git reset –hard vs git checkout -f
I recently had a conversation about “git reset –hard” vs “git checkout -f”, and it turns out they do the same thing. This is one of the tricky things about Git, there are often multiple ways to do the same thing.