There are cases when you need to select DOM elements without jQuery, such as: when jQuery is not available

In Ruby 2.3 you can use <<~ instead of <<- to automatically remove indentation from a HEREDOCs: str = <<~MESSAGE Hello Universe!

The nokogiri gem provides different packages for several platforms. Each platform-specific variant ships pre-built binaries of libxml2, e.g...

CSS4 comes with :has. E.g. h1:has(b) would select all tags that contain a tag. This is implemented in...

E-mails are usually encoded using Quoted Printable. Here is how to decode or encode such strings. You probably know...

Regular expressions in Javascript are represented by a RegExp object. There also is a regex literal as in many other...

github.com

You know that Devise offers RSpec test helpers for controller specs. However, in request specs, they will not work.

This looks like it is safe to use: 2.2.1 :001 > a = b = "hello world" "hello world" 2.2.1 :002 > a

I recommend to go straight to 2.1.5+ without intermediate steps. Otherwhise you burden yourself with unnecessary work of encoding problems...

Cucumber raises a Cucumber::Ambiguous if more than one step definitions match a step. Our new cucumber_priority gem provides...

Ruby has the class Proc which encapsulates a "block of code". There are 2 "flavors" of Procs: Those with "block...

ruby-doc.org

This class contains nerdcore things such as disassembling a piece of Ruby into VM calls or enabling tail-call optimization...

From time to time, RubyMine suddenly did not accept any keyboard input and felt crashed, while mouse interaction was still...

mail-tester.com

You can use mail-tester.com to check your application's e-mails for issues that might cause e-mails to be...

github.com

Ag (aka "the silver searcher") is a very fast replacement for grep. It will parse your .gitignore for additional speedup...

Sometimes you just want to have a small web server that serves files to test something. Serve the current directory...

stackoverflow.com

There are many solutions, but a very concise one is this: hash.merge!(hash) do |key, old_value, new_value|

Sometimes you want to know exactly how many objects exist within your running Ruby process. Here is how: stats = {} ObjectSpace.each...

By pressing Ctrl + Shift + V you can select a recently copied string for pasting.

bugs.ruby-lang.org

This is basically Ruby-native syntax for andand.

stackoverflow.com

Ruby has a set of methods to convert an object to another representation. Most of them come in explicit and...

When you make a simple TCP connection to a remote server (like telnet), your client won't normally notice when...

You want to test your 1GE or 10GE internet uplink? We needed to ensure we have full 10GE to the...

When dealing with AR scopes, you can remove conditions, order, etc by using the unscope method. It is available on...