Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |
var Promise = function(wrappedFn, wrappedThis) { | |
this.then = function(wrappedFn, wrappedThis) { | |
this.next = new Promise(wrappedFn, wrappedThis); | |
return this.next; | |
}; | |
this.run = function() { | |
wrappedFn.promise = this; | |
wrappedFn.apply(wrappedThis); | |
}; |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Follow the instructions at http://cygwin.com/install.html. You will run an executable called setup.exe
which will guide you through the installation. You will eventually arrive at a screen where you can select the packages you want to install. Be sure to install Ruby (its under Interpreters/ruby
).
Once Cygwin has finished installing packages, it will offer to create icons for you. You can click on these icons to start up a terminal session, so select what ever is convenient for you.
Once installation is complete, start a terminal session.
Confirm that ruby is installed by typing this at the prompt:
// 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 | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
// (c) copyright unscriptable.com / John Hann | |
// License MIT | |
// For more robust promises, see https://github.com/briancavalier/when.js. | |
function Promise () { | |
this._thens = []; | |
} | |
Promise.prototype = { |