Skip to content

Instantly share code, notes, and snippets.

View pennyfx's full-sized avatar

pennyfx

  • LightningFast
  • Truckee, Ca
View GitHub Profile
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"); });
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() {
(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);
@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
@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 / 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>
['3','4','3','7'].reduce(function(prev, item){
if(!Array.isArray(prev)){
prev = [prev];
}
if(prev.indexOf(item.toLowerCase())===-1){
prev.push(item.toLowerCase());
}
return prev;
})
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 / gist:6083408
Created July 25, 2013 20:24
Angular packages in Bower
angular git://github.com/angular/bower-angular.git
angular-mocks git://github.com/angular/bower-angular-mocks.git
angular-resource git://github.com/angular/bower-angular-resource.git
angular-scenario git://github.com/angular/bower-angular-scenario.git
angular-cookies git://github.com/angular/bower-angular-cookies.git
angular-sanitize git://github.com/angular/bower-angular-sanitize.git
angular-ui git://github.com/angular-ui/angular-ui.git
angular-bootstrap git://github.com/angular-ui/bootstrap-bower.git
angular-unstable git://github.com/johannestroeger/bower-angular-unstable.git
angular-ui-utils git://github.com/angular-ui/ui-utils.git
x-tooltip:not([orientation=top]):not([orientation=bottom]):not([orientation=left]):not([orientation=right])[_auto-orientation=right] {
x-tooltip[_auto-orientation=top]:not([orientation=top]):not([orientation=bottom]):not([orientation=left]):not([orientation=right]) {