Skip to content

Instantly share code, notes, and snippets.

@garlicnation
garlicnation / iron-button-state.html
Last active August 29, 2015 14:27
Lines 23 and 129-130 are of interest.
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
@garlicnation
garlicnation / gist:f2d6d1c6796d7cfb353f
Last active August 29, 2015 14:23
Sharding roadmap.
1) A single shared module between pages, manually specified
2) N shared modules between pages, manually specified
3) Automatically generate iframes to prime the cache
4) http2/spdy support
5) No need to specify modules, we figure out a layout for your app automatically based on endpoints.
6) Generate a pure-HTML5(No webcomponents) index.html w/ styles from polymer elements for an extremely fast time to first paint. This page should have custom element tags so as to progressively enhance when polymer loads.
Repository must be specified for gold-elements
Repository must be specified for hydrolysis
Repository must be specified for iron-a11y-announcer
Repository must be specified for iron-a11y-keys
Repository must be specified for iron-a11y-keys-behavior
Repository must be specified for iron-behaviors
Repository must be specified for iron-component-page
Repository must be specified for iron-doc-viewer
Repository must be specified for iron-elements
Repository must be specified for iron-flex-layout
/**
* Resolves a package.
* @param {string} pkg A bower-like repository description, github repo, or other git url
* @return {Array.<{{folder:string, repository:}}>} A list of packages and URLs to add to the workspace.
*/
resolve: function(pkg) {
// Install the package to a tempdir, return a
},
<link rel="import" href="../polymer/polymer.html">
<dom-module id="el-one">
<template>Foo</template>
</dom-module>
function emailTest(name, address) {
test(name, function() {
var input = fixture('basic');
forceXIfStamp(input);
var container = Polymer.dom(input.root).querySelector('paper-input-container');
assert.ok(container, 'paper-input-container exists');
input.value = address;
assert.isFalse(container.invalid);
from django.utils.safestring import mark_safe
def oneWayBind(expression):
return mark_safe("[[" + expression + "]]")
def twoWayBind(expression):
return mark_safe("{{" + expression + "}}")

Why minification will always help compression:

Take:

function (apples) {
	var all_my_apples = ["another apple"];
	for (var i = 0; i < apples.length; i++) {
		all_my_apples.push(apples[i]);
	}
	return all_my_apples;
@garlicnation
garlicnation / gist:0dfed22e72f92ccf8206
Created March 2, 2015 21:00
Designer2 deep metadata.
{
"modules": [],
"elements": [
{
"properties": [
{
"name": "configure",
"type": "Function"
},
{
@garlicnation
garlicnation / gist:4ee30b00e01f7fc605d3
Last active August 29, 2015 14:15
Designer hydrolyzed
{
"modules": [],
"elements": [
{
"properties": [
{
"name": "created",
"type": "Function"
},
{