- Install
Polymer/polymer#2.0-preview
bower package andwebcomponents/webcomponentsjs#v1
bower package
$ bower install --save Polymer/polymer#2.0-preview
$ bower install --save webcomponents/webcomponentsjs#v1
https://github.com/gjacobs86/openarchcollab.org/blob/master/views/index.html#L387-L390 | |
https://github.com/gjacobs86/openarchcollab.org/blob/master/views/index.html#L405-L408 | |
https://github.com/gjacobs86/openarchcollab.org/blob/master/views/index.html#L423-L426 |
if [ ! -f ~/.hi.html ]; then echo '<title>Hi Kate</title><h1>Hi Kate</h1>' > ~/.hi.html; fi && echo 'Opening gulp or whatever...' && for ((n=0;n<10;n++)); do open -a 'Google Chrome' ~/.hi.html; done |
// You need to have already loaded an `iron-iconset-svg` tag on the page | |
var iconDb = Polymer.Base.create('iron-meta', {type:'iconset'}); | |
var pxIconSet = iconDb.byKey('px'); | |
var airplaneIconSvg = pxIconSet._cloneIcon('aircraft', false); // ... `airplaneIconSvg` now has an `<svg>` node with the icon. |
const {Analyzer, FSUrlLoader} = require('polymer-analyzer'); | |
let analyzer = new Analyzer({ | |
urlLoader: new FSUrlLoader('./'), | |
}); | |
analyzer.analyze(['px-app-nav.html']) | |
.then((document) => { | |
const els = []; | |
for (const element of document.getFeatures({kind: 'element'})) { |
function callFnOnListInFrames(scope, list, fn, args) { | |
return new Promise(function(resolve, reject) { | |
args = args || []; | |
// var start = performance.now(); | |
var workInd = 0; | |
var results = []; | |
var start; | |
var elapsed; | |
function _workInOneFrame(now) { |
# Updates your git remote named `origin` with a new password if you're authenticating | |
# using basic auth (and not SSH). E.g. if you work for a corporatin with a proxy that | |
# murders your attempt to connect over SSH. | |
# | |
# How to use: | |
# | |
# 1. Put the function in your ~/.bash_profile or ~/.zshrc | |
# 2. Replace old_access_pass with your old password/access token and new_access_pass with your new password/access token | |
# 3. Run `fixremote` in any repo folder when your git push or pull fails |
<!-- | |
In this example, we use a template dom-repeat to insert multiple markers into a map | |
from an array of simple objects. This is a way to use markers and other components | |
without feeding in a complex blob of GeoJSON. | |
--> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Map 1 Demo -- Simple Map</title> |
/** | |
* When light DOM children are distributed into a `px-map` framework component, | |
* that component will often have to share a reference to one of its properties | |
* with the child. This behavior wraps around that use case, ensuring that | |
* properties will be applied to any distributed light DOM children and that | |
* changes to those properties on the parent will trigger a re-distribution | |
* to the children that keeps them up-to-date. | |
* | |
* Distributions should be configured in the component's Polymer constructor | |
* in a similar way to the `observers` block provided by the Polymer library. |
const Promise = require('bluebird'); | |
const sh = require('shelljs'); | |
/** | |
* Asynchronously executes a shell command and returns a promise that resolves | |
* with the result. | |
* | |
* The `opts` object will be passed to shelljs's `exec()` and then to Node's native | |
* `child_process.exec()`. The most commonly used opts properties are: | |
* |