Things we have to say.
Our articles are thoughts, tips and tricks we found in our daily work.
Best practices on tiny plates, easy to consume, easy to eat, easy to love!
🥘 Hot and spicy 🌶️ knowledge about
#rails #ruby #tailwindcss #design #css #bootstrap #view components #regex #stimulusjs #action mailer #turbo #docker #raspberrypi #visual studio code #git #github #ohmyzsh #zsh #active storage #esbuild #dev containers #javascript
Unlocking the Superpower of Regular Expressions in Find and Replace for Visual Studio Code.
Unlock the full potential of Visual Studio Code with regular expressions in Find and Replace. This guide shows you how to use regex for precise text modifications, making complex tasks simple and efficient. Learn about capturing groups, replacement patterns, and practical examples like date format transformation.
Rendering view component template variants outside of the current request.
Discover how to leverage ActionController::Rendering for rendering specific component variants outside the current view context with ease.
Accessing TailwindCSS Configurations from JavaScript.
Bridge the gap between design and logic by accessing TailwindCSS configurations directly from JavaScript. This guide explains how to use the resolveConfig helper to dynamically apply themes, spacing, and breakpoints, ensuring a cohesive and efficient user experience across your web projects.
Split your routes.rb file into logical files.
Simplify your monolithic Rails application by splitting your routes into logical namespaces using Rails' internal draw
method. Instead of a cluttered routes.rb file, organize your routes into clear, manageable units like admin
, api
, etc. for improved clarity and maintainability.
Add zeitwerk:check rake task to you CI system.
Zeitwerk is Rails powerful code loader, handling all autoloading of ruby files with ease. While it requires specific filenames for classes, potential issues can be preemptively caught using the easy-to-use zeitwerk:check
rake task, ensuring your Rails application boots properly in production.
Count occurrences with the .tally method.
Learn how to leverage the universal tally
method for easy counting.
How To Install Docker and Docker-Compose On Raspberry Pi.
RaspberryPi ARMed with Docker and Docker-Compose. Dive into containerization on your Raspberry Pi with this straightforward guide to installing Docker and Docker Compose.
Raspberry Pi Setup.
Whether you're setting up your first Pi or looking to refine your existing setup, our upcoming post will provide all the tips and tricks you need. From initial software installation to hardware configuration, we'll walk you through every essential step to get your Raspberry Pi up and running smoothly.
Catch your emails in Rails development with Mailhog.
Almost every non-trivial Rails application needs to handle email. While in development mode, the setup for actually viewing the raw email in HTML or Text is very tedious. It's even dangrous with the current Rails defaults. So follow this guide to use the tool Mailhog
to catch all mails locally.
Using Tailwind CSS AND Bootstrap side by side in Rails.
Ever wondered how to use Tailwind CSS AND Bootstrap within the same Rails application? Maybe you have different parts of the app where you want to take advantage of the better suited CSS framework. It's actually pretty easy to do in Rails and our go to approach in monolithic Rails apps.