To upload a file via AJAX (e.g. from an ) you need to wrap your params in a FormData object.
The following sums up all connections (ESTABLISHED, TIME_WAIT, FIN_WAIT, etc.) and sorts it: netstat -n | awk ' $5 ~ /^[0...
Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...
Cause logstaglia is so cool you may want to record a video. We're lucky: Logstalgia has a parameter for...
Note The maintenance mode is enabled on all application server as soon as the file /public/system/maintenance.html is present. Installation
There are cases when you need to select DOM elements without jQuery, such as: when jQuery is not available
E-mails are usually encoded using Quoted Printable. Here is how to decode or encode such strings. You probably know...
Regular expressions in Javascript are represented by a RegExp object. There also is a regex literal as in many other...
Activate VI mode by running set -o vi Now use your Bash as if it were VI! Hit Esc to...
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...
Starting with Ruby 1.9, most #each methods can be called without a block, and will return an enumerator. This is...
This is how you regain disk space from OpenStack instances if you are using kvm and qcow. If your instance...
With ngAnimate, you can easily animate certain events (see directive support). We'll make use of ngClass animations to style...
We organize our daily work with issues in our Linear workspace. Issue format A good issue needs to be precise...
To update your Rubygems to the latest available version, type the following: gem update --system Note that you have a...
On Ruby 1.9+, standard ruby character classes like \w, \d will only match 7-Bit ASCII characters: "foo" =~ /\w+/ # matches...
If you are writing any amount of Javascript, you are probably using closures to hide local state, e.g. to have...
When you register a delegated event using on (or the deprecated delegate / live), it is somewhat hard to manually trigger...
If you want to grow a Ruby Array, you might find out about #fill but it is not really what...
When ending a Selenium test Capybara resets the browser state by closing the tab, clearing cookies, localStorage, etc.
Often times you want to give a bunch of elements the same style, except for the last. For example borders...
Write a // and indent every subsequent line by two spaces. This is great for documenting BEM blocks! // An action button...
When a CSS3 animation makes the animated element flicker, it may well be due to pixel fragments being handled differently...