In the tradition of our PostgreSQL cheat sheet for MySQL lamers, here is a cheat sheet for Jasmine when you...
You can do so much more than console.log(...)! See the attached link for a great breakdown of what the developer...
This step will pass if the specified select is sorted. Then /^the "(.*?)" select should be sorted$/ do |label, negate|
Chances are you're seeing the warning repeated a lot of times, maybe thousands of times. Here's how to...
If you want a class-like construct in JavaScript, you can use the module pattern below. The module pattern gives...
When using git diff, you might encounter weird characters where umlauts (or any other UTF-8) characters should be. It...
Option 0: Download from the official page (preferred) Open https://googlechromelabs.github.io/chrome-for-testing/ In Section "Stable" > chromedriver / linux64 > Download ZIP from...
One of the many useful features of TextMate is autocompletion of words. If I were in TextMate right now, I...
A great two-part article about various hacks you can use to create great-looking screen designers when you're...
Rails migrations allow you to use a change method whose calls are automatically inverted for the down path. However, if...
Upgrading from Ruby 1.8.7 to 2.1.2 took me an hour for a medium-sized application. It involved hardly any changes...
Firefox 5.0.1, which we were using for most Rails 2.3 projects, does not run on Ubuntu 14.04 any more. Here...
In a JavaScript console, type this: > 9112347935156469760 9112347935156470000 Ooops. And that's not a float! This occurs because JavaScript uses...
JavaScript's NaN ("Not a Number") is hard to compare against. It never equals anything, not even itself:
Since we are using LoDash instead of UnderscoreJS in recent/current projects, you should keep in mind that their syntax is...
We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2...
To avoid n+1 queries, you want to eager-load associated records if you know you need to access them...
PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...
If you want to move an element inside an array, neither JavaScript/ES6+ nor libraries like LoDash offet that natively.
edge_rider is Power tools for ActiveRecord relations (scopes). Please note that some of the functions edge_rider provides have...
You know each_with_index from arrays: ['hello', 'universe'].each_with_index do |value, index| puts "#{index}: #{value}" end
While RSpec 1 and 2 decided that specs inside spec/model are model specs, and those inside spec/features are feature specs...
Spreewald 1.1.0 drops the be_true and be_false matchers in order to be RSpec 3 and Ruby 2 compatible...
Code snippet tested with Rails 2.3 def index # ... if request.xhr? html = render_to_string(:partial => "list", :layout => false) respond_to...