Skip to content

Instantly share code, notes, and snippets.

@fojas
fojas / rAF.js
Created May 23, 2012 14:37 — forked from ethertank/rAF.js
requestAnimationFrame / cancelAnimationFrame
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
// little saving...
(function(w, a, b, af, x, lastTime, v) {
var c = "c" + a,
@fojas
fojas / redis-server
Created March 15, 2012 18:57 — forked from tessro/redis-server
A CentOS initscript for Redis
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.redis.redis-server</string>
<key>Program</key>
<string>/usr/local/redis/bin/redis-server</string>
<key>ProgramArguments</key>