Skip to content

Instantly share code, notes, and snippets.

@adoueb
adoueb / designer.html
Last active August 29, 2015 14:15
designer
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../google-map/google-map-search.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
@adoueb
adoueb / Angular: service, factory, provider
Last active August 29, 2015 14:02 — forked from Mithrandir0x/gist:3639232
Differences between AngularJS services, factories and providers
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!";
@adoueb
adoueb / 0_reuse_code.js
Created February 24, 2014 20:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
.angular-google-map-container { height: 400px; }
{macro main()}
<h1>Hello Instant Aria Templates</h1>
{/macro}
@adoueb
adoueb / InstantTemplate.tpl
Created July 4, 2013 13:20
Template logic Template logic
{macro main()}
<div class="mainlist">
{foreach person inArray data.people}
{if person.name == "Bart"}
{call helloDiv(person, "bart")/}
{else /}
{call helloDiv(person, "person")/}
{/if}
{/foreach}
<span class="footnote">(${data.people.length} people in the list)</span>
@adoueb
adoueb / InstantTemplate.tpl
Created July 4, 2013 12:18
QualityMonitorChecklist QualityMonitorChecklist
{macro main()}
{section {id:"checklist", type:"DIV", cssClass:"checklist"}}
<div class="head">
<div>Last check 04JUN13 at 14:36</div>
<a href="">Check now</a>
<div>***</div>
</div>
{if (data.checklist != null) && (data.checklist.prdSuiteItemList != null)}
{macro main()}
<h1>Hello Instant Aria Templates</h1>
${data.string1}
{/macro}