Skip to content

Instantly share code, notes, and snippets.

@asacarter
asacarter / readme.md
Last active April 11, 2019 12:31
Install Redis from source on Alpine
apk --force --no-cache  add procps
apk --force add linux-headers
apk —-force add --update alpine-sdk

cd ~
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
@asacarter
asacarter / recently.js
Last active December 9, 2015 17:01
Recently jQuery Plugin
// timer function that loops through an array within a given interval
$.timer = function (list, callback, time/*, onFinish, index*/) {
var onFinish = arguments.length > 3 ? arguments[3] : void 0,
index = arguments.length > 4 ? arguments[4] : 0;
if (index < list.length) {
callback.call(this, index, list[index]);
list.__timed = setTimeout(function() {
$.timer(list, callback, time, onFinish, ++index);
}, time);
$(function() {
$('#example').dataTable({
processing: true,
serverSide: true,
ajax: {
url: API_URL + '?action=search_data',
data: function (d) {
d.key = 'value';
}
}