opensoul.org

Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy...

stackoverflow.com

Access the Method object Dead simple: Get the method object and ask for its owner: "foo".method(:upcase) # => #

For example if you use rvm and get this message: ERROR: Loading command: install (LoadError) no such file to load...

Consider this class: class Foo private def test puts "Hello" end end While you can say create a block to...

ariejan.net

Rails understands a :limit options when you create columns in a migration. Its meaning depends on the column type, and...

Google Chrome saves your profile data in ~/.config/google-chrome. To transfer the profile to for example a system you have setup...

web.archive.org

TL;DR: You should generally use #size to count associated records. size Counts already loaded elements If the association is...

Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting...

mysqlperformanceblog.com

When MySQL refuses to use your index, there's a number of things that you may be doing wrong. One...

calc() lets you mix CSS units. Ever wanted to give an element "the container's width minus 20px on each...

tl;dr: Do not use merge! for session hashes. Use update instead. Outline Let's assume you're modifying the...

Safari & Chrome Use $x() in your console: $x('//span') # selects all span elements Firefox There's an add-on.

Don't Google this, you will lose all will to live. Instead use Object#isEqual() from Lodash or Underscore.js:

github.com

MongoMapper is a MongoDB adapter for Ruby. We've forked it so it works for Rails 2.3.x applications running...

If you open a pop-up window [1] in your Selenium tests and you want to close it, you can...

gist.github.com

Rails 2.3.16+ on Ruby 1.9 causes warnings like this: .../gems/activesupport-2.3.17/lib/active_support/core_ext/string/output_safety.rb:22: warning: regexp match /.../n against to UTF-8 string...

If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...

If others on a call (Skype, SIP, ...) can not hear you loud enough, your volume levels are probably too low...

You either have an old version of Mocha and an edge version of Rails 3.2, or you have a new...

makandra dev
rails-sqli.org

This page lists many query methods and options in ActiveRecord which do not sanitize raw SQL arguments and are not...

makandra dev
github.com

Stringex is a gem that offers some extensions to Ruby's String class. Ruby 1.9 compatible, and knows its way...

When creating an ActiveRecord with .new, .create or create!, you cannot set the ID attribute (note: When using Machinist's...

w3.org

You probably know that you can use CSS selectors to match against elements and their attributes, such as:

You can use the content CSS attribute to set an element's content -- which is especially useful for the :before...