RSSAmplifier

Blog

EquiValent

Ruby, Ruby on Rails, Elixir fullstack developer, DevOps and code philosopher.

blog.eq8.euRSS feed ↗10 posts

Latest posts

Inline SVG in Ruby on Rails

SVG image/icon has the benefit that it can be rendered as a part of HTML rendering <!DOCTYPE html> <html> <head> <title>SVG can be inline</title> </head> <body> <h2>Here is a SVG inline 👍</h2> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M21 12a9 9 0 1 1-18…

System.d service (daemon) for Puma server instaled under RVM (Rails)

Systemd ignores any PATH settings = you need to use full path to rvm. In order to use puma under RVM with systemd you need to create a wrapper for RVM:

Update millions of records in Rails

How to update half a billion entries on a PostgreSQL table with Ruby on Rails & Sidekiq

Responsive Navbar with Tailwind &amp; Stimulus JS

<!-- app/views/layouts/_navbar.html.erb --> <header class="bg-gray-500 sm:flex sm:justify-between sm:px-4 sm:py-1 sm:items-center" data-controller="navbar" data-navbar-state-value="false"> <div class="flex justify-between px-4 py-1 sm:p-0 items-center"> <div class="font-bold text-xl font-mono text-gray-200"> <span class="text-orange-400">Dev</span>Prof </div> <div class="sm:hidden"> <button…

Responsibility On Rails

Being a web-developer is one of the coolest jobs in the world. It brings freedom and growth opportunities like no other job in the world. It’s easy to just enjoy the fruits of this craft. But remember with great benefits comes great responsibility.

Elasticsearch 7 under Ubuntu - protect with basic password

Set up simple password for ElasticSearch 7.17.5 localhost running under Ubuntu 20.04 from standard atp-get instalation (example)

Use Importmaps without Rails

Rails 7 embraced the use of Import maps and they are awesome. If you wonder how to use importmap in plain HTML here is an example: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Import maps without Rails - Local-time example</title> <script async src="https://unpkg.com/es-module-shims@1.2.0/dist/es-module-shims.js"></script> <script type="importmap-shim"> { "imports": {…

Simple way how to use Bootstrap 5 in Rails 7 - importmaps &amp; sprockets

Rails 7 is a breath of fresh air. Thanks to importmaps everything is simple again. JavaScript (JS) is easy to be implemented without the need to install node,npm,yarn,webpack,..other 150 non-Ruby tools on your Laptop But what about CSS ? Well there is good old Sprockets (a.k.a Rails asset pipeline ) and good old gems contanining SCSS (remember those?) Let’s make life easy again Instalation of…

How to test performance of caching with RSpec in Rails

e.g.: if you implemeted fragment caching or russian doll caching

Order attachments in Rails ActiveStorage has_many_attached

How to change order of Active Storage has_many_attached attachments