This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XElement from '../@netflix/x-element/x-element.js'; | |
export default class XPages extends XElement { | |
static get properties() { | |
return { | |
current: { | |
type: String, | |
reflect: true, | |
}, | |
items: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class Router { | |
static init(routes, wildcard) { | |
Object.defineProperty(this, 'routes', { | |
value: routes, | |
writable: false, | |
}); | |
Object.defineProperty(this, 'patterns', { | |
value: this.build(routes), | |
writable: false, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am klebba on github. | |
* I am klebba (https://keybase.io/klebba) on keybase. | |
* I have a public key ASD6FN0tTME_UAZyWUjnobSCici__ULNRou_PdZAZurOXgo | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="/bower_components/polymer/polymer.html"> | |
<polymer-element name="google-analytics" attributes="account domain"> | |
<script> | |
// Google Analytics snippet | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var randomRGBA: function(alpha) { | |
var r = function () { return Math.floor(Math.random()*256); ); | |
var a = alpha || 1; | |
return 'rgba(' + r() + ',' + r() + ',' + r() + ',' + a + ')'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('templates', []).config(['$httpProvider', function($httpProvider) { | |
/* Injector to rewrite template filenames like template.html to | |
rails asset paths like /assets/template-0def1e14f3772cda8a0110f73fb6beb1.html */ | |
$httpProvider.interceptors.push(['$cacheFactory', '$sce', function($cacheFactory, $sce) { | |
var cache = $cacheFactory('templatesMap'); | |
/* Rails derives this list automatically */ | |
// <% Dir.glob(Rails.root.join('app','assets','templates', '*.html')).each do |f| file = File.basename(f) %> | |
cache.put('<%= file %>', '<%= asset_path file %>'); | |
// <% end %> | |
return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
var app = angular.module('App'); | |
/** | |
* Provide a means for hooking into view animation events | |
*/ | |
app.factory('transitionService', [function() { |