There are many solutions, but a very concise one is this: hash.merge!(hash) do |key, old_value, new_value|
git rebase -i -> mark your commit with edit git reset HEAD~ (remove the marked commit, but keep its...
One useful postgres command I stumbled upon recently was \x. It gives you an expanded display which allows you to...
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...
Redactor is yet another WYSIWYG editor. It definitely has its weak points, but I want to point out that it...
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...
Web fonts are great. They are also be really bad for front-end performance because they block rendering. You may...
Our applications not only need to be functional, they need to be fast. But, to quote Donald Knuth, premature optimization...
This is a guide on how to effectively use Git when working on a feature branch. It is designed to...
Starting with Ruby 1.9, most #each methods can be called without a block, and will return an enumerator. This is...
Rails 5 will introduce ActiveRecord::Relation#or. On Rails 4 and 3.2 you can use the activerecord_any_of gem...
When working with PostgreSQL, you can use pgAdmin as a GUI. While you can do most things just like on...
To safely transport an arbitrary string within a URL, you need to percent-encode characters that have a particular meaning...
As the web is being used for more and more tasks, expectations rise. Not only should web pages offer rich...
We organize our daily work with issues in our Linear workspace. Issue format A good issue needs to be precise...
When working on a bigger project, the easiest way to improve your work relation with a client or an external...
It smells. Rethink your code design. Code example with makandra/has_defaults: class Post < ActiveRecord::Base has_defaults tags: [] # field in db...
Unfortunately, Web APIs haven’t provided the functionality to copy text to the clipboard through JavaScript, which is why visiting...
Spreewald comes with a selector_for helper that matches an English term like the user's profile into a CSS...
I am happy to announce that this information is now available in JSON form at https://ip-ranges.amazonaws.com/ip-ranges.json. The information...
If you need a postgresql extension for your database it isn't a good idea to give your applications database...
As you most likely know validates_uniqness_of :foreign_id does not allow nil values by default.