When working with Git on the command line, I spend a lot of time switching back and forth between two branches. Even with Git tab completion, it is a lot of typing. However Git has a shortcut for the previous branch, a single dash (-).
Computing
Git Commit Message Editor
By default Vim is the editor used when writing a Git commit message. While I love Vim, it does work very differently than most other editors. A good option for those who are not comfortable with Vim, is to use a different editor. This is how to setup Git to use a different editor.
Vim, tmux, iTerm broken colors
I do most of my work in Vim (or Neovim) in tmux inside of iTerm on my Mac. I found my color schemes were being properly applied in Neovim but not in Vim (version 8). Adding two lines to my .vimrc corrected the problem for me.
Git Interactive Rebase Order is Wrong
The interactive rebase feature of Git is one of my favorites. I love being able to squash multiple commits into one commit or re-order my commits for clarity. My one complaint is the Git interactive rebase commit order is wrong (at least for the way my brain works).
SSH after Mac OS X Update
I recently updated my copy of OS X to Mojave and I’m now having trouble with SSH. (I jumped a few versions but based on other posts it looks like the change to MacOS Sierra specifically was part of the problem).
Git Delete Merged Branches
When using Git, sometimes (often) I find myself forgetting to delete local branches after merging them. This command deletes this branches (and I’ve included a Git alias to make it easy to use in the future).
Risk Dice Odds
I’ve been playing a lot of the Risk Boardgame with my two boys recently. The game involves rolling dice to determine the outcome of a battle. While it was always clear to me that the attacker has an advantage when attacking with three dice, I was curious about how great the advantage is so I wrote some JavaScript code to calculate the odds.
JavaScript Idle Detection
Recently, I needed to determine when a website visitor was idle for a certain amount of time. I thought this was an interesting problem and wanted to spend a little more time with JavaScript so I wrote some code for it.
WP-CLI move site locally
These are the steps I follow when I move the database for a website to my local computer using WP CLI.
Activity Monitor find App behind Process Name
When working on my Mac, sometimes I find a process in Activity Monitor and I want to know what application the process belongs to. I was introduced to this command to do just that.