azimi.me

Interesting hack to move expensive JSON.parse calls out of the main thread.

makandra dev

To change RAM size, VDISK size or VCPU count of an openstack instance you have to use nova resize. You...

Jasmine comes with two matchers that test for equality. The first is toBe: expect(first).toBe(second) toBe passes when...

If you are writing any amount of Javascript, you are probably using closures to hide local state, e.g. to have...

makandra dev
github.com

The Bullet gem is designed to help you increase your application's performance by reducing the number of queries it...

The migration DSL now supports adding and removing foreign keys. They are dumped to schema.rb as well. At this time...

In Capistrano 2, directories in shared_children used to be symlinked to the shared directory during the finalize_update task...

tl;dr: Use event.currentTarget unless you are absolutely certain that you need event.target. Since it hasn't been written down...

leomayleomay.github.io

Your after_commit callbacks will not know about changes, as Rails discards them when committing. The linked article shows a...

Running projects parallel makes some trouble with PDF generation. Use geordi rspec spec to force sequential tests for the whole...

If you see a stacktrace beginning with lines like this: E, [2015-07-16T09:23:10.896146 #23308] ERROR -- : app...

makandra dev
github.com

Sometimes you need to run background jobs that you can't make important guarantees about - they may run out of...

If a SOAP API expects you to call a remote method with arguments of complex types, Savon lets you manually...

makandra dev
zeldman.com

How can a client blame you for a cab driver’s mistake? How can a conference organizer hold you accountable...

makandra dev
getmdl.io

CSS (+ some Javascript) framework, implementing Google's material design for static web pages. Can be used for plain websites without...

In most of our applications, users have their first and last name stored in separate columns. However, specifying them separately...

Disabling auto-complete in login forms is probably a bad idea, since it encourages weak passwords. If you are still...

If you need to follow links, click buttons, etc. using Capybara inside an , you can do it like this:

duri.me

Small web application where you can upload an image (PNG, JPEG, GIF) and generate a base64-encoded version of it...

github.com

When working with ActiveType you will often find it useful to cast an ActiveRecord instance to its extended ActiveType::Record...

Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead.

guides.rubyonrails.org

Starting from 4.1, Rails automatically detects the inverse of an association, based on heuristics. Unfortunately, it does not seem to...

postgresql.org

There is no such thing as a "default order" of rows in database tables. For instance, when you paginate a...

chimera.labs.oreilly.com

HTTP/2 will make our applications faster, simpler, and more robust—a rare combination—by allowing us to undo many of...