Setting expiry dates for images, JavaScript and CSS
Static asset caching in Rails can be unreliable across browsers; setting expiry headers in Apache or Nginx improves delivery of images, JavaScript and CSS.
Amazon Elastic Transcoder
Cloud-based video transcoding for developers and businesses, with scalable pay-per-use pricing for converting source files into device-friendly playback formats.
Consul: Querying a power that might be nil
Authorization checks stay safe when Power.current is missing, so models can run in consoles, tests, and batch jobs without crashing.
Consul: Dynamically access and query powers for a given name, model class or record
Consul 0.6.1+ adds dynamic power checks by name, model, or record, making generic authorization helpers easier to write.
Memcache: Your cache node may degenerate over time, check your settings
Memcache nodes can degrade after long runtimes as slab allocation becomes tuned to stale access patterns, increasing evictions and lowering hit rates.
Behave.js
Lightweight text-area enhancement for IDE-like code editing, with paired characters, tabs, and indentation behavior in plain text fields.
Prism.js: simple, fast and lightweight syntax highlighting
Lightweight, extensible syntax highlighting for modern web standards, with fast client-side code coloring tested daily in Dabblet.
Geocoding Strategies - Google Maps API
Choosing client-side or server-side Google geocoding affects quota usage, especially in cloud hosting where shared IPs can exhaust fixed daily limits.
Autoplay HTML5 audio in Chrome for Android, Mobile Safari in iOS
Mobile browsers ignore autoplay on <audio> and <video>; playback usually requires a user gesture, but an initial tap can unlock further sounds on the same element.
Phusion Passenger 4 Technology Preview: Out-Of-Band Work – Phusion Corporate BlogPhusion Corporate Blog
Out-of-band work lets long-running tasks run outside the request/response cycle without blocking clients, reducing request latency and avoiding garbage-collection pauses.
daylerees/colour-schemes · GitHub
Color theme files for RubyMine, Sublime Text 2 and other editors; install by copying intellij-themes/*.xml into ~/.RubyMine40/config/colors and restarting RubyMine.
Error: "sylogd: /var/log/authlog : no such file or directory" but the file exists
syslogd can report “no such file” for an existing log file when /etc/syslog.conf contains trailing whitespace or spaces; Solaris requires TAB separators.
RVM: Get rid of your system Ruby
System Ruby can interfere when switching between projects that use RVM; setting a default Ruby version makes RVM ignore the system installation for everyday use.
Geordi: run a capistrano task on all stages
Run a Capistrano command across every known deploy target, including staging and production, with geordi cap or geordi capistrano shortcuts.
Using Apache Benchmark (ab) on sites with authentication
Authenticated pages can be benchmarked with ab by supplying the right session cookies; otherwise login-protected requests fail or measure the wrong content.
Detect effective horizontal pixel width on a mobile device with Javascript
Determining usable horizontal width on mobile is unreliable because device pixels, CSS pixels, and orientation differ across platforms. effectiveDeviceWidth() normalizes screen size with window.orientation and devicePixelRatio.
Git: How to stash with a custom message
Temporary Git changes are hard to identify when stashed frequently; git stash save lets you label them with a custom message.
Ruby: How to ensure a Tempfile's extension
Tempfile may absorb a supplied extension into its generated name, leaving the file without the expected suffix. Passing the basename and extension as an array preserves the extension.
How to get the hostname of the current machine in Rails or a Ruby script
Socket.gethostname returns the current machine’s hostname in Rails or Ruby; hostname is a fallback on Unix-like systems, but may include trailing newline or FQDN.
Consul 0.5.0 is faster for admins, allows to define multiple powers at once
Consul avoids unnecessary queries when a power selects all records, speeding up permission checks for admins. power can now define multiple powers in one block.
Customize tokenization of the MySQL FULLTEXT parser
MySQL FULLTEXT tokenization is hard to tune and can split terms unexpectedly, such as at periods. Normalizing input or moving to Solr can avoid parser limitations.
Fix error: undefined method `desc' for #<Foo::Rake::Taskx1234>
A gem can break on newer Rake versions when it calls desc on Rake::Task; upgrading the gem or pinning rake to 0.8.7 avoids the error.
Fix warning: No secret option provided to Rack::Session::Cookie
Rails with recent Rack versions can emit a session cookie security warning when no secret is configured; locking Rack to 1.4.1 works around the issue.