Skip to content

Instantly share code, notes, and snippets.

View bigopon's full-sized avatar
💭
Working

bigopon bigopon

💭
Working
View GitHub Profile
@bigopon
bigopon / app.html
Created December 10, 2016 09:18 — forked from weoreference/index.html
Aurelia | Compose nested issue
<template>
<compose view-model.bind='level1ViewModel'></compose>
</template>
@bigopon
bigopon / app.html
Last active December 10, 2016 09:25 — forked from jdanyow/app.html
Aurelia Gist nested compose bubble
<template>
<h1>${message}</h1>
<compose view-model.bind='level1ViewModel'></compose>
</template>
@bigopon
bigopon / bench.js
Created December 17, 2016 01:35 — forked from jdanyow/bench.js
isObject bench
'use strict';
function log(message) {
document.getElementById('status').textContent += message + '\n';
}
log('running...');
const tests = [
null, undefined, 0, 1, true, false, '', 'adsfasf', new String('test'), {}, Object.create(null), Object.prototype, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {},
null, undefined, 0, 1, true, false, '', 'adsfasf', new String('test'), {}, Object.create(null), Object.prototype, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {}, function() {},
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
</head>
<body>
<pre><code id="status"></code></pre>
<script src="https://cdn.jsdelivr.net/g/[email protected],[email protected],[email protected]"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/node-uuid/1.4.7/uuid.js"></script>
@bigopon
bigopon / app.html
Last active December 22, 2016 12:40 — forked from MeirionHughes/app.html
scroll after push
<template>
<button click.trigger="items.push({ text: 'I am a new message no.' + items.length }) && scroll()">Add</button>
<div style='height: 400px; overflow: auto' ref='wrapper'>
<div repeat.for="item of items" style='height: 70px; margin: 10px; border: 1px solid #585'>
${item.text}
</div>
</div>
</template>
@bigopon
bigopon / app.html
Last active December 23, 2016 16:13
html 5 Drag drop aurelia
<template>
<require from='./self'></require>
<style>
.panel {
user-select: none;
}
.panel header {
padding: 5px;
height: 50px; background: green; color: #fff;
}
@bigopon
bigopon / app.html
Created December 28, 2016 01:36 — forked from jdanyow/app.html
Aurelia Accessible Autocomplete with Filtering
<template>
<require from="./autocomplete"></require>
<form>
<label class="form-component">
Country:<br/>
<autocomplete service.bind="suggestionService.country"
value.bind="model.country"
placeholder="Enter country..."
change.delegate="model.city = null">
</autocomplete>
@bigopon
bigopon / app.html
Created December 28, 2016 01:36 — forked from petmat/app.html
Aurelia checkbox inside button
<template>
<require from='./self'></require>
<h1>${heading}</h1>
<button type="button" click.delegate="toggleIsChecked() & self">
<input type="checkbox" checked.bind="isChecked"> ${isChecked}
</button>
</template>
@bigopon
bigopon / app.html
Created January 5, 2017 12:44 — forked from jdanyow/app.html
Aurelia capture binding command
<template>
<style>
.active {
border-color: blue;
}
</style>
<form blur.capture="currentFieldSet = null"
focus.capture="currentFieldSet = $event.target.closest('fieldset')">
<h1>Order Pizza:</h1>
@bigopon
bigopon / app.html
Last active October 18, 2017 05:06 — forked from atsu85/app.html
Aurelia OnKeyBindingBehavior updated
<template>
<require from="./on-key"></require>
<div>
Press [<b>Ctrl + Enter</b>] in textbox <br/>
Or [<b>Alt + Click</b>] it to trigger event
</div>
<input
value.bind="message"
keyup.delegate="textEntered() & keys:'ctrl':13"
mousedown.delegate="textClicked() & keys:'alt'"