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
/** | |
* Ask user for facebook connect & get the accesstoken | |
* | |
* @param {Object} options | |
* @param {Function} callback | |
* @param {Function} error_handler (optional) | |
**/ | |
function requestFbToken (options, callback, error_handler) { | |
options = _extend({ | |
appId: null, |
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
(function () { | |
var standard_commands, | |
special_commands; | |
standard_commands = { | |
game: {title: 'game settings'} | |
}; | |
special_commands = { |
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
<ul> | |
<li></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
</ul> | |
<select> |
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
<div id="stage"> | |
<div id="char"></div> | |
<div id="wrap"> | |
<canvas id="main" width="900" height="400"></canvas> | |
</div> | |
</div> | |
<div id="debug"></div> |
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
<div class="word"> | |
<div class="square"></div> | |
<div class="square no1"></div> | |
<div class="square no2"></div> | |
<div class="square no3"></div> | |
<div class="square no4"></div> | |
</div> | |
<div class="time"> | |
<div class="square"></div> | |
<div class="square no1"></div> |
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
Drop in replace functions for setTimeout() & setInterval() that | |
make use of requestAnimationFrame() for performance where available | |
http://www.joelambert.co.uk | |
Copyright 2011, Joe Lambert. | |
Free to use under the MIT license. | |
http://www.opensource.org/licenses/mit-license.php |
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
angular.module('myApp') | |
.directive('hljsToJson', [function () { | |
return { | |
restrict: 'EA', | |
scope: { | |
obj: '=hljsToJson' | |
}, | |
template: '<div hljs source="prettyJSON"></div>', | |
link: function postLink(scope, iElm, iAttrs) { | |
var tabWidth = 4; |
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
angular.module('submitIt', []) | |
/** | |
* @ngdoc directive | |
* @description form submission trigger | |
* | |
* @param {boolean} submit-it submit form on `true` | |
* @param {string} si-action submit action(optional) | |
* @param {string} si-method submit method(optional) | |
*/ |
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
function randInt(min,max){ | |
var range = max - min; | |
// it actually does work the other way... | |
// if (range < 0) { throw new RangeError("min must be less than max"); } | |
var rand = Math.floor(Math.random() * (range + 1)); | |
return min + rand; | |
} |
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
Here is a list of scopes to use in Sublime Text 2 snippets - | |
ActionScript: source.actionscript.2 | |
AppleScript: source.applescript | |
ASP: source.asp | |
Batch FIle: source.dosbatch | |
C#: source.cs | |
C++: source.c++ | |
Clojure: source.clojure | |
CSS: source.css |
OlderNewer