Smooth progress indicator with CSS

Recently I worked on upload button feature using ActiveStorage::DirectUpload features of the Ruby on Rails web framework. There’s nothing too fancy here, but I got fascinated how nice it was to implement upload progress bar with the help of modern CSS features.

Better performance with Hugo Pipes

I recently used Hugo Pipes to optimize asset handling in this site and replaced old Webpack based hack I had used to achieve same.

That hack was done in the times of Hugo version 0.3x. Currently all necessary things like JS bundling, CSS pre- and post-processing, fingerprinting, minification, etc is possible with Hugo native features:

CloudWatch custom metrics with Rails

I recently had to implement Rails application monitoring using CloudWatch in a work project. App in question had multiple integrations to other REST services so it made sense to be able track their response times, error status counts etc to better debug performance anomalies.

Here’s steps how I used Active Support Instrumentation API of Rails to feed those as custom CloudWatch metrics.

Inspecting Docker container network traffic

When developing dockerized services with other communication end-points than browser client one soon needs some ways to capture and debug network traffic from containers. Here’s some tools and tips I’ve been using.

Static asset cache busting for Hugo

Update since writing this post, Hugo has implemented number of great features providing native way to implement cache busting etc without Webpack.

Checkout new post: Better performance with Hugo Pipes.

Hugo is a blazing fast static site generator with a great architecture for managing content. However asset pipeline à la Middleman or Jekyll is something I have been missing especially for generating images with cache busting hashes in the filenames.

I solved that by configuring Webpack for something similar.

Parsing MessagePack in Rails > 5.1

This is an update to earlier post where MessagePack body was parsed to controller params using Rack middleware. That approach relied on ActionDispatch::ParamsParser which got deprecated in 5.1 while custom mime type params parsing got simpler.

Book review: CSS Secrets by Lea Verou

During holidays I finished book CSS Secrets by Lea Verou. I think its the best CSS book I have encountered. It presents 47 everyday design problems with well thought out alternative solutions using latest CSS features. First chapter gives short introduction on how CSS standards are formed and presents some best practices for writing CSS. That introduction chapter itself changed the way how I have been thinking the DRY principle regarding CSS.

First impression is made once

A short story on my really swift and decisive comparison of transactional email as a service services.

Parsing MessagePack to Rails params

Update ActionDispatch::ParamsParser has been deprecated in Rails 5.0. Below solution works for Rails versions before 5.1 where ActionDispatch::ParamsParser got removed. Checkout this post for similar implementation in current Rails versions. Recently I had to develop Ruby on Rails app which would handle MessagePack formatted request bodies as well as JSON. By default Rails makes parsed JSON available at the params object, and I wanted MessagePack content to be handled just like that.

Getting react-native running on Fedora 22

I had a little bumps along the way following react-native’s OSX only instructions while setting up development environment on my Fedora 22 system, so here’s quick notes how I got it up and running.