postgresql.org

PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...

nateberkopec.com

rack-mini-profiler is a powerful Swiss army knife for Rack app performance. Measure SQL queries, memory allocation and CPU...

makandra dev

When you're using feature branches, they will stack up if you don't delete them after the merge to...

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

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

unix.stackexchange.com

As described by the linked Stackoverflow answer, run these commands: sudo add-apt-repository ppa:git-core/ppa -y

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

makandra dev
stackoverflow.com

When there's a Gemfile.lock in your working directory that you cannot remove by either checkout, reset [--hard], stash, probably...

github.com

Live markdown previewer (with Github flavored syntax) for VIM. Will open a preview in your browser and update automatically on...

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

makandra dev
github.com

Note This card does not reflect the current state of lazy loading technologies. The native lazy attribute could be used...

Lead by a discussion of this issue, I built in a middleware which answers those requests with [400] bad request...

While you can use Apache as a reverse proxy, it tries to be too smart. Try nginx instead, it's...

stackoverflow.com

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

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...

postgresql.org

PostgreSQL's array data type is pretty useful, but manipulating values of arrays can be awkward because of its syntax...

Rails 4 introduced raising an error on pending migrations. This is most annoying when you are crafting a migration but...

What is a Cookie? Google it if you do not know. How are cookies transferred between your browser and...

The asset pipeline is one of Rails' two mechanisms how stylesheets, javascripts and images from your /assets folder are processed...

Some tasks in a web application are better not done live when a user request a page, but in the...

github.com

When a method has keyword arguments, Ruby offers implicit conversion of a Hash argument into keyword arguments. This conversion is...

Starting with Rails 4.0, when you get an exception reported via the ExceptionNotification gem, you will only see a very...

github.com

Rails 5 will introduce ActiveRecord::Relation#or. On Rails 4 and 3.2 you can use the activerecord_any_of gem...