Webpacker: Disable source maps
Disabling source maps in Webpacker can reduce exposed code and simplify builds. Set config.devtool = 'none' in an environment-specific webpack config.
Parallel cucumber: How to pass in cucumber arguments
Pass Cucumber CLI flags such as --tags through parallel_cucumber by wrapping them in --cucumber-options when running test shards.
Useful Ruby Pathname method
Ruby Pathname objects can build file paths with :/ or join, making path concatenation in Rails more concise and readable.
Chrome: how to fix window issues (maximize, minimize,...)
Google Chrome can misbehave with hidden, overlapping, or unresizable windows on Linux. Using the system title bar and borders restores normal window handling.
Vortrag: Content Security Policy: Eine Einführung
Content Security Policy schützt Webseiten vor XSS, indem der Browser erlaubte Quellen für Skripte, Styles, Bilder und Verbindungen streng einschränkt.
How to check if a file is a human readable text file
Ruby's File.binary? is only a fast guess and can misclassify PDFs or UTF-8 text. A safer check validates the file contents against the target encoding.
How to cycle through grep results with vim
Cycle through grep matches in vim’s quickfix mode instead of reading bulky context blocks; jump between hits with :cn and :cp while keeping results tied to file and line numbers.
How to migrate CoffeeScript files from Sprockets to Webpack(er)
Migrating CoffeeScript from Sprockets to Webpacker can keep existing classes and dependencies working by adding coffee-loader and adjusting imports and global namespace exposure.
The State of Ruby 3 Typing | Square Corner Blog
Ruby 3 adds optional type signatures in separate files through RBS, with stdlib signatures and tooling for generating signatures for Ruby code.
Geordi 4 released
Geordi 4.0.0 adds clearer command documentation and fixes console, deploy, rake, and shell for projects not bundled before, but removes deprecated executables.
Introducing GoodJob 1.0, a new Postgres-based, multithreaded, ActiveJob backend for Ruby on Rails
Background job processing for Rails can avoid Redis infrastructure and managed Redis costs while staying compatible with ActiveJob through a Postgres-backed worker gem.
Fixing wall of warnings: already initialized constant Etc::PC_SYMLINK_MAX
Installing the etc gem alongside Ruby's built-in Etc library triggers repeated "already initialized constant` warnings. Removing the gem resolves the conflict.
Git: Merge a single commit from another branch
Selects one commit from another branch without merging the whole branch. cherry-pick copies the change with a new hash, which can lead to duplicate history later.
How to prevent Nokogiri from fixing invalid HTML
Nokogiri can repair invalid HTML during parsing, which may break markup and SEO expectations. Using Nokogiri::XML with HTML save options preserves the original structure.
FactoryBot: Traits for enums
Enum values can become FactoryBot traits automatically, reducing manual trait definitions and making new roles or states available in tests with less setup.
The HTML5 video element
Browser video playback needs format fallbacks, subtitles, and careful state handling; poster, controls, and the HTMLVideoElement API help build reliable players.
The JavaScript Object Model: Prototypes and properties
JavaScript’s object model hinges on prototypes, property descriptors, and this binding; understanding constructor functions, inheritance, and Object.getPrototypeOf() prevents common OOP pitfalls.
Merging two JavaScript objects
Combining properties from two JavaScript objects depends on the runtime: spread syntax, Object.assign(), or up.util.merge() can create a new object with later values winning.
Select2 alternatives without jQuery
jQuery-free dropdown components for advanced selects are needed when Select2 is too dependent on jQuery or missing features.
How to use Active Job to decouple your background processing from a gem
Background jobs in Rails can stay adapter-agnostic by using ActiveJob, making Sidekiq or Resque easy to swap without changing worker code.
Howto: Select2 with AJAX
Load large choice lists on demand with AJAX in Select2 to avoid huge HTML and support paged, infinite-scrolling results.
Testing for XSS in Markdown Fields
Markdown fields can become XSS sinks when user input is rendered unsafely, allowing javascript: links, image event handlers, and filter bypasses.
Ruby: Using the pry debugger in projects with older Ruby versions
Older Ruby versions need pinned pry and debugger gems; incompatible releases trigger native extension build failures and frozen-string errors.
The ultimate guide to Ruby timeouts
Unresponsive network calls can stall a Ruby system, and many gems default to no timeout. Safer timeout settings avoid hangs, with Ruby’s Timeout module best avoided.