Dmitry Daw

Dmitry Daw @haukot

Joined:
Jul 3, 2019

Dmitry Daw
articles - 14 total

A way to cache responses in Grape API

Caching is a great way to speed up slow pages and to make your API faster in general. Let's say we...

Learn More 1 0Jun 28 '24

How to fix a segfault in Ruby

Let's say you got a "Segmentation fault" error in Ruby [BUG] Segmentation fault at...

Learn More 7 0Jun 22 '24

How to use rbtrace from outside of docker container

Rbtrace is a great tool to see which functions your app is calling at the time. In most cases you...

Learn More 1 0Jun 15 '24

Base test profiling inside docker with test-prof

Install test-prof and stackprof gems. group :test do gem "test-prof", "~> 1.0" gem...

Learn More 1 0May 30 '24

Is ActiveRecord right in omitting parentheses in queries? (and how ChatGPT lies again)

I need to get a selection of users with an SQL query like this: sql =<<~SQL token IS...

Learn More 1 0Apr 16 '24

Deploy Anycable with Kamal(formely MRSK)

Here we'll deploy Anycable wih Kamal(MRSK before). We need our Rails code for anycable-rpc, so...

Learn More 3 0Aug 3 '23

How to port VS Code plugins to your favorite editor(e.g. Emacs), with the example of Github Copilot Labs.

TLDR: Proof of concept code is here https://github.com/haukot/copilot_labs_plugin_base VS...

Learn More 3 0Jul 1 '23

Trick to cleaner use Sidekiq::Testing.inline! in tests

By default, Sidekiq jobs don't run in tests. But sometimes, e.g. in e2e tests, you'd want them to...

Learn More 4 0Jun 12 '23

How to cache Kamal(MRSK) deployments in CI

Caching is a key strategy in optimizing Docker deployments. But because CI don't saves previous...

Learn More 3 0Jun 1 '23

What to do if Sidekiq job is stuck

If your Sidekiq job is stuck, your first intention may be to try to stop this job. But Sidekiq...

Learn More 0 0Jan 27 '23

Troubleshooting weird DB connection errors in Rails with PostgreSQL

There are a number of errors that occur when attempting to use a database connection that has...

Learn More 3 0Jan 18 '23

How to query Ancestry fast

Ancestry is a great library to organize models in a tree structure. For example, if you have Locatio...

Learn More 4 0Apr 29 '21

Test Rails API with json type

By default Rails converts all params that come from Rspec to strings(related issue https://github.com...

Learn More 7 1Apr 5 '21

Swagger/OpenAPI and Rails array param

Ruby On Rails automatically parses query params as array if they are given in format expand[]. Like...

Learn More 8 0Mar 26 '21