Skip to content

Instantly share code, notes, and snippets.

View deap82's full-sized avatar

Dan Pettersson deap82

View GitHub Profile
@deap82
deap82 / SpecsForUrlActionQuestion.cs
Last active November 7, 2015 16:00
Testing Controller actions that calls Url.Action with SpecsFor
//Twitter conversation: https://twitter.com/Deap82/status/660723939602247680
//I got it working by using this in Given, but it seemed strange to me that
//FakeUrlHelper would not be part of it...
protected override void Given()
{
base.Given();
this.UseFakeContextForController();
SUT.Url = new UrlHelper(SUT.ControllerContext.RequestContext);
@deap82
deap82 / app.html
Last active February 23, 2017 18:28
AURELIA: attached() not called on custom element inside enhanced area.
<template>
<square></square>
</template>
@deap82
deap82 / app.html
Created February 24, 2017 07:59
AURELIA: attached() not called on custom element inside enhanced area.
<template>
<square></square>
</template>
@deap82
deap82 / app.html
Last active June 7, 2018 10:30 — forked from jdanyow/app.html
aurelia-binding unicode escaping
<template>
<h1>${message}</h1>
</template>
@deap82
deap82 / app.html
Last active June 28, 2017 14:09
AURELIA life cycle: normal vs enhanced
<template>
<fieldset>
<legend>router-view</legend>
<router-view></router-view>
</fieldset>
</template>
<template>
<require from="./my-attr-options"></require>
<require from="./my-attr"></require>
<div my-attr my-attr-options="option1.bind: firstInstanceOpt"></div>
<div my-attr my-attr-options="option1.bind: secondInstanceOpt"></div>
<div my-attr></div>
</template>
@deap82
deap82 / SassMeister-input-HTML.html
Last active October 16, 2017 15:28
Bem/Scss exeperiment
<div class="container">
<div class="block1">
<div class="block1__inner">
</div>
</div>
<div class="block1 block1--bordered">
<div class="block1__inner">
</div>
</div>
<div class="block1">
@deap82
deap82 / app.html
Last active November 16, 2017 09:29
Aurelia Gist - boilerplate with routing (and visible log)
<template>
<ul id="menu">
<li><a href="#/Welcome">Welcome</a></li>
<li><a href="#/Products">Products</a></li>
<li><a href="#/Contact">Contact</a></li>
</ul>
<div id="content">
<router-view></router-view>
</div>
@deap82
deap82 / app.html
Last active January 15, 2018 08:04
Aurelia Gist - router:navigation:complete issue
<template>
<ul id="menu">
<li><a href="#/Welcome">Welcome</a></li>
<li><a href="#/Products">Products</a></li>
<li><a href="#/Contact">Contact</a></li>
</ul>
<div id="content">
<router-view></router-view>
</div>
@deap82
deap82 / app.html
Created November 26, 2017 11:03
Aurelia Gist - boilerplate with routing (and visible log)
<template>
<ul id="menu">
<li><a href="#/Welcome">Welcome</a></li>
<li><a href="#/Products">Products</a></li>
<li><a href="#/Contact">Contact</a></li>
</ul>
<div id="content">
<router-view></router-view>
</div>