Category: Software Development
-
Filtering WordPress menu items
Recently I had a request come in to update the navigation on a WordPress site. The way the request was worded made me think the change to the menu needed to happen on one specific page, and not across the entire site. This created an interesting problem, as the theme…
-
Time zone conversion with PHP
I do not like time zones. They’ve been a fairly regular pain point in my career, especially early on. There was even a time when I built something and totally forgot that time zones existed and well, it was a mess. For the most part, time zones don’t cause me…
-
Schedule queries with MySQL
While researching the most performant way to delete a high volume of rows in MySQL, I happened upon some syntax that I had never heard of before. This syntax allows you to run a query on a schedule, without the need of any external code. As a rule of thumb,…
-
Fastify not working in Docker
I’ve been using Express since it’s inception and while I’ve never really had any issues with it, I’m also always up for messing around with something new. That something new (to me at least) is Fastify. A recent project of mine included building an extremely lightweight API to power some…
-
Horizontal and vertical alignment with Scriptable
While I am a huge fan of widgets on iOS, most apps miss the mark in terms of what they offer via their widgets. Because I’m not one to settle, I have been on a quest to build my own widgets so that I can get exactly what I desire….
-
git error: path is unmerged
While attempting to update my dotfiles locally on my MacBook Pro, I ran into a bit of a dilemma with one of my files that I had edited but never committed. Not a big deal, I can just run git stash and apply the changes again later. No such luck…
-
Convert a buffer to a string in Node.js
Buffers are powerful stuff. They make it easy to work with raw binary data, and streaming data can leverage them. Many third-party Node.js dependencies leverage buffers in one way or another, especially libraries dealing with data transport. So what the heck are we supposed to do with a Buffer when…
-
Generating UUIDs with MySQL
Universally unique identifiers (UUID) are one of my favorite things. They are easy to generate, without collision, and they make it easy to expose an identifier to end users without it being so obviously guessable, like an automatically incrementing integer value. While they are fantastic, the ability to generate one…
-
Using variables in MySQL queries
Variables. One of the cornerstones of most, if not all, programming languages. They save you time by not having to type the same crap over and over. They can be manipulated for your own gain. They can even be used in your MySQL queries. The declaration syntax for variables in…
-
Incrementing and decrementing numbers in Vim
I live on the command-line, and a huge chunk of that time is spent in Vim. Well, Neovim, actually. I do everything from writing code, to writing for my blog, as well as other prose that I have in the works. One thing that comes up pretty regularly, thanks to…