RSSAmplifier

Blog

Matt Gregg — Software Engineer — Journal

Personal website, portfolio, and journal by Matt Gregg.

codegregg.comRSS feed ↗29 posts

Latest posts

The instability of the modern workforce is killing us

We’ve been living inside this for years. The schedules that change week to week. The review meetings where the target moves every quarter. The sudden reorg. The layoff email. The hiring freeze that somehow still expects you to cover two departed coworkers’ jobs for the same salary. It’s not one bad company or one bad year. It’s a pattern. And companies of the future are eventually going to have to…

Why does management fear people who give a fuck?

Me: Why is it that management in companies fear those who give a fuck? ChatGPT: Short answer: because people who give a fuck are hard to control. Longer answer (from the inside of organizations): They expose bullshit Someone who cares notices contradictions, broken processes, wasted effort, and empty slogans. They ask why. That threatens fragile narratives like “everything’s fine” or “this is just…

Build Mode: Seven launches in one creative streak

Build Mode Seven things I shipped (and a couple I quietly made) Lately I’ve been in that particular kind of flow where ideas don’t wait for permission (you can check out my other post about that here ). Something sounds interesting, I open a repo, and a few hours later there’s a thing that didn’t exist before. Here’s the tour ↓ Project What it is Links Horizon Local-first long-term goal journal…

NAS Learnings: From Zettlab to UnRaid and necessary apps for your setup

The Self-Hosted Journey: What I Learned Building My Home NAS TL;DR: I backed the Zettlab 4-bay NAS and, while I’m a huge fan of their hardware and mission, I’ve found my stride using Docker containers for most tasks. If I were starting from scratch today, I’d likely build an UnRaid server on a gaming PC to consolidate my gaming and hosting into one machine. My Must-Have Apps: Jellyfin (Video…

Side projects

You know that feeling when you're lying in bed and an idea pops into your head? Maybe it's a tool that would make your life slightly easier, or a way to help people organize, or something that could bring people together. Before, those ideas would just rattle around in my brain until I forgot about them or they got pushed out by work priorities. When I was laid off from my position at Shopify in…

Navigating the Adderall Prescription Maze in 2024: A Monthly Adventure

Understanding Walgreens’ Adderall Refill Policy Ah, the intricacies of modern healthcare! If you've ever journeyed through the process of refilling your Adderall XR prescription, you know it’s not a straightforward task. Each month, as my supply dwindles, I brace for another round of challenges—think of it as a quest for a rare treasure rather than a simple chore. The Automated System Struggle…

Gatsby Dark Mode with Themes

Implementing Dark Mode in GatsbyJS 4.7 With the release of GatsbyJS 4.7, developers now have more tools and features at their disposal to create dynamic and responsive websites. One popular feature that can significantly enhance user experience is the ability to toggle between light and dark modes. This feature not only adds aesthetic appeal but also helps reduce eye strain and conserve battery…

Thoughts on Tesla Service: A Seamless User Experience

When you think of car servicing, you might conjure up images of cumbersome paperwork, long waiting times, and a general sense of inconvenience. However, my recent experience with Tesla's service has completely shattered this stereotype. From the convenience of home servicing to the incredible user experience with a loaner car, Tesla truly stands out in the automotive service industry. Home…

The problem with chronic illness

It is so difficult for people to comprehend chronic illness. I was in the cancer clinic today for a routine checkup but dislocated my ankle a week ago, so I have a big splint on my leg. A worker at the clinic walks by, looks at me with a smile, and says "ouch!", pointing at my leg. There are literally people extremely sick from cancer treatment ALL around me and this person points out my silly…

Easily Password Protect NextJS pages with Iron Session

Say you want to set up a simple password protected page (or a bunch of pages), just for yourself, in your NextJS application. It's super simple to do with an encrypted cookie and the help of a little library called iron-session , a Node.js stateless session utility. Most of the tutorials for this library focus on setting up user auth for multiple users which you may want to at some point but this…

Connect To fly.io Sqlite Production Database

Gonna give a quick how to for connecting to and getting your sqlite database from your production app on fly.io. It can be a bit confusing but once you get your ssh connection set up and openssh installed on your fly.io server, it's much easier to replicate. In this tutorial we will be connecting to your fly.io instance via wireguard and ssh, then insalling openssh on your instance so we can use…

Sorting One Array With Another in JavaScript

Recently I needed to sort one array I had no control of to show specific categories in a specific order. Any items in the array of categories that I had not specified in my order array I needed to go at the end of my list. No other order mattered. I solved this with a simple JS sort function with a little extra code for handling items not in the list. const categoriesArray = [ { category: 'stuff'…

Angular Dynamic Page Titles with Nested Routes

This is a quick demo of one way you can accomplish dynamic page titles in the html head tags with Angular. This should work in most recent versions of Angular (8+) but let me know on Twitter if it doesn't work or if there are better solutions to this problem. I found it semi-frustrating compared to how easy it is in Vue and React land. This crazy map and filter stuff is needed for nested route…

Apply Auto Setting to Multiple Photos in Lightroom CC

This is a relatively simple problem to solve but didn't see it posted elsewhere. After reading this tutorial you will know how to copy and paste any settings from one photo to many others in Adobe Lightroom CC (I'm currently on version 4.4). For this tutorial I will be using the "Auto" setting as an example but you can copy many different settings to other photos. The screenshots will be from my…

Destructure Optional Params in Typescript

Sometimes you have a function with an optional Object argument that you want to destructure in the function. Like so: interface SomeObject { option1: boolean; stuff: boolean; } function foo(param?: SomeObject) { const { stuff } = param; } However you'll get an error because param could be undefined and TS doesn't like you trying to destructure something that's undefined. There are a couple ways…

How to find a Database in 2021

I haven’t been around as long as some, but I’ve been around web development to remember the days where everyone had a cpanel and managed their own personal site on super cheap shared hosting. The days of clicking a few buttons and spinning up a new mysql database, maybe your hosting company even gave you ssh access to your shared environment and allowed you to create some of your own resources.…

Cancer Imposter Syndrome

I know we usually reference "imposter syndrome" when we talk about jobs and the fear that you might be exposed as a fraud who fooled their way into the position but I've been feeling a different kind of imposter syndrome these last 7 months. I've been undergoing treatments for Acute Myeloid Leukemia which I was diagnosed with in december. Technically the cancer was cleared out of my body in…

Automate Firebase 🔥 hosting with Github Actions

UPDATE 01/21/21: Using the firebase init command you can now automatically set up deployment from Github through the CLI and you shouldn't have to follow any of this tutorial. Try that first. It should set up an action for merge and one for PRs. This is a tutorial for quickly setting up a Github action to deploy a site to Firebase hosting. This would include sites built with Vue, React, Gatsby,…

How to generate a random ID in JavaScript

I'm sure this is posted in a ton of places already but I thought I would share a method I sometimes use to generate random strings of (numbers + letters) with javascript. This function returns the first 6 characters of a randomly generated string. Passing 36 to the toString method tells it to return numbers 0-9 and every letter in the alphabet, you can adjust the 6 in the substr method if you want…

Going Home (Almost) - day 28

Update: A weekend pathologist made a mistake and what they thought were leukemia blasts were really just new white blood cells. We did another bone marrow biopsy a week later and they found no leukemia whatsoever. So good news. We were actually able to go home a couple days after I wrote this. We were so close to being able to go home this week! So close! But alas, it was not to be. After the…

The Fight Against Leukemia Begins

Three weeks ago I found myself lying in a hospital bed after a full day in the ER, a blood transfusion dripping into one of my IVs, listening to a doctor tell me I have Acute Myeloid Leukemia. Just that morning I thought I was just getting over a bad case of the flu. I mean, I'm 28 years old. I'm healthy. I can't have cancer, can I? I really wasn't in a good state that night anyway, but even so,…

Conditional Vue Hash Router

Recently I built a Vue app for a client that existed inside an existing Wordpress site. The Vue app was responsible for handling a complex location search section of the site and handled routing for a search, results, favorites, and compare pages. But there was a problem. Even though I was creating the Vue app conditionally based on the existence of root divs on the page, the js bundle was being…

Webpack Image Loading

Sometimes you have to make a custom webpack config. Whether you're working on making a vue app inside a server rendered framework like wordpress or you just decided to roll your own, this might help you if you're having issues loading images into your components. My example will be with vue but the principal works with other front end libraries. This will assume you already have a webpack setup…

Gratinata Pasta Sauce

prep time: 20min / cooking time: 10min This amazingly delicious pasta sauce is perfect for baked pasta dishes with shrimp or chicken or pretty much any other pasta dish. Ingredients 3 Tbs butter 2 Tbs minced garlic 3 Tbs (or more) marsala wine 2 C heavy cream 1 C grated parmesan cheese 1/2 C milk 1/2 C chicken broth 1 Tbs cornstarch 1 Tbs Grey Poupon dijon mustard 2 tsp minced fresh rosemary 1/2…

Netlify Dev + Serverless Functions + Mailchimp Subscribe Form Tutorial

You've probably heard about Netlify , the amazing static host that literally makes everything about static website hosting feel like a walk on the beach. They've brought us automatic PR branch deploys, server-side analytics , form submissions without a server or even serverless function, and even identity management. I do not work for Netlify but I would rarely choose to use any other service for…

Why don't we talk to users?

Have you ever been in a meeting with a stakeholder and you or someone else suggests interviewing users or looking at user feedback in order to guide the roadmap and been shot down? I have. I’ve often wondered what causes large group meetings to end in the highest-paid person in the room’s opinion being agreed with universally. Sprint after sprint we tend to work on sets of features that have more…

Easy Weeknight Chicken Thighs

prep time: 5min / cooking time: 30-40min Been really loving how easy and delicious this recipe is from cookinglsl Ingredients 2 lb boneless skinless chicken thighs 1/4 cup Dijon mustard 1/4 cup honey 1 tbsp olive oil 1/2 tsp salt 1/4 tsp black pepper 1/2 tsp oregano 1/16 tsp cayenne pepper (optional) or a few dashes of your favorite hot sauce Instructions Preheat oven to 350F In a small bowl,…

Welcome!

Hey there, my name is Matt. I’m a husband, dog dad, software engineer, musician, photographer, coffee enthusiast, life-long learner, backpacker, home chef, volunteer, public speaker, and party planner. I’m probably many other things as well but that’s what came to mind. I consider myself a passionate person in general and I feel those who know me would describe me thus. Now here I am beginning a…

Research Driven Development

Title ideas: success, research, data, user The Problem Companies create roadmaps of features quarters in advance. Maybe with room for roadblocks but definitely not room for rewrites, refactors, or surprise features. This is because what matters to many businesses is that an initial idea is justcdscdas built, success is secondary (or subconsciously desired). What matters most is features checked…