View store.js
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
// jshint esnext:true | |
var app = Calendar.App; | |
var busyStore = app.store('Busytime'); | |
var calendarStore = app.store('Calendar'); | |
var eventStore = app.store('Event'); | |
var syncController = app.syncController; | |
View gist:510134
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
/* | |
* Mr.doob's entry for JS1K <http://mrdoob.com/blog/post/703> | |
* @author Mr.doob <http://mrdoob.com/> | |
* extra optimizations by Miller Medeiros <http://blog.millermedeiros.com/> (see comments on source code) | |
*/ | |
( function () { | |
var res = 25, res3 = res * res * res, | |
i = 0, x = 0, y = 0, z = 0, s, size, sizeHalf, |
View js1k-predator_on_acid.js
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
/* | |
* Predator on acid - JS1K submission | |
* - Compress using closure compiler <http://closure-compiler.appspot.com/> | |
* | |
* Released under WTFPL license <http://sam.zoy.org/wtfpl/>. | |
* | |
* @author Miller Medeiros <http://millermedeiros.com/> | |
* @version 0.1 (2010/08/06) | |
*/ |
View isVector.as
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
package rinaldi.util { | |
import flash.utils.getQualifiedClassName; | |
/** | |
* | |
* Just check if an object is a Vector instance or not. | |
* | |
* @param p_object Object to be checked. |
View gist:712798
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
/** | |
* Simple string replacement inspired by Mustache | |
* @param template String to be parsed | |
* @param data Object containing Key -> Value pairs. | |
* @return Formated string | |
*/ | |
function parseTemplate(template : String, data : Object): String { | |
function replaceFn() : String{ | |
var prop : String = arguments[1]; | |
return (prop in data)? data[prop] : ''; |
View gist:773911
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
/** | |
* @param {number} seconds Number between 0 to 359999. | |
* @return {string} Time string on the format 'HH:MM:SS'. | |
* @author Miller Medeiros | |
*/ | |
function formatTime(seconds){ | |
var output = Math.floor(seconds/3600) +':'+ ((Math.floor(seconds/60)%60) ^ 0) +':'+ ((seconds%60) ^ 0); //XOR 0 removes decimal digits | |
return output.replace(/([^0-9]|^)([0-9])(?=[^0-9]|$)/g, '$10$2'); //add zero before single digits | |
} |
View gist:777348
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
/** | |
* Helper methods for WebKit CSS Animations and Transitions | |
* @author Miller Medeiros | |
* @version 0.0.7 (2011/02/06) | |
* @namespace | |
*/ | |
var webkitCSSAnim = { | |
DEFAULT_DURATION : '500ms', | |
View image.js
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
/* | |
* Example #1 : usage example | |
* - Image paths are relative to the HTML file. | |
* - Support absolute paths as well. | |
* - Appending `!bust` to the end of the file name will avoid caching the image. | |
*/ | |
require(['image!lol_cat.gif', 'image!http://tinyurl.com/4ge98jz', 'image!dynamic_image.jpg!bust'], function(cat, awesome, dynamic){ | |
//add loaded images to the document! | |
document.body.appendChild(awesome); | |
document.body.appendChild(cat); |
View build.xml
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
<?xml version="1.0" encoding="utf-8"?> | |
<project name="example-purge-copy" default="" basedir="."> | |
<!-- properties --> | |
<!-- make sure you are pointing to the right folder since purgeDeploy can delete undesired files... --> | |
<property name="deploy.dir" value="../../deploy" /> | |
<!-- custom tasks --> | |
View gist:863421
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
/*jslint onevar:true, undef:true, newcap:true, regexp:true, bitwise:true, maxerr:50, indent:4, white:false, nomen:false, plusplus:false */ | |
/*!! | |
* JS Signals <http://millermedeiros.github.com/js-signals/> | |
* Released under the MIT license <http://www.opensource.org/licenses/mit-license.php> | |
* @author Miller Medeiros <http://millermedeiros.com/> | |
* @version 0.5.3 | |
* @build 143 (02/21/2011 07:18 PM) | |
*/ | |
var signals = (function(){ |
OlderNewer