Rails: Passing array values to tag helpers like link_to
Array values in Rails HTML options become space-separated strings, making class helpers accept multiple CSS classes without manual joining.
BigDecimal arithmetic in Ruby
BigDecimal avoids floating-point rounding errors in Ruby, especially for money and other exact amounts. Mixing it with Float turns results back into inexact values.
sessionStorage: Per-window browser storage
Temporary browser state survives reloads and accidental refreshes but stays separate for each tab or window; sessionStorage is string-only and not always available in private browsing.
Set default_url_options for entire Rails application
Set application-wide defaults for URL generation in Rails instead of duplicating them in multiple places as issues arise.
subscript, superscript and line-heights
<sub> and <sup> often break line height in email layouts; setting line-height: 0 with mso-line-height-rule: exactly keeps superscripts and subscripts consistent across clients.
Linux: Running a single unique instance of command + arguments
Prevents duplicate command instances with the same arguments from running at once, useful for cron jobs and other repeated tasks.
Destructors for async Unpoly compilers
Async Unpoly compilers cannot return destructors directly; up.destructor works, but detached elements can leak memory unless attachment is checked after await.
Bookmarklet: cards Markup Link Bookmarklet
Create Markdown links to cards in other decks with a bookmarklet that copies the current card title and path into link format.
Rails: Use STI in Migration
ActiveRecord migrations can break when STI models are referenced directly; embedding model classes in the migration and overriding find_sti_class and sti_name keeps type lookup working.
How to see how many inotify instances are used by each process
Many development tools consume inotify watches until the operating system limit is reached. A /proc scan identifies the process that uses the most watches so the limit can be raised or the culprit adjusted.
Diátaxis: A systematic framework for technical documentation authoring
A framework for organizing technical documentation around four user needs: tutorials, how-to guides, reference and explanation.
Jasmine: Creating DOM elements efficiently
Efficient ways to create DOM test fixtures for Jasmine, from HTML parsing and selector helpers to innerHTML, with readable structure and direct element references.
Advantages of using appname.daho.im:3000 over localhost:3000
Using separate local hostnames avoids cookie clashes and logouts when switching between web apps on Rails development servers.
Fast Navigation Tips In Dev Tools
Keyboard shortcuts and layout options in DevTools speed up panel switching, drawer visibility, and workspace organization.
Inspect and Debug CSS Flexbox and Grid Layouts by using the Layouts Tab in Dev Tools
Chrome DevTools Layouts tab helps inspect and tune CSS Flexbox and Grid with overlays, badges, and visual controls for sizing, alignment, and nested layouts.
Do not use unitless zeros in CSS calc functions
Unitless zero values are invalid inside CSS calc() expressions, which can cause ignored declarations and missing or unpredictable layout behavior.
How to choose keyboard shortcuts for web applications
Custom keyboard shortcuts in web apps can clash with browser and OS defaults, making features hard to discover and use. Consistent, discoverable bindings improve efficiency without breaking expected behavior.
Variable fonts: Is the performance trade-off worth it? - LogRocket Blog
Variable fonts can reduce file loads and broaden typographic control, but performance gains depend on how many font styles a site needs.
Rubymine: do not open last project
RubyMine can waste startup time by reopening the last project automatically, especially when switching between projects. Disabling that startup behavior and using the project chooser improves project switching.
Rails asset pipeline: Using ESNext without a transpiler
Modern browsers run most ES6 features natively, but Rails asset pipelines can still fail when Uglifier cannot minify newer syntax.
Ruby: Do not mix optional and keyword arguments
Mixing optional positional and keyword arguments in Ruby methods can turn hashes or to_hash objects into unexpected keywords and raise ArgumentError.
Caution: `.includes` can make `.ids` non-unique.
includes can duplicate primary keys in ids when loading associated records, causing unexpected non-unique results; preload keeps the ids list stable.
Organizing custom Date(Time) formats
Large Rails projects often duplicate date and datetime format strings, causing inconsistent output; named formats in Time::DATE_FORMATS and Date::DATE_FORMATS reduce repetition.
Sass: How to get rid of deprecation warnings in dependencies
Sass 1.35.0 can suppress dependency deprecation warnings with quietDeps and limit warnings in your own code with silenceDeprecations.