I dare you to do two things in a React codebase of your choosing:

  1. Install an innocent progress bar module
npm install nprogres/nprogress

2. Add this import anywhere in the codebase

import NProgress from 'nprogress'

You’ll find that 5 seconds after loading the page, the app is replaced with

Game Days

I built this rudimentary piece of malware for a game day. Every month or so, one of our dev team members at Okra Solar runs an exercise to help the rest of the team prepare for what happens if something goes very wrong. In our last game day, our CTO deployed…

I was working on a task today to make Grafana available on two different URLs: grafana.okrasolar.com and grafana.harvest.okrasolar.com

On it’s own, that’s not too tricky:

I just needed to add a alias record:

new ARecord(this, 'Alias', {  zone: this.props.hostedZone,  target: route53.RecordTarget.fromAlias(new LoadBalancerTarget(grafanaService.loadBalancer)),  recordName: 'grafana'})

The hard part was setting up SSL certs for both domains.

The ApplicationLoadBalancedFargateService only allows you to supply one certificate.

To get it working with two certificates, I had to do:

This does the trick but it leaves me with one problem: I can’t do HTTP to HTTPS redirection because the ApplicationLoadBalancedFargateService already creates a listener on port 80 and I can’t find a way to access it.

Lambda is getting more and more powerful: so much so that you can now run many ETL and ML workloads on it. In this article I’ll show you how to deploy xgboost with lambda so that you can train models and run inference serverlessly.

Why this is hard

Let’s begin with why this is a challenge: lambda deployment package size limits. The XGBoost binaries are ~400MB. Lambda will only let you deploy a package up to 250MB. Same deal if you try to use lambda layers. At the time of writing, lambda layers still have a total size limit of 250MB. …

Inspired by I ruin developers’ lives with my code reviews and I’m sorry and Why don’t you just.. I built a little tampermonkey script to give real-time feedback on code review comments. YUSoMean works with GitHub and BitBucket — it analyses the comments you write and helps you craft code reviews that are encouraging rather than demotivating.

The backend team and I at GOFAR recently did a release to staging which we confidently expected would be a crowd pleaser. After much refactoring, we were able to get the app upgraded to version 3 of Loopback, the NodeJS framework we’re using to run the app. This was kind of a big deal because the app had been running on Loopback 2, which is now officially unsupported and therefore a scary security risk.

The deploy seemed to go smoothly..until my boss started complaining about the mobile apps now running really slowly. Eek. I dug into the logs and couldn’t…

I sat the AWS devops professional (beta) exam on Nov 28th 2018 and after a nail-biting 90 day wait during which I was convinced I had failed, I got the news that I passed with a score of 835/1000.

I passed!

I found the exam really, really hard. The associate level exams were super easy — I blasted through most of them in ~30 mins (read my guides for CSAA, CDA, CSOA) because the questions are black and white with three obviously incorrect answers and one clear correct answer. The Professional exam stretched me — it only had 30 more questions than…

I’ve been really enjoying using Apollo to handle data fetching and updates but have struggled a bit with writing tests. The official Apollo way seems to rely on observing changes in the DOM. In my case, the component that does the mutation does not have any DOM changes: it is a submit button. When the mutation succeeds, the root component renders a different screen based on the result of a query.

The data flow is essentially:

  1. User clicks submit
  2. Mutation fires, sending data to server
  3. Within the mutation, I update the cache to reflect that data has been submitted
  4. The…

Is it ethical to work for a tobacco company? Most people would probably say no but if you’ve ever contributed code to React, Webpack, jQuery, Bootstrap or Modernizr, you have done exactly that.

Philip Morris International’s website uses jQuery and Bootstrap.

British American Tobacco’s site uses jQuery and Modernizr.

Altadis uses React + Webpack.

I personally feel pretty uncomfortable about the idea that any improvements I contribute to open source projects might go towards giving people lung cancer. For that reason, I was thrilled to come across the Do No Harm License (NoHarm) today.

The idea of NoHarm is to…

The NABERS (National Australian Built Environment Rating System) program began in 1998 as an initiative of the NSW government. Since then, the program has spread across Australia and has recently been adopted in New Zealand and India. The results have been positive: 77% of commercial real estate in Australia has been assessed and cost savings of more than $100 million have been achieved. From July 1st 2017, the program has broadened its reach from office spaces above 2000 sq. m to smaller office buildings. Under the Commercial Building Disclosure (CBD) act, any office premises above 1000 sq. …

From December 2017, the Australian Energy Market Commission (AEMC)’s Power of Choice (PoC) ruling will apply to all Australian households and businesses. The policy is designed to give electricity consumers greater insight into their consumption patterns and allow for “demand side participation” (essentially getting financial incentives to use electricity at times where it’s less stressful for the grid). In practical terms it means that every new meter installed (or any old meter that stops working and needs to be replaced) will be a smart meter, transmitting consumption data to the retailer every 30 minutes. If you’re in Victoria, this won’t…

Jeremy Nagel

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store