Skip to content

Instantly share code, notes, and snippets.

View pennyfx's full-sized avatar

pennyfx

  • LightningFast
  • Truckee, Ca
View GitHub Profile
commit 61157b396f2ed781a89e04e43ea044ffb300cc3f
Author: Arron Schaar <aschaar@gmail.com>
Date: Mon Jul 15 12:44:50 2013 -0700
Release 0.7.5
commit 1c1254f35e6803c0b2dd1382015a081a84731e52
Author: Arron Schaar <aschaar@gmail.com>
Date: Mon Jul 15 12:06:52 2013 -0700
@pennyfx
pennyfx / x-template
Created June 5, 2013 23:31
x-template notes
Define template off in HTMLImports fragments
When template parsed search through main doc and render templates for all elements that are using this temaplate. Event delegation is setup on window for all events from addTemplateListers
<template name="bar" is="x-template">
<div>
<div></div>
<ul></ul>
<button data-action="save">
</div>
@pennyfx
pennyfx / gist:5630529
Created May 22, 2013 20:13
latest platform polyfill
/*
* Copyright 2012 The Polymer Authors. All rights reserved.
* Use of this source code is goverened by a BSD-style
* license that can be found in the LICENSE file.
*/
// SideTable is a weak map where possible. If WeakMap is not available the
// association is stored as an expando property.
var SideTable;
// TODO(arv): WeakMap does not allow for Node etc to be keys in Firefox
@pennyfx
pennyfx / gist:5629082
Created May 22, 2013 16:49
X-Tags on Bower
$ bower search x-tag
Search results:
- x-tag-core git://github.com/x-tag/core.git
- x-tag-mixin-request git://github.com/pennyfx/mixin-request.git
- x-tag-slidebox git://github.com/x-tag/slidebox.git
- x-tag-code-prism git://github.com/x-tag/code-prism.git
- x-tag-shiftbox git://github.com/x-tag/shiftbox.git
- x-tag-growbox git://github.com/x-tag/growbox.git
- x-tag-panel git://github.com/x-tag/panel.git
(function() {
var scope = window.Loader = {};
var flags = {};
if (!flags.noOpts) {
location.search.slice(1).split("&").forEach(function(o) {
o = o.split("=");
o[0] && (flags[o[0]] = o[1] || true);
});
}
parseLogFlags(flags);
var SideTable;
if (typeof WeakMap !== "undefined" && navigator.userAgent.indexOf("Firefox/") < 0) {
SideTable = WeakMap;
} else {
(function() {
var defineProperty = Object.defineProperty;
var hasOwnProperty = Object.hasOwnProperty;
var counter = new Date().getTime() % 1e9;
SideTable = function() {
heartBeat = new Task(() =>
{
while (true)
{
string token = "token-" + _nextHeartbeatId++;
_session.RequestHeartbeat(new HeartbeatRequest(token),
() => Console.WriteLine("Successfully requested heartbeat: " + token),
failureResponse => { throw new Exception("Failed"); });
@pennyfx
pennyfx / dabblet.css
Created November 30, 2012 20:22
Untitled
.viewport{
display:inline-block;
border: solid 1px black;
overflow:hidden;
border-radius: 15px;
}
.nob{
background-color:red;
border-radius:15px;
width:20px;
@pennyfx
pennyfx / gist:3801410
Created September 28, 2012 18:30
x-blog-article tag
I know we joked about this tag before, but check this out.
So I don't want to go through the trouble of creating an entire blog system. Plus we don't need it. We could easily create something simple with a few x-tags.
So imagine a directory with a bunch of html fragments containing x-blog-articles
/posts/(permalink)
<x-blog-article template="summary|complete">
<x-value key="title"></x-value>
@pennyfx
pennyfx / gist:3723388
Created September 14, 2012 17:29
x-indexDb scraps
//
// Persistence and databinding tag thoughts
//
// Add one of these for each entity you want indexDb persistence
<x-indexdb for="x-todo-item" path="todoapp.todo-item">
<x-indexdb for="x-user-preferences" path="todoapp.preferences">
//when injected into the DOM will auto request data and inflate
<x-todo-item data-id="1">