Skip to content

Instantly share code, notes, and snippets.

@carlosagsmendes
carlosagsmendes / ko-component-router-paths.js
Created June 13, 2016 17:19
ko-component-router issue when changing paths manually
import ko from 'knockout';
import 'ko-router';
ko.options.deferUpdates = true;
class Task {
constructor(id, name) {
this.id = ko.observable(id);
this.name = ko.observable(name);
}
@carlosagsmendes
carlosagsmendes / ko-component-router-params-sample.js
Last active June 12, 2016 22:36
ko component router params and subscriptions
import ko from 'knockout';
import 'ko-component-router';
ko.options.deferUpdates = true;
class Task {
constructor(id, name) {
this.id = ko.observable(id);
this.name = ko.observable(name);
}
@carlosagsmendes
carlosagsmendes / package.json
Created October 20, 2015 17:53
JSPM package.json
{
"jspm": {
"dependencies": {
"amplify": "github:mikehostetler/amplify@1.1.2",
"bootstrap": "github:twbs/bootstrap@3.3.4",
"clean-css": "npm:clean-css@^3.4.5",
"css": "github:systemjs/plugin-css@0.1.18",
"image": "github:systemjs/plugin-image@0.1.0",
"jquery": "github:components/jquery@2.1.4",
"jquery-caret": "github:ichord/Caret.js@0.2.2",
@carlosagsmendes
carlosagsmendes / JSPM Knockout
Created July 15, 2015 16:26
Bundle Contents
System.registerDynamic("github:knockout/knockout@3.3.0/dist/knockout.debug.js", [], false, function(__require, __exports, __module) {
var _retrieveGlobal = System.get("@@global-helpers").prepareGlobal(__module.id, "ko", null);
(function() {
"format global";
"exports ko";
(function() {
var DEBUG = true;
(function(undefined) {
var window = this || (0, eval)('this'),
document = window['document'],
@carlosagsmendes
carlosagsmendes / Funq_Can_AutoWire.cs
Created December 7, 2012 22:02 — forked from mythz/Funq_Can_AutoWire.cs
StackOverflow Funq IOC code example
//Had to make these types from the example since the example didn't compile and they weren't supplied
public interface IFoo { }
public interface IFoo2 { }
public interface IBar { }
public class Foo : IFoo { }
public class Bar : IBar { }
public class Test
{
public IFoo Foo { get; set; }
@carlosagsmendes
carlosagsmendes / DiscussionSecurityIndexTest.cs
Created May 15, 2012 10:47
Testing Multimap Index in RavenDB
using System.Collections.Generic;
using System.Linq;
using Raven.Client;
using Raven.Client.Embedded;
using Raven.Client.Indexes;
using Xunit;
namespace Raven.Tests.Bugs.Indexing
{
public class DiscussionSecurityIndexTest : LocalClientTest