Skip to content

Instantly share code, notes, and snippets.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyd2dj3xmcjfhk9icxWNFLQ3umm23AxIxf+sa8N0hKi8xLV/cmITo3WZMKIYuSvAOzX4BDhHnd+YTmzvxQeiJ8Awfe3ZKoeYFXlVSqA64rTSGHZ/vIjkuCv+ebBe9Q4h5RlPTv2UDtKTAWKUeYxp5UmZLzf2hyE981yFuI0E8oyn/MNsY5PaEQi0m6PTGddy58gHW45gLPkPIEvwDsIuvKn00jodhT1iLNPmqZPl/jz1VUq3l8+yw1ZjwrBfMoygTycIGnZ2o96hcVkGTqCfoonGAScRZoCbDvdhL4W9uzfpgeIuTllzks3DOITLqHz0UXcVmkiTBaVRFHTv6io7Eh cdata@cdata-macbookpro2.roam.corp.google.com
import { LRUCache } from './lru-cache.js';
const FirebaseQueryAction = {
snapshotReceived: 'FIREBASE_QUERY_SNAPSHOT_RECEIVED',
created: 'FIREBASE_QUERY_CREATED'
};
const FirebaseQueryActionCreatorCache = (maxRealtimeQueries = 10) => {
const cache = new LRUCache(
maxRealtimeQueries,
import {html as H} from 'lit-html';
let foo;
let f = () => html`<div>${wrap(html`${foo}`)}</div>`;
functino wrap(v) => html`<pre>${v}</pre>`;
{
template,
@cdata
cdata / hi
Last active May 17, 2017 21:03
-KkK6Y0a2WVqKBtu_ZQe
<script>
/**
* The first argument is always a reference to the immediate parent node
* relative to where the directive annotation occurs in the template.
*/
Polymer.Directive.formatted = function(node, data) {
node.innerHTML = `<h1>${data.title}</h1><span>${data.body}</span>`;
};
/**
@cdata
cdata / x-special-anchors.html
Last active March 17, 2017 06:13
Directive strawman
<script>
// Directives are functions that live on named properties
// in the Polymer.Directive namespace.
// Directives are very similar to annotated computed effects.
// When called, the first argument is always a node. The rest of
// the arguments are the dependencies expressed in the annotation
// where the directive is used.
// Since directives can be used wherever an annotated computed
// effect might be used, the return value - if any - may be
// assigned to the value of a node property or its text content.
<link rel="import" href="../polymer/src/lib/experimental/factor.html">
<dom-module id="x-light">
<template>
<!-- Stylesheet is appended to the owner root when attached. -->
<style>
#greeting {
color: red;
}
</style>
<!-- Template contents are stamped to <x-light>'s light DOM. -->
@cdata
cdata / test.md
Last active January 12, 2017 01:15

<a href="http://google.com">An link</a>

{
properties: {
user: {
type: Object
},
route: {
type: Object,
notify: true
},
.has-a-data-url {
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiP…pZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9+IA==), none 0 0;
}
:host {
color: blue;
color: var(--gets-applied_-_color);
--gets-applied_-_color: red;;
--big_-_foo1: bar1; --big_-_foo2: bar2; --big_-_foo3: bar3; --big_-_foo4: bar4; --big_-_foo5: bar5; --big_-_foo6: bar6; --big_-_foo7: bar7; --big_-_foo8: bar8; --big_-_foo9: bar9; --big_-_background: linear-gradient(var(--color1), var(--color2) calc(var(--length1)*1px)) 0;;
}