Recent Posts
Deploying AWS CloudFormation templates from CircleCI
CircleCI provides several official orbs for interacting with Amazon Web Services,
but not for CloudFormation specifically. However, that doesn’t mean you need to
reach for a community orb to update your stacks from a CI pipeline. A single
AWS CLI command is all that is needed to push template updates to your AWS
account.
read more
Announcing Xsv 1.0.0
Today marks the release of Xsv 1.0.0, a high performance, pure-Ruby gem to parse .xlsx (Excel) files
read more
Forcing C# indentation in Visual Studio Code using Omnisharp
I always thought indentation was a solved problem, until I needed to adapt
to something different. Here’s a trick to force correct indentation for your
.NET projects by using the Omnisharp language server.
read more
Pair a TRÅDFRI remote to deCONZ - the hard way
Years ago I replaced my IKEA TRÅDFRI gateway with a Rasbperry Pi with a Raspbee, running deCONZ. It allowed me to mix and match ZigBee devices from various brands and make flexible configurations. Plus the integration with Home Assistant is superb.
However, one thing I lost is the ability for the IKEA remote to control my lights directly when the deCONZ gateway is down, which was possible back when I used the IKEA gateway.
read more
It's time to consider C# and .NET 5
People have been sleeping on .NET and they’re mising out. With the release of .NET 5 this month, it’s time to consider C# .NET for your next project! It’s a great general-purpose software framework that’s likeable, in high demand, easy to sell to customers, has decent performance, is completely open source, mature and has a large backing. What more could you want? Let me explain to you why I see it as the best alternative for Ruby on Rails and share some resources to get you started.
read more
The case for proportional programming fonts
Programming fonts are stuck in the past. Proportional typesetting is everywhere and
there is no reason why you can’t use it for code.
read more
Adding TypeScript to your Svelte components in Rails 6
Combine Svelte and Typescript with Ruby on Rails' Webpacker to improve your JavaScript workflow and get better feedback in your editor.
read more
Moving from Capybara to Cypress
Cypress makes writing integration tests (or system tests) easier and more fun. This posts shows you the tools needed to add Cypress tests to your Rails application.
read more
Building a small Docker image to deploy your Go application
Docker image size matters. Here’s how you build a small image on top of debian:slim and why
that’s a better option than alpine or scratch.
read more
Deploying Ruby on Rails apps to Kubernetes from Gitlab CI
Gitlab CI allows you to create and manage Kubernetes clusters directly from the interface and easily deploy builds to your existing Kubernets infrastructure. Here’s how.
read more
Full resolution Jump Desktop on iPad Pro 11" using SwitchResX
Since the introduction of the Magic Keyboard, interest in using an iPad as a remote terminal for desktops is bigger than ever. The tool of choice for many iPad enthusiasts seems to be Jump Desktop, which supports VNC, RDP and their proprietary Fluid protocol. Let’s try to get the most out of it when connecting to a macOS desktop.
read more
Adding external hosts to a Prometheus Operator helm release
Prometheus Operator is the perfect cloud-native monitoring solution for Kubernetes. By deploying the Helm chart you get a preconfigured Prometheus and Grafana setup plus an array of CRDs to add monitoring your own services.
Not everything necessarily lives in a Kubernetes cluster, though. So how would you add external targets to a Prometheus Operator setup? One could define an Endpoint, Service and ServiceMonitor for the external resource to have it picked up by Prometheus' Kubernetes service discovery, which works, but there is a better solution that is more in line with how Prometheus is used outside of the Operator deployment.
read more
Efficient XML parsing in Ruby
TL;DR I wrote a super fast Excel file reader called Xsv, check it out! It’s fast and low on memory because it uses a SAX-based XML parser instead of a DOM-based one. Here’s some benchmarks to prove it.
Simple API for XML, or SAX for short is an event-based API, of which development started in December 1997 1. It is an alternative to the well-known Document Object Model, which was developed around the same time 2.
read more
Add jemalloc to your Ruby Docker images, now!
The topic of this post is neither new nor original, so I’m going to keep things short. People have been using jemalloc with MRI Ruby for years and praising it’s benefits all the while. The TL;DR here is: for Rails apps, using jemalloc will reduce memory consumption and might increase performance a little.
Why? To illustrate my own experience, here’s a Grafana graph showing the effect of switching to jemalloc on a production server running a few instances of a Rails application:
read more
Disable JavaScript source maps in production Rails applications
Ruby on Rails 6 allows us to leverage the excellent Webpack bundler to manage JavaScript and CSS components in a way that’s more native to those technologies than the old asset pipeline: no more gems to wrap JavaScript libraries and no more libv8 gem issues.
Another advantage Webpack brings is the excellent source maps. I was surprised to see the source code of my Svelte components, complete with comments available from the Firefox development tools:
read more
PICO-8 is the coolest thing I've seen all year
For a long time I’ve been thinking about getting out of my comfort zone and try to develop a game for something like the Sega Mega Drive or maybe the Atari 2600. But for a spoiled high-level developer like me that would be quite a daunting task so I’ve postponed indefinitely.
Then last week, in the midst of the COVID-19 crisis, I stumbeld upon this awesome project called PICO-8. To quote the official website:
read more
Raspberry Pi Can't Find My Wifi
If your Wi-Fi network is on channel 12 or 13, change the regulatory domain of your
wireless networking driver to make the Raspberry PI 3B see it.
read more