• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)

I Want to Get a Cow and Name it Jagger

Last updated on January 15, 2023 by Sal Ferrarello

I want to get a cow and name it Jagger. Then I’m going to walk around mooing and when people ask me what I’m doing…

Filed Under: Funny Tagged With: original joke

Automatically Switch Node Version in Zsh from package.json

Last updated on January 12, 2023 by Sal Ferrarello

Add this code to $HOME/.zshrc to automatically set the node version to match the version in package.json.

Filed Under: Computing, Dev Tips, Programming, Solution Tagged With: command line, jq, node, nvm, zsh

Getting Started with LuaSnip

Last updated on November 23, 2022 by Sal Ferrarello

This article assumes you are using Neovim (version 0.8.0 or higher) and packer.nvim to manage your plugins. Adding the following loads the LuaSnip plugin, creates a snippet for “func”, and maps “Ctrl + p” to expand the snippet and jump through the fields.

Filed Under: Computing, Dev Tips, Programming, Solution Tagged With: lua, neovim, vim, vimplugin

Git autoSetupRemote Prevents “no tracking information” Error

Last updated on November 14, 2022 by Sal Ferrarello

After creating a pushing a new branch to GitHub (or any remote), when I do “git pull” I often get an error that says “There is no tracking information for the current branch”. The Git config value “autoSetupRemote”, introduced in Git version 2.38, lets us avoid this entirely error.

Filed Under: Computing, Dev Tips, Recommendations Tagged With: Git, gitconfig

vim.keymap.set() coc to confirm completion with lua

Last updated on November 13, 2022 by Sal Ferrarello

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 () to confirm completion. The coc.nvim wiki has an entry to Use to confirm completion however their solution is in Vimscript.

Filed Under: Computing, Dev Tips, Programming, Solution Tagged With: lua, neovim, vim

Beginner Mastodon Intro

Last updated on November 7, 2022 by Sal Ferrarello

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.

Filed Under: Computing Tagged With: Mastodon

Moving to a Different Mastodon Server

Last updated on November 6, 2022 by Sal Ferrarello

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.

Filed Under: Computing, Solution Tagged With: Mastodon

trailingslashit() vs untrailingslashit()

Last updated on November 1, 2022 by Sal Ferrarello

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.

Filed Under: Computing, Dev Tips, Programming Tagged With: PHP, WordPress, WordPress Plugin

Compare composer.json on Two Different Git Branches

Last updated on October 25, 2022 by Sal Ferrarello

I have composer.json files on two different branches and I want to compare their (non-dev) dependencies. This is the command I run to compare the “require” section of composer.json on my current branch to the “require” section of composer.json on another branch.

Filed Under: Dev Tips, Solution Tagged With: composer, Git, jq

HP Laserjet 1020 Printer on a Mac

Last updated on October 16, 2022 by Sal Ferrarello

My HP Laserjet 1020 printer no longer has supported drivers for my Mac. Here are the drivers and settings I used instead.

Filed Under: Computing Tagged With: mac

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 39
  • Next Page»

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in