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.
yujinakayama/transpec: The RSpec syntax converter
Script to migrate test suites from RSpec 2 to RSpec 3, including syntax beyond should and expect.
find out which processes using swap
Identify processes with pages in swap and rank them by VmSwap; swap usage reflects page activity, not total memory pressure.
PostgreSQL: Show size of all databases
List PostgreSQL database sizes in megabytes with pg_database_size, useful for spotting large databases and planning storage.
How to render an html_safe string escaped
Rails treats html_safe strings as already escaped, which can block escaping when safe HTML must be passed through JSON or shown as text. Converting to a plain String restores escaping.
Top 10 Email Developments of 2015
HTML email layout remains fragile, and several 2015 email changes made rendering problems worse rather than better.
rack-mini-profiler - the Secret Weapon of Ruby and Rails Speed
rack-mini-profiler helps spot slow Rack and Rails requests by measuring SQL queries, memory allocation, and CPU time.
Puppet: Delete certificate request
Remove a Puppet certificate request from the certificate authority on the puppetmaster when a node needs to be re-enrolled or cleaned up.
AllThingsSmitty/css-protips
Handy CSS tricks solve common layout and styling problems with concise expressions and modern browser features.
Use jQuery's selector engine on vanilla DOM nodes
Use Sizzle via $.find to select descendants from plain DOM nodes when jQuery collections are unavailable, too slow, or awkward for whole-document work.
WTF Opera Mini?!
Opera Mini leaves many modern front-end features unusable on mobile, especially in markets where it dominates. Practical workarounds help keep sites functional.
Geordi 1.2 released
Geordi 1.2 adds more flexible deploys, better Cucumber reruns and debugging, and reorganized Firefox and VNC command handling.