Category: Software Development
-
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…
-
Showing differences of staged files with git
Something I don’t like about git, primarily because it doesn’t fit into my personal development workflow, is how git diff only applies to files that have not been staged to commit. Sure, it makes sense if you are the type to stage files locally on a regular basis without pushing…
-
Using paths to create hierarchies in Parameter Store
Parameter Store only supports a limited number of character for the parameter name. As per the error message you’re presented with, Only a mix of letters, numbers and the following 3 symbols .-_ are allowed. What that error fails to mention is that you can actually use a fourth symbol,…
-
Getting String and SecureString Parameter Store parameters with Node.js
Parameter Store has slowly become one of my favorite things about AWS. It makes it easy to share things between ECS tasks and services, and Lambdas. The parameters can be references inside of a CodeBuild buildspec file, and it’s all language agnostic, which is handy if you are running different…
-
husky: command not found with npm install –production
Recently, while attempting to build a Docker container, I ran into a bit of a dilemma. Upon running npm install –production I was greeted with this less than ideal error message: > @company/project-api@1.0.0 prepare > husky install sh: husky: command not found Well of course husky isn’t installed, as it’s…
-
Decrypting SecureString Parameter Store parameters with Node.js
Parameter Store, part of AWS Systems Manager gives you a quick and easy way to store parameters that you’d like to use in your applications. By selecting the SecureString type, you get the added bonus of encryption for you most secret parameters. By default, when you fetch a SecureString type…
-
Add column after another column in MySQL
By default, new columns are added to the end of a table in MySQL. This works well most of the time, but sometimes when you’re retrofitting a column into a table, you may want it to be adjacent columns closer to the start of the table. The ALTER statement makes…