Skip to content

Instantly share code, notes, and snippets.

View carusology's full-sized avatar

Brian Caruso carusology

View GitHub Profile
<!doctype html>
<html>
<head>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<div aurelia-app="src/configure">
Loading...
Param([string]$debugType = "full")
$ErrorActionPreference = "Stop"
Function Get-Debug-Type {
Param([string]$projectName)
$project = New-Object XML
$project.Load("${pwd}\src\${projectName}\${projectName}.csproj")
return $project.Project.PropertyGroup.DebugType;
}
@carusology
carusology / app.html
Created June 21, 2017 00:43 — forked from mttmccb/app.html
Aurelia-Materialize bridge select bind onjects
<template>
<div>
<select md-select="label: this label is always grey" value.two-way="selectedMeal">
<option disabled selected>Select your meal</option>
<option repeat.for="meal of food" model.bind="meal">${meal.name}</option>
</select>
<a md-button="label: 'foo', flat: true;" md-waves click.trigger="setSelectedMeal()" class="accent-text">select steak</a>
You selected: ${selectedMeal | stringify}
</div>
public ConstructorInfo FindConstructor(string[] names, Type[] types)
{
var constructors = _type.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
foreach (ConstructorInfo ctor in constructors.OrderBy(c => c.IsPublic ? 0 : (c.IsPrivate ? 2 : 1)).ThenBy(c => c.GetParameters().Length))
{
// (1) Don't use an array. Use a name => parameter info mapping that is case insensitive.
// Added benefit here, if we get two parameters with the same name but in a case-insensitive
// match, an exception will be thrown. Today no exception is thrown, even though it is unsupported.
IDictionary<String, ParameterInfo> ctorParameters =
ctor.GetParameters()
@carusology
carusology / app.html
Created January 30, 2017 20:18 — forked from Thanood/app.html
Aurelia-Materialize bridge input fields basic use
<template>
<div>
<form element.ref="form">
<md-input md-label="put some text here" md-value.bind="textValue" md-disabled.bind="disabledValue"></md-input><br />
You entered: ${textValue}<br />
<button md-button="flat: true;" md-waves class="accent-text" click.delegate="setText()">set text to something</button>
<button md-button="flat: true;" md-waves class="accent-text" click.delegate="setDisabled()">Toggle Input Disabling</button>
</form>
<button md-waves class="accent-text" click.delegate="reset()">Reset</button>
</div>
@carusology
carusology / app.html
Last active July 6, 2016 20:25
@noview on route template - TypeError: Cannot set property 'bindingContext' of null
<template>
<div class="page-host">
<router-view></router-view>
</div>
</template>