Skip to content

Instantly share code, notes, and snippets.

Avatar
🎓
Computing normal vectors.

Matthew James Davis davismj

🎓
Computing normal vectors.
View GitHub Profile
@davismj
davismj / app.css
Created Mar 31, 2021
Challenge: Scrollbar Method
View app.css
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
.container {
position: relative;
overflow: hidden;
max-height: 100vh;
max-width: 100vw;
@davismj
davismj / app.css
Last active Mar 31, 2021
Challenge: Scrollbar Method
View app.css
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
.container {
position: relative;
overflow: hidden;
max-height: 100vh;
max-width: 100vw;
@davismj
davismj / app.html
Last active Mar 31, 2021
Challenge: Scrollbar Method (solved)
View app.html
<template>
<style>
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
.container {
position: relative;
overflow: hidden;
@davismj
davismj / app.html
Created Mar 31, 2021 — forked from jdanyow/app.html
Aurelia Validation Demo
View app.html
<template>
<require from="./registration-form"></require>
<registration-form></registration-form>
</template>
@davismj
davismj / app.html
Last active Jul 21, 2020 — forked from fkleuver/app.html
Modify a template and rerender
View app.html
<template>
<require from="custom-table"></require>
<custom-table items.bind="data">
<template replace-part="row">
<tr>
<th>${item.v}</th>
<th>${item.a}</th>
<th>${item.k}</th>
</tr>
</template>
@davismj
davismj / app.html
Last active Apr 29, 2020
Modify a template and rerender
View app.html
<template>
<require from="custom-table"></require>
<custom-table items.bind="data">
<template replace-part="row">
<tr>
<th>${item.v}</th>
<th>${item.a}</th>
<th>${item.k}</th>
</tr>
</template>
@davismj
davismj / app.html
Last active Mar 11, 2020
dynamic compose vm api
View app.html
<template>
<!-- static fields -->
<div>vm1</div>
<select value.bind="vm1">
<option>thingA</option>
<option>thingB</option>
</select>
<div>vm2</div>
<select value.bind="vm2">
@davismj
davismj / app.html
Created Jan 24, 2020
"Select All" Checkbox
View app.html
<template>
<compose view-model="test" model.bind="obj"></compose>
</template>
@davismj
davismj / app.html
Created Jan 7, 2020
DI inheritance
View app.html
<template>
<div repeat.for="i of 10">
${i} ${obj[i]}
<button click.delegate="obj[i] = true">do</button>
</div>
</template>
@davismj
davismj / app.html
Last active Nov 27, 2019
DI inheritance
View app.html
<template>
<compose model.bind="{ authId: authId, caseId: caseId }" view-model="test"></compose>
<input change.delegate="authId = $event.target.value" value.one-way="authId" />
<input change.delegate="caseId = $event.target.value" value.one-way="caseId" />
</template>