Skip to content

Instantly share code, notes, and snippets.

View fouvy's full-sized avatar
🎯
Focusing

William Fouvy fouvy

🎯
Focusing
View GitHub Profile
@fouvy
fouvy / gist:f04ee00cd485134a4663
Last active August 29, 2015 14:16
redis.conf and command set init.d for centos
######### redis.conf change
# set daemonize to yes
daemonize yes
# set log file
logfile "/opt/log/redis/redis.log"
# set db file path
dir /opt/lib/redis/
######### redis.conf change end
######## privilege set
@fouvy
fouvy / gist:094adb0d775399647813
Created March 6, 2015 05:50
Redis init.d for centos
#!/bin/sh
#
# redis Startup script for Redis Server
#
# chkconfig: - 90 10
# description: Redis is an open source, advanced key-value store.
#
# processname: redis-server
# config: /etc/redis/redis.conf
# pidfile: /var/run/redis.pid
Returning to St. Petersburg, Tolstoy was received with great favor in both the official and literary circles of the capital.
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};