Git shortcut to rebase onto another branch
Interactive Git helper for rebasing a chosen run of commits onto another branch, reducing off-by-one mistakes and manual commit counting.
Disable built-in dragging of text and images
Browser text and image dragging can block custom horizontal scrolling or pointer-based movement. Disabling native drag behavior needs CSS and, in Firefox, JavaScript.
Bash alias to switch between recent branches
Quickly jump between recently used Git branches with a shell alias and fzf, avoiding manual branch names and speeding up context switches.
Large CSS box shadows can bring browsers to a crawl
Large blurred shadows can make scrolling and DOM updates sluggish, especially with fixed or sticky elements. filter: drop-shadow() may render faster with hardware acceleration.
Rails: Removing the cucumber-rails warning when setting cache_classes to false without Spring enabled
cucumber-rails emits a transaction warning in test runs when cache_classes stays false without Spring, affecting parallel execution setups.
Working on the Linux command line: How to use bookmarks for directories
Navigate deeply nested project folders faster by storing directory bookmarks in CDPATH and jumping back with short symlinks.
Working on the Linux command line: How to efficiently navigate up
Frequent upward directory changes in deeply nested trees are slow; shell aliases like .. and ... make jumping to parent folders faster.
Unpoly 2: Don't try to download files through AJAX requests
AJAX downloads fail because browsers try to render files instead of saving them. Exclude download links from Unpoly link handling and use Content-Disposition: attachment or download.
Cucumber Factory: How to assign polymorphic associations
Polymorphic associations in Cucumber Factory require named associations; indirect references like owner above fail when the target type is ambiguous.
Bookmarklet to facilitate generating new git branches for PivotalTracker Stories
Create git branch names from PivotalTracker story titles, with initials and optional abbreviations for easier tab completion.
Unobtrusive JavaScript helper to progressively enhance HTML
Attach JavaScript behavior to matching HTML elements as they appear in the DOM, with automatic initialization for dynamic content and cleanup on removal.
Using attribute event handlers with a strict Content Security Policy (CSP)
Inline event handlers and javascript: links are blocked by a strict CSP; script-src-attr hashes can re-enable specific handlers while keeping other inline script disabled.
CSS has a well-supported :empty selector
:empty hides elements only when they have no content, including whitespace. Useful for badges or counters that should disappear when nothing is shown.
SSL/TLS - Typical problems and how to debug them
Common TLS failures can block secure connections and are often hard to diagnose. Typical symptoms point to certificate, protocol, or handshake issues and debugging clues help narrow them down.
RSpec < 2.11: ActiveRecord scopes must be loaded before using the "=~" matcher
ActiveRecord scopes must be converted to arrays before using RSpec =~, or array comparison can fail. match_array and contain_exactly are preferred in RSpec 2.11 and later.
Default Arguments and Memoized
Memoizing methods with default or keyword arguments can freeze evaluated defaults and treat omitted arguments differently from explicit default values.
Using multiple MySQL versions on the same linux machine using docker
Run several MySQL releases on one Linux host with Docker instead of mysql-sandbox, and connect Rails to each instance through a separate TCP port.
CarrierWave: When your uploader generates filenames dynamically, use model.save! instead of uploader.recreate_versions!
Dynamically generated CarrierWave filenames can leave versions out of sync; uploader.recreate_versions! does not persist the stored name, so model.save! is needed.
CSS: How to force background images to scale to the container, ignoring aspect ratio
Background images can fill a container without preserving aspect ratio by setting background-size: 100% 100%. SVG viewBox can still lock proportions.
Setting SASS variables as value for CSS custom properties
SASS variables can be interpolated into CSS custom properties with #{...}; otherwise the literal variable name is emitted. meta.inspect() preserves quotes for string values such as font stacks.
Headless Chrome: Changing the Accept-Language header is not possible
Headless Chrome on Ubuntu cannot reliably change Accept-Language through Selenium options; test code can override the header in Rails instead.
Selenium: Network throttling via Chromedriver
Throttle headless Chrome network conditions in Selenium to debug flaky integration tests and simulate slow page loads.
List of Chromium Command Line Switches « Peter Beverloo
Extensive Chrome startup options help build custom browser drivers and automate testing with Capybara.
Yarn: if integrity check won't let you start rails console
Yarn integrity warnings can block rails console even when packages are current; stale Spring cache may keep the error until spring stop clears it.