Ruby: How to fetch a remote host's TLS certificate
Fetch a remote server’s TLS certificate in Ruby without sending a full request. The certificate can be inspected, cached as PEM, and reloaded with OpenSSL::X509::Certificate.
Sass partial names must always start with an underscore
Imported Sass files need a leading underscore or they compile into standalone CSS and can fail when they depend on shared variables or mixins.
Inspecting a live Ruby process
Extracting a backtrace from a running Ruby process helps diagnose hangs and crashes without waiting for a restart. gdb can attach live or inspect a core file.
How to use the Capistrano 2 shell to execute commands on servers
Capistrano 2 provides shell and invoke for running tasks or ad hoc commands on deployment targets, with support for individual hosts and roles.
Guide to String Encoding in Ruby
Ruby string encodings can behave unexpectedly and trigger invalid byte sequence errors in UTF-8 when text is handled with the wrong encoding.
How to make a cucumber test work with multiple browser sessions
Capybara multi-session tests support simultaneous users in browser-based chat flows, but session-aware authentication state is needed to avoid conflicts.
Rails: Rest API post-mortem analysis
Rails API backends can be fast and easy to extend, but serializer maintenance, schema drift, documentation limits, and missing rate limits create real operational risks.
How to: Validate dynamic attributes / JSON in ActiveRecord
JSONB columns can hold dynamic attributes in ActiveRecord, but validation and strict defaults are easy to lose. JSON Schema keeps evolving hashes predictable.
Handling duplicate links with Capybara and Cucumber
Duplicate links in Capybara can trigger Ambiguous match errors when any matching link is fine; switching Capybara.match to :first avoids the failure.
Structuring Rails applications: the Modular Monorepo Monolith
Monolithic Rails apps can stay maintainable by splitting code into a monorepo of Rails Engines and gems with explicit component dependencies.
Capybara 'fill_in': Ambiguous match for different input names
Capybara fill_in can raise Capybara::Ambiguous when visible field labels overlap. match: :prefer_exact or a global exact matching strategy avoids substring conflicts.
How to capture a screen-cast on Linux
Tools and settings for making Linux screen recordings with better quality, optional audio, and quick trimming or muting with ffmpeg.
Jasmine: Test that an object is an instance of a given class
Verify that a value was created by a specific constructor in Jasmine with jasmine.any(Klass) instead of direct instance checks.
Understanding SQL compatibility modes in MySQL and MariaDB
SQL mode mismatches can break apps after MySQL or MariaDB upgrades by changing strictness, grouping rules, and allowed values.
How to set up SMTP email delivery with a Gmail account
Rails applications can send mail through Gmail’s SMTP server with smtp_settings; Google app passwords enable delivery when two-factor authentication is enabled.
Effectively Using Materialized Views in Ruby on Rails · pganalyze
Large SQL queries become hard to maintain as joins, subqueries, and filters pile up. PostgreSQL views and materialized views can encapsulate that complexity in Ruby on Rails.
A Migration Path to Bundler 2+
Bundler 2 introduced compatibility issues and confusing behavior, with further changes after release. Upgrading can break dependency management and require a migration path.
Howto: Change the keyboard shortcut for the emoji-picker
Ubuntu's ibus emoji picker can conflict with existing shortcuts such as Ctrl+Shift+E, especially in terminal apps. The binding can be removed in ibus-setup.
jQuery promises: done() and then() are not the same
jQuery done() and then() differ in promise chaining: then() waits for returned promises, while done() ignores them and can resolve too early.
How to run a small web server (one-liner)
Quickly serve a local folder for testing, or boot a Rack app, with one-line commands in Ruby, Python, Passenger, or Puma; HTTPS is possible too.
RSpec: Running examples by name (or running a single shared example)
Shared RSpec examples can be rerun by --example substring match or example ID when rspec file:line cannot target them directly.
Rspec 3: what to do when `describe` is undefined
RSpec 3 can raise undefined method 'describe' for main:Object when DSL methods are not exposed globally; disable_monkey_patching! turns them off, and expose_dsl_globally = true restores them.
Linux Performance Analysis in 60,000 Milliseconds
A Linux server with a performance issue needs fast triage in the first minute. Core commands reveal load, memory, CPU, disk, network, and process bottlenecks.
Understanding grid sizes of (SVG) icons
SVG icons stay crisp only when their viewBox grid matches the rendered size; odd scaling triggers antialiasing, blur, and thicker strokes.