Arel is a library that was introduced in Rails 3 for use in constructing SQL queries. Every time you pass...
class Book::Page end class MyBook < Book def new_page Page.new # has to be `Book::Page` in development to...
Ask before leaving an unsaved CKEditor Vanilla JavaScript way, but removes any other onbeforeunload handlers: $(function(){ document.body.onbeforeunload = function() { for(editorName...
"Redis Desktop Manager (aka RDM)— is a cross-platform open source Redis DB management tool (i.e. Admin GUI). Redis Desktop...
At TaskRabbit, we have gone through a few iterations on how we make our app(s). In the beginning, there...
When you are working with Backbone models and inheritance, at some point you want to overwrite inherited methods but call...
Sometimes you have a test expectation but actually want a better error message in case of a failure. Here is...
This is just a quick note, mostly for my own reference, of a few ways to easily delete the dot...
RulersGuides.js is a Javascript library which enables Photoshop-like rulers and guides interface on a web page Also available as...
If you have a text that is edited by WSYIWYG-Editor but want some length checking nevertheless, you need to...
Sometimes you want to strip a text of every special char. If you use \W, the result might not be...
Mornings can be rough. To make them a little easier, leave yourself a failing test if your work isn’t...
After I upgraded to Mac OS X Mavericks, I regularly got this error message when running Cucumber features with Selenium...
Warning: Because of (unclear) rounding issues and missing decimal places (see examples below), do NOT use this when dealing with...
If you recorded a bad fix for a conflict, you can tell git to forget that bad resolution:
Non-static elements will not inherit their parent's opacity in IE for no good reason. This can lead to...
Rails 4.0 introduced a helpful new method for ActiveRecord queries: where.not. It can make clunky queries easier to read.
Introducing Trailer from HouseTrip, a simple menu bar app that helps you manage your GitHub pull requests. It’s one...
If you want to switch to another ruby versions, you have several options, depending on what you want: Do you...
Crazy hack. Might be useful one day. The code required has since been extracted into a library.
Colorizes code in LibreOffice Writer. Note that you need to create a paragraph style _code for this to work.
I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...
pngquant is a command-line utility and a library for converting 24/32-bit PNG images to paletted (8-bit) PNGs.
A MySQL DECIMAL column is used when it is important to preserve exact precision. It takes two parameters, where...