Skip to content

Instantly share code, notes, and snippets.

View AshleyGrant's full-sized avatar

Ashley Grant AshleyGrant

View GitHub Profile
@AshleyGrant
AshleyGrant / index.html
Created April 30, 2020 16:56
Using a Resolved Promise Repeatedly
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
</head>
<body>
<h1>Hello world!</h1>
<input type="number" id="index" />
(async function () {
const year = document.querySelector('h1.rankings-page__heading').innerText.split(' ')[0];
// const numberOfPages = 40;
let i = 2;
// for (let i = 0; i < numberOfPages; i++) {
while(true) {
const link = $('a[data-js="showmore"]');
//Ashley Grant
//Project7.java
//A simple text editor
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import java.util.*;
import java.text.*;
@AshleyGrant
AshleyGrant / app.html
Last active June 6, 2018 21:03
Working with Focus
<template>
<require from="./some-element"></require>
<label for="hasFocus">Has Focus:</label> <input id="hasFocus" type="checkbox" checked.bind="focus" />
<div>
Custom Element:
<some-element has-focus.bind="focus" text.bind="text"></some-element>
</div>
<div>
@AshleyGrant
AshleyGrant / app.html
Last active April 20, 2018 15:05
working with event handlers
<template>
<require from="./some-element"></require>
<button click.trigger="showIt = !showIt">Toggle</button>
<div if.bind="showIt">
<some-element></some-element>
</div>
</template>
@AshleyGrant
AshleyGrant / app.html
Last active April 20, 2018 15:05
Working with Event Handlers
<template>
<require from="./some-element"></require>
<button click.trigger="showIt = !showIt">Toggle</button>
<div if.bind="showIt">
<some-element></some-element>
</div>
</template>
@AshleyGrant
AshleyGrant / app.html
Last active March 22, 2018 23:12
Decimal Math Stuff
<template>
<require from="money-round"></require>
<div>
<input type="number" value.bind="a" />
</div>
<div>
<input type="number" value.bind="b" />
</div>
<div>
My result = ${ a * b | moneyRound }
@AshleyGrant
AshleyGrant / app.html
Last active February 19, 2018 11:52
au wizard element with page element
<template>
<require from='./wizard'></require>
<wizard>
<page>
<p>
Page 1
</p>
</page>
<page>
@AshleyGrant
AshleyGrant / app.html
Last active December 21, 2017 15:26 — forked from bigopon/app.html
Aurelia let element
<template>
<require from='./card.html'></require>
<require from='./card-with-slot.html'></require>
<style>
b { font-weight: bold; }
label { display: block; }
</style>
<div ref="myDiv"
msg.bind='message'
fun-message.bind='myDiv.msg | fun'
<template>
<select value.bind="selectedValue" change.delegate="dropdownChanged(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>