Current webkit browsers like Chrome and Safari have a special variable in their consoles that refers to the selected DOM...

gist.github.com

The NestedHash class allows you to read and write hashes of any depth. Examples: hash = {} NestedHash.write hash, 'a', 'b', 'c...

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

makandra Operations

If you want to perform a failover on another haproxy backend server this is the way you should do it...

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

makandra dev

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

github.com

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

makandra dev
catonmat.net

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

makandra dev

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

stackoverflow.com

With ngAnimate, you can easily animate certain events (see directive support). We'll make use of ngClass animations to style...

cyberciti.biz

Bash stores the exitcodestatus of piped commands in the environment variable PIPESTATUS So you can just echo ${PIPESTATUS[@]} to get...

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

You have the following HTML structure:

If you want to run Javascript code whenever someone clicks on a ...

..., you...

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

Understand how asynchronous JavaScript works: Read Henning's presentation about asynchronous Javascript (there's also a German video presentation...

If you are writing any amount of Javascript, you are probably using closures to hide local state, e.g. to have...