This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function apply(handler, args) { | |
return handler.apply(null, args); | |
} | |
function toArray(collection) { | |
return [].slice.call(collection); | |
} | |
function reverse(collection) { | |
return toArray(collection).reverse(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Compare two characters | |
// | |
// returns 0 if equal, -1 if x is before y, 1 otherwise. | |
function compareChars(x, y) { | |
if (x === y) { | |
return 0; | |
} | |
if (x === undefined) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Draw "THE NORTH FACE" thrice half-dome logo | |
* | |
* usage: | |
* THE_NORTH_FACE.draw( | |
* context // canvas.getContext('2d') | |
* x, // x center of the dome | |
* y, // y center of the dome | |
* width, // width of the dome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CanvasRenderingContext2D.renderText extension | |
*/ | |
if (CanvasRenderingContext2D && !CanvasRenderingContext2D.renderText) { | |
// @param letterSpacing {float} CSS letter-spacing property | |
CanvasRenderingContext2D.prototype.renderText = function (text, x, y, letterSpacing) { | |
if (!text || typeof text !== 'string' || text.length === 0) { | |
return; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var | |
container = 'rsr', | |
scale = 1.00, /* TODO: doesn't work atm */ | |
width = 170.48 * scale, | |
height = 203.22 * scale, | |
rsr = Raphael(container, width, height), | |
background, | |
lower, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BonBon+ | |
* | |
* This is an improvement over BonBon CSS3 buttons | |
* | |
* @see: http://lab.simurai.com/css/buttons/ | |
*/ | |
/* Fonts being used */ | |
@import url(http://fonts.googleapis.com/css?family=Droid+Sans:bold+Lobster); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BonBon+ | |
* | |
* This is an improvement over BonBon CSS3 buttons | |
* | |
* @see: http://lab.simurai.com/css/buttons/ | |
*/ | |
/* Fonts being used */ | |
@import url(http://fonts.googleapis.com/css?family=Droid+Sans:bold+Lobster); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* css quiz 8 | |
* http://cssquiz.com/q8-theres-a-fire-starting-in-my-heart | |
*/ | |
div { | |
width: 100px; height: 100px; | |
line-height: 100px; | |
text-align: center; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BonBon+ | |
* | |
* This is an improvement over BonBon CSS3 buttons | |
* | |
* @see: http://lab.simurai.com/css/buttons/ | |
*/ | |
/* Fonts being used */ | |
@import url(http://fonts.googleapis.com/css?family=Droid+Sans:bold+Lobster); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.log = (function (console) { | |
'use strict'; | |
var COUNT = 0; | |
return function () { | |
var args = Array.prototype.slice.call(arguments), | |
line = [++COUNT + ':']; | |
if (typeof console === 'object') { |
OlderNewer