Skip to content

Instantly share code, notes, and snippets.

View Philzen's full-sized avatar

Philzen

  • Northern Germoney / Denmark / Planet Earth
View GitHub Profile

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 Shim (List-Based)
Last active December 13, 2015 20:59 — 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.
// 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 December 13, 2015 20:28 — 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.
// 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) {