Skip to content

Instantly share code, notes, and snippets.

Philzen

  • Northern Germoney / Denmark / Planet Earth
Block or report user

Report or block Philzen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Philzen
Philzen / node-uptime.sh
Created Jul 28, 2014
Daemonize uptime with forever on FreeBSD
View node-uptime.sh
#!/bin/sh
# PROVIDE: node_uptime
# REQUIRE: NETWORKING SERVERS DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
. /etc/rc.subr
name="node_uptime"
View Grunt-Cordova-CLI.md

Grunt and Cordova 3

The advantages of using Grunt with Cordova:

  1. It simplifies working with the cordova cli.
  2. It provides a mechanism to copy platform customization to the platforms directory without having to commit the generated plugins and platforms directories to version control.
  3. It provides a way to watch resources and automatically run cordova commands.
@Philzen
Philzen / requestAnimationFrame Polyfill (by calormen)
Created Feb 18, 2013
This is a sandbox to test the requestAnimationFrame Polyfill as offered by http://www.calormen.com/polyfill/. Mainly targeting Webkit 533.1 in order to gain some form of rendering framerate control on android 2 devices.
View requestAnimationFrame Polyfill (by calormen)
// requestAnimationFrame
// http://www.w3.org/TR/animation-timing/
(function() {
var TARGET_FPS = 60,
requests = {},
raf_handle = 1,
timeout_handle = -1;
function isVisible(element) {
return element.offsetWidth > 0 && element.offsetHeight > 0;
@Philzen
Philzen / RequestAnimationFrame Shim (List-Based)
Last active Dec 13, 2015 — forked from jonasfj/rAF.js
This is a sandbox to understand the list-based approach as put forward by @jonasfj. Mainly targeting Webkit 533.1 in order to gain some form of rendering framerate control on android 2 devices.
View RequestAnimationFrame Shim (List-Based)
// 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
// list-based fallback implementation by Jonas Finnemann Jensen
(function() {
var vendors = ['ms', 'moz', 'webkit', 'o'];
@Philzen
Philzen / requestAnimationFrame Polyfill (the "original")
Last active Dec 13, 2015 — forked from paulirish/rAF.js
This is a sandbox to test the original requestAnimationFrame Polyfill as proposed by @paulirish. Mainly targeting Webkit 533.1 in order to gain some form of rendering framerate control on android 2 devices.
View requestAnimationFrame Polyfill (the "original")
// 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
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
You can’t perform that action at this time.