CSS3 Pie: Element not properly redrawn

PIE may fail to redraw nested elements when a parent class changes, leaving updated styles stale; changing the target element’s own CSS or markup works around it.

JavaScript Garden

JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes, subtle bugs, as well as performance issues and bad practices that non-expert JavaScript programmers may encounter on their endeavours into the depths of the language.

JavaScript Garden does not aim to teach you JavaScript. Former knowledge of the language is strongly recommended in order to understand the topics covered in this guide

RSpec matcher to check if an ActiveRecord exists in the database

Custom RSpec matcher verifies whether an ActiveRecord record still exists in the database after destruction or cleanup.

Setup (and secure) an SSH server on Ubuntu

Install and harden an SSH daemon on Ubuntu by adjusting sshd_config to block root logins, restrict users, and disable password authentication.

Common VIM commands

Core vim actions for editing text efficiently: window, buffer, navigation, search, clipboard and undo shortcuts plus syntax highlighting.

Mocks and stubs in Test::Unit when you are used to RSpec

Test::Unit lacks built-in mocks and stubs; Mocha adds them and maps common RSpec double, stub, and expectation patterns to mock, stubs, and expects.

Find records with a Range condition

Use a Range in ActiveRecord conditions to query between two values, not just match lists; scopes built on condition hashes work with ranges too.

Directly search makandra notes from the Firefox address bar

Firefox can search makandra notes directly from the address bar by adding the site search to a keyword shortcut.

Alternative to url_for's deprecated :overwrite_params option

Rails 2.3.10 deprecation warning for url_for :overwrite_params when generating links with replaced query values. params.merge supplies the full parameter set and avoids the warning.

Output the descriptions of RSpec examples while they are running

RSpec’s nested documentation format prints example descriptions while specs run, making warnings and failures visible immediately and giving a quick view of core behavior.

Speed up response time in development after a Sass change

Large Sass files delay the first request after edits because CSS is compiled on demand; watching files and compiling ahead of time removes the startup lag.

Delete all MySQL records while keeping the database schema

Clear MySQL data without dropping tables, useful after bad migrations or frozen tests. DatabaseCleaner truncation keeps the schema intact and can be wrapped in a Rake task.

Synchronize a Selenium-controlled browser with Capybara

Selenium actions can return before a page finishes loading, so Ruby updates may race with browser-side changes. A Capybara resynchronization step prevents flaky Cucumber features.

Monitoring Theory

Around the time in my life when I stopped ordering drinks made with more than one ingredient, I was woken up for the last time by a hypochondriac Nagios monitoring installation. If you are on-call long enough, you cultivate a violent reaction to the sound of your cell phone's text message alert. If your monitoring is overconfigured, that reaction boils over hastily, as it will interrupt you during meals, sex, sleep — all of the basics — with the excruciating operational details of your web site.

I've since developed, with the help of some n...

plus2/whereuat - GitHub

Adds a slide out panel to your Rails application that directs clients to test stories that have been marked as 'delivered' in Pivotal Tracker.

Prevent floating sibling elements from wrapping in CSS

Floating sibling blocks line up horizontally but wrap at the container edge; a very wide inner wrapper keeps them on one line without visible overflow.

Unexpected behavior when changing both an association and its foreign key attribute in ActiveRecord

Changing an association and its foreign key on the same ActiveRecord object can lose the later assignment; the association value wins on save.

Remove quotes from Sass mixin arguments

Quoted Sass mixin arguments can produce invalid CSS for multi-part values like box-shadow. unquote removes the quotes so generated properties stay valid.

Check that a Range covers an element in both Ruby 1.9 and 1.8.7

Range#include? becomes slow for non-numeric ranges in Ruby 1.9, while Range#cover? is unavailable in 1.8.7. A compatibility method keeps one check working across both versions.

Fix Capistrano with RubyGems 1.6

RubyGems 1.6 can break Capistrano by activating incompatible net-ssh versions; isolating Capistrano in a dedicated Bundler Gemfile restores deployment commands.

Keyboard shortcuts for Pivotal Tracker

Pivotal Tracker supports keyboard shortcuts for quick navigation, search, help, story creation, and toggling backlog, charts, current, done, history, icebox, my work, and labels.

Fixing "uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)"

RubyGems 1.6.0 can break Rails 2.x with ActiveSupport::Dependencies::Mutex NameError during startup; loading thread before boot.rb prevents the failure.

Convert Adobe Flash FLA files into HTML5 with Wallaby

Wallaby converts artwork and animation from Adobe Flash Professional FLA files into HTML for wider reach on devices without Flash runtime support.

Check whether a getter is an attribute or an association

Distinguish between a simple attribute and an associated object in Person; reflect_on_association lets code branch when a getter refers to a relation.