Category: Software Development
-
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…
-
Docker Desktop won’t reopen on macOS
After months of waiting, I finally received the MacBook Pro that I had ordered back in February. Thus far, it’s been a solid machine with crazy battery life, but not without it’s quirks. One recent quirk was with Docker Desktop. I had the app open and I quit it instead…
-
How to convert JSON to CSV in JavaScript
Last week we discussed converting CSV to JSON in JavaScript. This week, we’re going to talk about going in the opposite direction, converting JSON back to CSV. Similar to last week, we’re going to use the immensely popular papaparse library. As it turns out, even though it’s touted as the…
-
How to convert CSV to JSON in JavaScript
Parsing CSV data isn’t as easy as splitting the string up into individual lines, then splitting it by the delimited (in this case commas). Some of the values may have quotes around them, sometimes the values themselves have line breaks. Then there’s the potential that the data itself is malformed….
-
Tracking daily active users (DAU) with Redis
Daily active users, also known as DAU, is the number of unique users that have interacted with a website or application in a given day. We’re going to discuss how to track this metric, in a language agnostic fashion. The concepts discussed and Redis commands utilized can be implemented in…
-
How to display a JavaScript array in HTML
From time to time, I see a search query that made it to my blog that piques my interest and inspires a post. This is one such post. How does one take an array (presumably in JavaScript) and display it in HTML? Now in this day in age, I would…
-
Splitting strings and keeping the separator in JavaScript
When splitting strings, the majority of the time, I don’t care about the separator (or delimiter), just the strings that exist between it. In JavaScript, that’s very simply with .split(): ‘one,two,three,four,five’.split(‘,’); Which will yield an array of strings like this: [‘one’, ‘two’, ‘three’, ‘four’, ‘five’] Great! But if we want…