This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- Compiling --- | |
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
$ tar xzvf redis-2.8.3.tar.gz | |
$ cd redis-2.8.3 | |
$ make | |
$ make install | |
// --- or using yum --- | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a setTimeout and setInterval to HTMLElement. The setTimeout and setInterval remove themselves if the element is removed. | |
// Another possible implementation: global service. | |
HTMLElement.prototype.setTimeout = function (callback, calltime) { | |
var current_element = this | |
function is_attached (obj) { | |
while (true) { | |
obj = obj.parentNode | |
if (obj == document.documentElement) return true | |
if (obj == null) return false | |
} |