This file contains hidden or 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
| // Destroys the localStorage copy of CSS that less.js creates | |
| function destroyLessCache(pathToCss) { // e.g. '/css/' or '/stylesheets/' | |
| if (!window.localStorage || !less || less.env !== 'development') { | |
| return; | |
| } | |
| var host = window.location.host; | |
| var protocol = window.location.protocol; | |
| var keyPrefix = protocol + '//' + host + pathToCss; |
This file contains hidden or 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
| /** | |
| * jQuery.support.cssProperty | |
| * To verify that a CSS property is supported (or any of its browser-specific implementations) | |
| * | |
| * @param string p - css property name | |
| * [@param] bool rp - optional, if set to true, the css property name will be returned, instead of a boolean support indicator | |
| * | |
| * @Author: Axel Jack Fuchs (Cologne, Germany) | |
| * @Date: 08-29-2010 18:43 | |
| * |
This file contains hidden or 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
| // Ghetto fabulous template system for replacing values in strings. If {{.foo}} | |
| // or {{.bar[0].baz}} is encountered (leading . or ( or [ char), attempt to | |
| // access properties of data object like `data.foo` or `data.bar[0].baz`. | |
| // Alternately, if {{foo}} or {{bar("baz")}} is encountered (no leading dot), | |
| // simply evaluate `foo` or `bar("baz")`. If an error occurs, return empty | |
| // string. Oh yeah, you have to pass the result of ghettoTmpl to eval. :) | |
| function ghettoTmpl(data, str) { | |
| ghettoTmpl._data = data; | |
| ghettoTmpl._str = str; |
This file contains hidden or 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
| /* Ismael Celis 2010 | |
| Simplified WebSocket events dispatcher (no channels, no users) | |
| var socket = new ServerEventsDispatcher(); | |
| // bind to server events | |
| socket.bind('some_event', function(data){ | |
| alert(data.name + ' says: ' + data.message) | |
| }); |
This file contains hidden or 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
| # Free RESTful interface for your Ruby objects with Rackable | |
| # http://github.com/madx/rackable/tree/master | |
| # | |
| # + Free HTTP caching with rack-cache | |
| # http://github.com/rtomayko/rack-cache/tree/master | |
| require 'rackable' | |
| require 'rack/cache' | |
| APP_ROOT = File.dirname(__FILE__) |
NewerOlder