Get compiled code of a view template in Rails 4.2

Inspecting the generated Ruby for erb or haml templates helps debug rendering issues and understand what Rails executes. lookup_context.find_template and the template handler return the compiled output code.

Stackprof - sampling call-stack profiler for ruby

Fast Ruby profiling by sampling stack traces at intervals, suitable for production and CPU-focused performance analysis with raw dump inspection.

How to fix routing error when using concerns in Rails up to 3.2.22.1

Routing error in Rails 3.2.22.1 can appear when concerns is passed as an option to resources, producing broken routes and failed controller specs.

Linux: How To Fix Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release : chrome

Chrome no longer supports 32-bit Linux builds, which can break apt-get update with a repository Release fetch error. Updating the APT source to amd64 avoids the failure.

nginx: How to drop connections for a location

return 444 makes nginx close a connection without sending a response, useful for rejecting specific routes or simulating dropped requests behind a reverse proxy.

Capybara: Find the innermost DOM element that contains a given string

Finding a matching text node in nested DOM trees is tricky because broad text queries return ancestor elements too. Selecting the deepest element avoids false matches in Capybara, XPath, and jQuery.

How to reverse the order of HTML elements with CSS

Reversing element order with CSS helps make inline lists stack in a different visual order on small screens without changing the markup.

netstat: Sum open connections by IP (and sort it)

Count network connections by remote IP and sort them to spot hosts with many open or lingering sessions. Works on FreeBSD and Linux using netstat and shell tools.

Google Analytics Debugger

Chrome extension for inspecting Google Analytics tracking in complex setups. Opens in the developer console and stays lighter than broader tag-assistance tools.

djberg96/sys-filesystem: A Ruby library for getting filesystem information

Cross-platform filesystem metrics are awkward to gather in Ruby; sys-filesystem uses FFI to provide them without parsing df output.

One-liner syntax in RSpec's should-based and expect-based syntaxes

RSpec one-liners can assert expectations on subject with implicit example descriptions, using should or is_expected in expect-based syntax.

Testing state_machine callbacks without touching the database

Testing state transition callbacks without database writes requires isolating callback methods from the event itself. spec_candy offers helpers to exercise them directly.

Custom transclusion with Angular

Angular directives can project original content into a template, and the transclusion function allows custom processing before insertion into the DOM.

record a logstalgia video

Logstalgia can export a PPM stream for recording a synchronized H.264 video through ffmpeg or avconv.

Git: auto-stashing to avoid conflicts on pull

Local changes can block git pull --rebase; automatic stashing saves and reapplies them around the pull, but conflicts may still occur.

Bundler: Install gems behind a proxy

Bundler needs network access to api.rubygems.org; behind a proxy, https_proxy or http_proxy lets bundle install fetch gems and deploy with Capistrano.

Useful tricks for logging debugging information to the browser console

Safer browser console logging makes debugging easier: %o interpolation keeps values readable, and object shorthand lets structured data expand interactively.

How to generate a Rails-compatible query string

Rails hashes can be turned into URL query strings with Hash#to_query; browser-side nested objects can be serialized with jQuery $.param.

Vertical align anything with just 3 lines of CSS

Center any element vertically with a compact CSS pattern using position, top: 50%, and transform: translateY(-50%); it works across modern browsers and IE9+.

NoMethodError: undefined method `cache' for Gem:Module

Rails 2.3 tests can fail with NoMethodError: undefined method 'cache' for Gem:Module when used with newer RubyGems; downgrading RubyGems restores generator lookup behavior.

Geordi 1.3 released

Geordi 1.3 adds Cucumber support with @solo handling, Capistrano 2/3 deployment fixes, and updated Firefox setup for selenium testing.

ActiveRecord meets database views with scenic

Use SQL views in a Rails app without switching the schema format to SQL; Scenic adds versioned, reversible migrations and keeps view definitions in SQL files.

Marvel | Elastic

Dashboard and query tools for Elasticsearch provide local access to Kibana and Sense through Marvel plugins.

bash: print columns / a table

column aligns delimited text into readable tables in bash, making pipe-separated output and other simple listings easy to format.