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.
If you want to perform a failover on another haproxy backend server this is the way you should do it...
This will give the target site full access to your Javascript environment through window.opener, if the target is on the...
Let's say you want to find the element with the text hello in the following DOM tree: hello
Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...
Angular's directives have a transclude option, that allows for rendering an element's original content within the directive's...
A HTTP 302 Found redirect to PATCH and DELETE requests will be followed with PATCH or DELETE. Redirect responses to...
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
Until recently, you could open a new tab via window.open when using execute_script in Selenium tests. It no longer...
Regular expressions in Javascript are represented by a RegExp object. There also is a regex literal as in many other...
MutationObserver provides developers a way to react to changes in a DOM. Any: insertion, deletion, attribute change – anything. Quickstart: https://...
You can configure a stat socket for haproxy in the global section of the configuration file: global daemon
After restarting an OpenStack host you may encouter problems with missing iptables rules (we're on an quite old release...
Note This card does not reflect the current state of lazy loading technologies. The native lazy attribute could be used...
While you usually do not need a Content-Type on GET request (which have a blank body), an external API...
Sometimes you want to know exactly how many objects exist within your running Ruby process. Here is how: stats = {} ObjectSpace.each...
You want to test your 1GE or 10GE internet uplink? We needed to ensure we have full 10GE to the...
You can say this in Javascript: $.fn.jquery => "1.11.1"
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...
What is a Cookie? Google it if you do not know. How are cookies transferred between your browser and...