Category: Development
-
How to expand tilde in bash script
When I was working on a recent bash script, I was irritated when I wasn’t getting output to my desktop. After a while, I figured out that quoted tildes are not automatically expanded. From that link: If a word begins with an unquoted tilde character (‘~’), all of the characters up to the first unquoted…
-
Git checkout non-origin remote pull request
I don’t often review pull requests that come from non-origin remotes. This is largely because Automattic tends to create pull requests in the root repository. So, when I reviewed a pull request from an open source contributor today, I found myself wandering if there was a simple way to checkout the pull request locally for…
-
Recording completed tasks with Alfred
At Automattic, many teams have a process where they post weekly, or biweekly, updates. One of the things that I’ve often found difficult, as I write my personal update, is remembering all of the little things that I did for the past week. Sure, since I work on the computer, there’s usually some paper trail…
-
Install Unison 2.48.4 on Mac OS X with Homebrew
I use Unison to sync code between my local machine and my dev servers. To sync between two servers, it requires that the same version of Unison be installed on both servers. Now, this isn’t usually a big deal, because once you get Unison set up, it’s set up. But, I usually get a bit…
-
Recursively cast to array in PHP
I recently ran into an issue where JSON encoding some objects in my code wasn’t working properly. After experimenting, I realized that casting everything to an array before JSON encoding magically fixed things. Casting an object to an array is simple enough: But, what happens when an object or array contains references to other objects…