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
<html ng-app="test"> | |
<head> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.1/angular.min.js"></script> | |
<script type="text/javascript" src="https://cdn.firebase.com/v0/firebase.js"></script> | |
</head> | |
<body ng-controller="Test"> | |
<script typ="text/javascript"> | |
function TestController($scope, $q) { | |
this._q = $q; | |
this._scope = $scope; |
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 db = new Firebase('https://demo.firebaseio.com') | |
var authenticate = (function(db) { | |
var loggedIn, | |
deferred = $.Deferred() | |
var client = new FirebaseAuthClient(db, function(err, user) { | |
loggedIn = !!user | |
if (err) { |
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
/** | |
* WRLLoader class | |
*/ | |
class WRLLoader { | |
/** | |
* load method | |
* @returns {Promise} | |
*/ | |
load(path) { | |
const xhr = new XMLHttpRequest(); |
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
# BEGIN ROUTING | |
Options -MultiViews | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^ index.html [QSA,L] | |
# END ROUTING |
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
_.deburr("déjà vu"); | |
// -> deja vu | |
_.deburr("Juan José"); | |
// -> Juan Jose |
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
[ | |
{ "key": "ctrl+1", "command": "workbench.action.focusFirstEditorGroup" }, | |
{ "key": "ctrl+2", "command": "workbench.action.focusSecondEditorGroup" }, | |
{ "key": "ctrl+3", "command": "workbench.action.focusThirdEditorGroup" }, | |
{ "key": "cmd+1", "command": "workbench.action.openEditorAtIndex1" }, | |
{ "key": "cmd+2", "command": "workbench.action.openEditorAtIndex2" }, | |
{ "key": "cmd+3", "command": "workbench.action.openEditorAtIndex3" }, | |
{ "key": "cmd+4", "command": "workbench.action.openEditorAtIndex4" }, | |
{ "key": "cmd+5", "command": "workbench.action.openEditorAtIndex5" }, | |
{ "key": "cmd+6", "command": "workbench.action.openEditorAtIndex6" }, |
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
static UIImage * UIImageForSwatchOfColorWithSize(UIColor *color, CGSize size) { | |
UIImage *image = nil; | |
CGRect rect = CGRectMake(0.0f, 0.0f, size.width, size.height); | |
UIGraphicsBeginImageContext(rect.size); | |
{ | |
CGContextRef c = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(c, [color CGColor]); |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.html$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.html [L] | |
</IfModule> |
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 moment = require('moment'); // http://momentjs.com/docs/ | |
var _ = require('lodash'); // https://lodash.com/docs | |
function(collectionsWithDateValues){ | |
var slots = []; | |
var hours = { | |
start: 7, // 7am | |
end: 21, // 9pm | |
window: 2 // How long each item should be slotted for. | |
}; |
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
//** In web app **// | |
var current = constants.STATE_WAITING; |
OlderNewer