Momentjs Date Mutation

March 14, 2019

If you’ve ever had to work with a lot of date logic in javascript you’ve likely used or at least seen Momentjs. It can be convenient for moving dates to other timezones or date math. I ran into another today I learned moment trying to write some tests in Jest while using moment to handle dates in test setup and fixtures. ... Read more

Ruby 2.6 Endless Range

March 8, 2019

For a today I learned moment I ran into the new endless range feature in ruby 2.6 by coming across some code that triggered this error message: RangeError (cannot get the last element of endless range) The code that was updated to the latest ruby 2.6 release had a dynamic range that was pulling fields from a database and doing something like this: ... Read more

Terraform Conditionals

June 17, 2018

Terraform is a very versatile tool to help automate your infrastructure and codify your infrastructure as code. With a large open source community and tons of providers across multiple cloud platforms it allows developers to create plans for spinning up infrastructure effortlessly. One thing I ran into that needed a little more effort was adding conditional steps to a configuration plan. Due to the complex nature of Terraform and how it attempts to plan out how it will execute your configuration it is a little more involved to get conditionals working. ... Read more

Switching From Bash To Fish

May 22, 2018

I recently went through a painless transition from years of bash to fish shell in one evening. My bash setup has been stale for quite some time. I am mainly working in a bash terminal on a Mac and various Linux distributions. Bash, for me, has always been a bit of a mess to sort out the quirks of writing up scripts, loading in profile and configuration, and customizing the shell prompt. I had always put up with the quirks up until the other day when I decided to take the dive into Fish Shell. ... Read more

AWS with STS for MFA Required Access

May 2, 2018

If you are using AWS for anything, and security is on top of your mind, you may have run into some friction using the AWS services programatically. May companies require MFA to be set up just to access the AWS console. Some go even further by adding the constraint of requiring a group, or all users, to use MFA for programatic access to their account. If you have ever been put into this situation and tried to use the AWS APIs you know how it can become a burden to now do the things you are used to doing from simple CLI calls. ... Read more

Appreciations In The Workplace

April 28, 2018

Appreciations are something we likely overlook on a day to day basis. Given enough time and thought to introspect on things in our lives like relationships, work, family, or hobbies we can quickly start to think of all the things we can, and should, give appreciation for. This can translate well into engineering teams that work closely together with each other. ... Read more

Go Hugo SEO

November 26, 2015

Hugo is a static site generator that has caught on for its simplicity and the fact it is built in Go. You can run it as a server or build the static site to host somewhere. If you are using Hugo to build a full site or just a blog you will most likely want to have some dynamic page setup for SEO or analytics. Luckily this is easy enough to do with Hugo. ... Read more

Custom Vagrant Cloud Versioned Box Host

January 31, 2015

With the recent addition of Atlas to the Hashicorp arsenal, Vagrant got an update to be integrated into Atlas for hosting your VM boxes and handling versioned updates. If you are still looking to have your boxes versioned and are hosting them yourself, or your company has them private, you can still achieve versioning your boxes with the latest Vagrant (1.7.2) and some manual work. ... Read more

mtchavez All rights reserved.