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

Sometimes you just want to have a small web server that serves files to test something. Serve the current directory...

When you're developing a gem, never list the same dependency as both runtime and development dependency in your .gemspec...

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|

While you usually do not need a Content-Type on GET request (which have a blank body), an external API...

makandra Operations

Sending a testmail from a server with a configured exim is easy as pie. From your usershell: tell exim that...

makandra dev
stackoverflow.com

Ruby has a set of methods to convert an object to another representation. Most of them come in explicit and...

makandra dev

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

makandra dev

Installing SSL certificates usually implies additionally using intermediate certificates. If one of them is missing, some SSL client implementations might...

makandra dev

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

postgresql.org

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

makandra dev

Our applications not only need to be functional, they need to be fast. But, to quote Donald Knuth, premature optimization...

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

stackoverflow.com

Some browsers define window.event, which will return a copy of the "current" event. However, this is not defined by the...

makandra Curriculum

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

makandracards.com

Writing ruby methods that accept both optional and keyword arguments is dangerous and should be avoided. This confusing behavior will...

This is a guide on how to effectively use Git when working on a feature branch. It is designed to...

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

makandra dev
csstriggers.com

I figure we needed a definitive reference for what work is triggered by changing various CSS properties. It's something...

blog.intercom.io

A fantastic guide for a dilemma facing any web-based product. Here’s a simple set of Yes/No questions that...

ma.ttias.be

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