Skip to content

Instantly share code, notes, and snippets.

View AshleyGrant's full-sized avatar

Ashley Grant AshleyGrant

  • Vagabond
View GitHub Profile
<template>
<select value.bind="selectedValue">
<option model.bind="1">1</option>
<option model.bind="2">2</option>
<option model.bind="3">3</option>
<option model.bind="4">4</option>
</select>
<h1>Selected Value: ${selectedValue}</h1>
@AshleyGrant
AshleyGrant / az
Created October 25, 2017 15:13
Azure CLI in Git Bash
#!/bin/sh
"/C/Program Files (x86)/Microsoft SDKs/Azure/CLI2/python.exe" -Im azure.cli "$@"
ret=$?
exit $ret
@AshleyGrant
AshleyGrant / app.html
Last active September 26, 2017 14:39
Aurelia Calls Function
<template>
<require from="./calls-function"></require>
<calls-function passed-in-function.call="myFunc(paramOne, paramTwo)"></calls-function>
Text: ${text}<br />
</template>
@AshleyGrant
AshleyGrant / app.html
Last active September 6, 2017 17:59
Aurelia Focus Bug?
<template>
<div>
<input type="text" focus.trigger="showFirst = true" />
<div show.bind="showFirst">Here I am!</div>
</div>
<br />
<div>
<input type="text" focus.trigger="showSecond = true" />
@AshleyGrant
AshleyGrant / app.html
Created September 6, 2017 17:59
Aurelia Onscreen Keyboard Gist
<template>
<div>
<input type="text" focus.trigger="showFirst = true" />
<div show.bind="showFirst">Here I am!</div>
</div>
<br />
<div>
<input type="text" focus.trigger="showSecond = true" />
@AshleyGrant
AshleyGrant / app.html
Last active September 5, 2017 15:51 — forked from avrahamcool/app.html
Aurelia Gist
<template>
<require from="stringify"></require>
<h1>${message}</h1>
<div repeat.for="i of arr">
i = ${i}
<br/>
$parent.message = ${$parent.message}
<br/>
$parent.someVar = ${$parent.someVar}
@AshleyGrant
AshleyGrant / app.html
Created September 5, 2017 14:08
Aurelia Onscreen Keyboard Gist
<template>
<require from="./keyboard"></require>
<div>
<label>Name: </label>
<input type="text" value.bind="name" keyboard />
</div>
</template>
@AshleyGrant
AshleyGrant / app.html
Created August 24, 2017 19:38
Passing data from processContent function to instance VM
<template>
<require from="./stupid-aurelia-tricks"></require>
<stupid-aurelia-tricks>
<child>
One
</child>
<child>
Two
</child>
@AshleyGrant
AshleyGrant / auth0rule.js
Created August 9, 2017 21:53
Auth0 Rule
function (user, context, callback) {
// only do this for users from Azure AD
// or maybe for a specific connection
if (user.identities[0].provider !== 'waad')
return callback(null, user, context);
// To call Azure's Graph API we need an access token
// The access token can be either
// - The access token given to the logged in user by the IdP (provided that it has
// the necessary permissions)
<template>
Hello ${data.name}!
</template>