github.com

Uses FFI and works all relevant operating systems. If you'd try to do it yourself, you'd have to...

Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...

A HTTP 302 Found redirect to PATCH and DELETE requests will be followed with PATCH or DELETE. Redirect responses to...

makandra dev

In JavaScript we often use Immediately Invoked Function Expessions (or IIFEs) to prevent local variables from bleeding into an outside...

During debugging you might pepper your code with lines like these: console.log('foo = ' + foo + ', bar = ' + bar) I recommend to use...

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

github.com

We will use this for new Angular code. Consider the guide in "beta". Things will still refine, but the general...

github.com

When using Sidekiq in your application, you must write thread-safe code. This wiki page also lists gems that are...

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

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

With "attaching an event handler once" you possibly mean one of these two things: Register a function for an event...

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

If you have jQuery code like this: if (condition) { $element.show(); } else { $element.hide(); } ... you can shorten this to: $element.toggle(condition);

makandra dev

Redactor is yet another WYSIWYG editor. It definitely has its weak points, but I want to point out that it...

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

makandra dev

Starting with Ruby 1.9, most #each methods can be called without a block, and will return an enumerator. This is...

ma.ttias.be

Article shows how to make a script that fakes one kind of content when printed with cat, but uses different...

As the web is being used for more and more tasks, expectations rise. Not only should web pages offer rich...

If you have problems installing a gem and get a error collect2: error: ld returned 1 exit status it's...

We organize our daily work with issues in our Linear workspace. Issue format A good issue needs to be precise...

andismith.com

If you need to upgrade code that uses the old jQuery methods bind, delegate, live, unbind and die, the attached...

makandra dev
blog.getbootstrap.com

Moved from Less to Sass. Bootstrap now compiles faster than ever thanks to Libsass, and we join...

It smells. Rethink your code design. Code example with makandra/has_defaults: class Post < ActiveRecord::Base has_defaults tags: [] # field in db...