How to find child nodes that match a selector with JavaScript
Direct child selection with querySelectorAll is awkward without :scope; :scope > ... targets only immediate descendants instead of every matching descendant.
Code splitting in esbuild: Caveats and setup
esbuild code splitting can reduce main-bundle size, but multiple entry points, chunk cascades, and import-order changes can break builds or runtime behavior.
RubyMine and Rubocop: Performing safe autocorrects on save
Enable safe RuboCop autocorrect in RubyMine on save, trading a small save delay for automatic fixes; bulk edits can become slow.
RubyMine: Fixing "Rubocop returned exit code -1. See the logs for details"
RubyMine can show "Rubocop returned exit code -1" when the installed Rubocop version is outdated or incompatible. Updating rubocop often resolves the error, and idea.log helps confirm the cause.
Create and send any HTTP request using the Postman request builder
Postman provides a graphical way to build and send HTTP requests, with collections, environments, history, and a cookie manager for API testing.
We now have our own memoization gem "Memoized"
Forked memoizer methods now keep their original arity and run faster on repeated calls within the same request.
Cucumber: Identifying slow steps that drag down your test speed
Cucumber test suites can hide slow steps that waste most runtime. --format usage measures step durations and highlights optimization candidates, especially when waiting assertions surface previous delays.
Balance your texts today with text-wrap: balance
text-wrap: balance improves headings and teaser text that break awkwardly, balancing line widths where supported while progressively enhancing browsers that lack it.
Checklist for Implementing Design
Design changes need more than visual parity: implementations should be tested, responsive, touch-friendly, accessible, localized, and consistent with existing patterns.
Ruby: alias_method conflicting with prepend
alias_method can break when a method is later overridden with prepend, causing recursion or bypassing the added behavior.
Best practice: How to manage versions in a package.json
Lockfile-based installs make package versions reproducible, so package.json ranges are usually unnecessary; pinning helps only when avoiding bad releases or unwanted upgrades.
Best practice: How to manage versions in a Gemfile
Gem version pins in Gemfile are usually unnecessary because Gemfile.lock fixes installed versions; use constraints only for lockfile-free setups, known regressions, or blocked upgrades.
RSpec 3 argument constraints use weak equality
RSpec 3 argument matching can accept broader values than strict equality, especially for classes, regexps, and ranges. Use eq or a block for exact expectations.
Rails < 5: How to get after_commit callbacks fired in tests
Transactional test fixtures can suppress after_commit callbacks in Rails, preventing email jobs and other post-save work from running. Rails 5 fixes this; older versions can use test_after_commit.
ActiveRecord: Creating many records works faster in a transaction
Bulk inserts into one table can be much faster inside a transaction; Rails 6+ also offers insert_all for a single multi-row INSERT without validations.
Local deployment after pipeline succeeds
CI-only workflows can delay local deployments until a commit lands on the branch. A shell alias can wait for the next update and trigger cap staging deploy automatically.
How to configure case insensitive git output
Git diff output uses less, and repeated case-insensitive searches are easier when less -i is configured globally.
Geordi 9.6.0 released: new "did you know?" feature
Geordi suggests related commands and options after successful runs, surfacing hand-picked hints with a low random probability.
Find Where a Rake Task is Defined
rake --where reveals the source file and line that define a task, useful for tracing where assets:precompile comes from.
Vim: Simple way to edit several lines at once at the same cursor position
Column editing in Vim lets the same change be applied to several lines at one cursor position. Ctrl+v visual block mode and insert mode make repeated edits fast.
Capo: putting <head> content into the right order
Head element order can affect perceived page performance, and Capo helps identify out-of-order elements and suggest a faster arrangement.
Linux: How to make a terminal window title reflect the current path
Terminal emulators can show unhelpful titles like the shell name instead of the current directory. Bash and Zsh can update the window title automatically with an escape sequence.
About Ruby's conversion method pairs
Ruby distinguishes explicit and implicit conversion methods; implicit ones like to_hash should only be implemented when an object already behaves like the target type.
Git diff: Deemphasizing code that was only moved around
Long diffs can hide real edits inside large code moves; git diff --color-moved=dimmed-zebra dims unchanged moved lines and highlights changes.