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 mockFailingAjaxCall = function(){ | |
console.log("doing ajax call"); | |
var asyncSubject = new Rx.AsyncSubject(); | |
asyncSubject.onError(); | |
return asyncSubject.asObservable(); | |
}; | |
Rx.Observable.returnValue(1).select(function () { | |
return Rx.Observable.defer(function() { | |
return mockFailingAjaxCall(); |
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
// Totally abusing LINQPad and the Entity Framework | |
void Main() | |
{ | |
var connection = (System.Data.EntityClient.EntityConnection)this.Connection; | |
var con = connection.StoreConnection; | |
var initState = con.State; | |
try | |
{ |
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
"Some Code Like You" | |
By Felix | |
I heard that you're settled down | |
That you found a task and you're compiling now. | |
I heard that your dreams came true. | |
Guess she gave you cookies I didn't give to you. | |
Never mind, I'll find some bug like you | |
I wish nothing but the best for you too |
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
YOU: | |
Hey #jQuery guys! What's the best way to check if an element has a specific data attribute? Is there only $.attr() ? | |
YOU SAY: | |
(typeof($el.data('name')) != 'undefined') { … } | |
..is what you currently use. | |
ME: |
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
/** | |
* This plugin brings missing async features to card layouts. It can be applied | |
* on any component that uses a card layout (e.g. a NavigationView) | |
* | |
* With this plugin you can do the following: | |
* | |
* navigationView.setActiveItem(fooCard, function(){ alert('after transition'); }); | |
* navigationView.push(fooCard, function(){ alert('after transition'); }); | |
* navigationView.pop(function(){ alert('after transition'); }); | |
* |
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
Ext.define('CouchCommerce.infrastructure.ViewCache', { | |
xtype: 'viewcache', | |
extend: 'Ext.Component', | |
constructor: function(){ | |
this._viewStore = {}; | |
this._viewStack = []; | |
}, | |
/** | |
* @public | |
* This method pushes new views on the cache |
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
//<debug> | |
Ext.Loader.setPath({ | |
'Ext':'../sencha/src', | |
'Ext.ux': 'libs/ux', | |
'CouchCommerce':'app' | |
}); | |
Ext.Loader.setConfig('disableCaching', false); | |
//</debug> | |
Ext.require([ |
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
'use strict'; | |
angular.module('sdk.directives.ccZippy', []); | |
/** | |
* this is a generic directive that creates an view with | |
* optional fixed header and toolbars | |
* | |
*/ |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
seo: { | |
site: 'index.html' | |
} | |
}); | |
grunt.loadTasks('grunt-contrib-seo/tasks'); |
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
'use strict'; | |
module.exports = function(grunt) { | |
var fs = require("fs"), | |
path = require("path"), | |
phantom = require("grunt-lib-phantomjs").init(grunt); | |
grunt.registerMultiTask('seo','fetch html snapshots', function(){ |