Some modern Javascript APIs return iterators instead of arrays. In plain Javascript you can loop through an iterator using

To upload a file via AJAX (e.g. from an ) you need to wrap your params in a FormData object.

makandra dev

Cause logstaglia is so cool you may want to record a video. We're lucky: Logstalgia has a parameter for...

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

E-mails are usually encoded using Quoted Printable. Here is how to decode or encode such strings. You probably know...

makandra dev
serverfault.com

Logging tcpdump output all the time can create a huge amount of data. This can be both: too much data...

After restarting an OpenStack host you may encouter problems with missing iptables rules (we're on an quite old release...

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

You may encounter problems with passenger starting an application with an updated rails. If you find an error like this...

makandra dev

Each time thin boots, it prints a boot message : Thin web server (v1.6.3 codename Protein Powder) Maximum connections set to...

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

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

You might wonder about this request in your test.log: Started GET "/__identify__" for 127.0.0.1 at 2015-04-29 18:00...

edgeapi.rubyonrails.org

Starting from Rails 4.0, you can use a special form options helper called #collection_check_boxes. It behaves similar to...

There are some frontends available, but they all suck, are no longer maintained or are hard to install.

If you need to log to a file you can use Ruby's Logger class: require 'logger'

This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process...

developer.mozilla.org

You can do so much more than console.log(...)! See the attached link for a great breakdown of what the developer...

If you want a class-like construct in JavaScript, you can use the module pattern below. The module pattern gives...

gist.github.com

A nice bookmarklet to analyze how many watchers have been registered on the current page. Good for keeping an eye...

makandra dev
github.com

PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...

Open a MySQL root shell and use this command: PURGE BINARY LOGS BEFORE DATE(NOW() - INTERVAL 3 DAY) + INTERVAL 0...

This card describes how to pass an array with multiple element to a JavaScript function, so that the first array...

guides.rubyonrails.org

config.action_controller.action_on_unpermitted_parameters enables logging or raising an exception if parameters that are not explicitly permitted are...