I wanted to programmatically retrieve the title of a Jira issue in a script I was working on. These are my notes on how I did it.
One of my frustrations with the Alfred App is when I create a custom workflow to paste a string into the current application the old clipboard value is overridden with the new string. What I want is to paste the string in the currently active app, without replacing the content in the clipboard.
I recently had to convert some markdown into plaintext and rather than use an online tool I wanted to do it locally. This is the solution I found.
By default Git displays tags in alphabetical order, but we can configure Git to sort tags by their version numbers.
Sometimes when I run a command like “git checkout chore/fix-typo”, I get an error message like “fatal: ‘chore/fix-typo’ matched multiple (2) remote tracking branches”. We can configure Git to avoid this error by defaulting to the “origin” remote.
I wanted to write a shell alias to get the Git status of a specific directory (~/code/projectx). How could I change directories without polluting the previous directory? (so ‘cd -‘ still works as it did before I ran my alias)
When I kick off a long running process on a project (e.g. “npm install”) and I shift my focus somewhere else, I often get absorbed in my other task and don’t return to the original process as soon as I wanted to. I’ve addressed this in the past by setting a timer to remind me to come back and check. More recently, I’ve started adding a audio notification to tell me when the task is completed.
Sometimes I need the full Composer dependency name but I only know part of it. For example, I may know Block X-ray Attributes is a Composer dependency but I don’t remember the full package name. While I could open the composer.json file and find the dependency, I can also leverage jq to do the work for me.
When creating a new user on WordPress multisite there is a “Skip Confirmation Email” checkbox that is unchecked by default. This unchecked box results in a user being added to a temporary “signups list” when they are added to the site. The user is not fully added to the site until they complete the confirmation steps in the email they receive. For many sites, it is preferable to check this “Skip Confirmation Email” when adding a user. With some code you can set this checkbox to default to checked.
The sidebar gets a lot of use in the WordPress Block Editor, a.k.a. Gutenberg, but I found myself in a situation where I needed to programmatically close the sidebar and then re-open it later. This is how I did it.