Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View pennyfx's full-sized avatar

pennyfx

  • LightningFast
  • Truckee, Ca
View GitHub Profile
@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">
@pennyfx
pennyfx / gist:1328810
Created October 31, 2011 20:28
failing tests
======================================================================
ERROR: test_addon_with_deep_dependency (FlightDeck.apps.xpi.tests.test_building.XPIBuildTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/arron/programming/FlightDeck/../FlightDeck/apps/xpi/tests/test_building.py", line 389, in test_addon_with_deep_dependency
response = addon.latest.build_xpi(hashtag=self.hashtag)
File "/Users/arron/programming/FlightDeck/apps/jetpack/models.py", line 1311, in build_xpi
package_dir = self.make_dir(packages_dir)
File "/Users/arron/programming/FlightDeck/apps/jetpack/models.py", line 295, in make_dir
os.mkdir(package_dir)