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
extends layout | |
prepend page | |
- title = "Home" | |
block body | |
p This is the \#{title} page |
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
// Author: Darren Schnare | |
// Keywords: javascript,interpolation,string,ruby | |
// License: MIT ( http://www.opensource.org/licenses/mit-license.php ) | |
// Repo: https://gist.github.com/gists/3886395 | |
String.prototype.interpolate = function (o) { | |
return this.replace(/#\{(.+?)\}/g, function ($0, $1) { | |
with (o) { | |
return eval($1); | |
} | |
}); |
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
// Author: Darren Schnare | |
// Keywords: javascript,equality,testing,equals,object | |
// License: MIT ( http://www.opensource.org/licenses/mit-license.php ) | |
// Repo: https://gist.github.com/1251001 | |
// Creates an equals function within the specified scope. | |
(function(scope) { | |
// Determines if two objects have the same values. This is a | |
// recursive test that tests all objects through out the object | |
// tree. |
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
// Author: Darren Schnare | |
// Keywords: aop,aspect,oriented,programming,javascript,pointcut | |
// License: MIT ( http://www.opensource.org/licenses/mit-license.php ) | |
// Repo: https://gist.github.com/1235559 | |
// Inspiration: http://karlagius.com/2008/04/25/aspect-oriented-programming-in-javascript/ | |
// Reference: http://docs.jboss.org/jbossaop/docs/2.0.0.GA/docs/aspect-framework/reference/en/html/advices.html | |
// Reference: http://static.springsource.org/spring/docs/2.0.x/reference/aop.html | |
// Appends the aop namespace to the specified scope (defaults to global). |
NewerOlder