I used to rely on dependency injection and interfaces to mock my http clients. This worked, but was very burdensome. I learned about the httptest package which provides utilities for HTTP testing. I’ll walk through an example test I made in my weather CLI The code which makes a network request I ping NOAA for a weather forecast using the following code. I have a FetchForecast method which invokes fetch to perform the network request at a specific URL.
I like chatgpt, but I don’t like it crawling my site. That’s why I told ChatGPT to frig off. These two lines will make that happen User-agent: GPTBot Disallow: / You can check out an example on this site by visiting its robots.txt file. More information about ChatGPT’s crawler can be found here
How do you measure the performance and user experience of your website? Every change made can affect page loading speed, interactivity and visual stability. Together, these contribute to your product’s performance, search engine ranking, and advertisement performance. With New Relic, you can monitor these web vitals and be notified of user experience regressions. Which main web vitals I should monitor? From Google, their are several main web vitals you should focus on monitoring to evaluate how well users are experiencing your application.
The Problem API Gateway allows you to assocate deployments with stages, each stage representing a logical reference of your api. For example, my gardentour API project needs a dev and a prod stage to represent my environments. I manage infrastructure with terraform, and I needed to achieve full isolation of my stages. It would be impracticable to manage deploys of many API Gateway stages with a single Terraform environment like so:
I recently had a power outage which lasted 10 hours here at home. It was not pleasant sitting the dark with just a flashlight. I knew I had to build a power box, a device which provides a variety of input leads from a battery. This article details what how I designed and built a power box for simple applications such as powering lamps, charging phones, laptops, and powering my ham radio.
The Problem I have been building a side project with AWS Cognito and Terraform. I wanted a custom message lambda trigger to be invoked anytime the user signed up for my app, however I kept getting permission errors. This blog shows you the terraform configuration you need to to let cognito invoke lambda triggers with Terrafrom. Terraform config AWC Cognito For AWS Cognito, I have a simple user pool that allows users to sign up with their email and a passowrd, and a single user pool client to hold users for my development environment.
Update This repo is read-only and is no longer worked on. Twitter was a wonderful platform, built by a wonderful team. With its recent changes, its time to re-evaluate what we invest in and the world we want to build. To the projects using this library, I’ll leave the repo read-only so you can migrate on your own time Building with free APIs is a great way to teach yourself new skills in languages you like.
Last year, I took the plunge and applied for a Frontend Engineering Position at Amazon. I knew little about the interview process and I had just one month to prepare for it. The result? I got an offer. In fact, the use of the interview techniques below granted me the opportunity to choose between two competing job offers. In this guide I will reveal the steps I took in order to become a competitive candidate.
At Streem we are on a mission to make the world’s expertise more accessible. We create guidance tools to steer the discussion and ensure accurate understanding the first time. One of the guidance tools we are developing for web is a 3d cursor that can be positioned in a remote video. To accomplish this, we need to process a lot of raw pixel data and AR data per frame. Positioning remote artifacts in AR involves a lot of computation between animation frames.