# Shoot.. this is pointless actually. You can do this by `git diff origin/development...HEAD`
# Do a git diff between development, only on your changes by finding
# the last commit hash in your branch which is in development and diffing on that.
origin_development_hashes=$(git log --pretty=format:'%H' origin/development | tail -300)
for hash in `git log --pretty=format:'%H' | tail -300`; do;
[[ $origin_development_hashes =~ "$hash" ]] && found=$hash && break;
if [ $found != "" ]; then

Declarative data loading in Polymer

  • Rather than writing a lot of imperative code how can we write more straightforward/simpler/consistent code, less prone to bugs.

Nextgen data loading components

  • Spawned off with needing to solve binding and data store issues when updgrading to Polymer 1.
    • Polymer 0.x used the Object observe to update bindings. We referenced a global store using basically an Object.assign function that updated elements referencing those objects.
    • Came up with an inf-store-observer component to listen for and bind updates
View calculator.js
<!DOCTYPE html>
<title>Data loading/binding demo</title>
body {
font-family: monospace, Helvetica, sans-serif;
padding: 20px;
margin: 0px;
background: #E6E7E8;
View benchmark-template.js
* Simple benchmark copy paste for browsers using Benchmark.js
* See their documentation:
* Edit the different suite add() sections below to change your tests or add new ones.
var Script = function(url) {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = url;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
View path-val.js
// via
function getValue(object, propertyName) {
if (!propertyName) throw new Error('Impossible to set null property');
return typeof object === 'undefined' ? undefined : object[propertyName];
function getNestedValue(object, propertyName) {
return propertyName.split('.').reduce(getValue, object);
View reduce.js
var input = [[2,6],[3,5],[7,21],[20,21]];
var expectedOutput = [[2,6],[7,21]];
var rangesOverlap = function(range1, range2) {
return (
(range1[1] >= range2[0] && range1[1] <=range2[1]) ||
(range1[0] <= range2[0] && range1[1] >= range2[0])
View es5-6.js
var params = { t: 123, type: 'mytype', channelId: 'mychan', badge:'thebadge' };
var allowedPersonParams = ["type", "channelId", "badge", "since", "until"];
// ES5
var result = {};
allowedPersonParams.forEach(function (paramName) {
if (currentParams[paramName]) {
result[paramName] = currentParams[paramName];
View gist:cbf92b33db85d31eff86
<!DOCTYPE html>
<meta charset="utf-8">
<title>console test</title>
<link rel="shortcut icon" type="image/png" href="lib/jasmine-2.2.0/jasmine_favicon.png">
<link rel="stylesheet" href="lib/jasmine-2.2.0/jasmine.css">
<script src="lib/jasmine-2.2.0/jasmine.js"></script>
View gist:0e7d096151e0ca02a020
View gist:ac4594ce5d4d6e3357ba
Gmail Client (ideas)
var gmailClient = newGmailClient(myAccessToken);
var response = gmailClient.execute({
url: "users/me/messages",
headers: {},