This file contains 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="twitch-service" attributes=""> | |
<template> | |
<style> | |
.offline { | |
display: none; | |
} | |
</style> | |
<link rel="stylesheet" href="twitch-service.css"> |
This file contains 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
/** | |
* simple JSONP support | |
* | |
* JSONP.get('https://api.github.com/gists/1431613', function (data) { console.log(data); }); | |
* JSONP.get('https://api.github.com/gists/1431613', {}, function (data) { console.log(data); }); | |
* | |
* gist: https://gist.github.com/gists/1431613 | |
*/ | |
var JSONP = (function (document) { | |
var requests = 0, |
This file contains 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="twitch-api"> | |
<template> | |
<link rel="stylesheet" href="twitch-api.css" attributes="clientId"> | |
</template> | |
<script> | |
(function () { | |
Polymer({ | |
twitchUrl: 'https://api.twitch.tv/kraken/', |
This file contains 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 elementChildren (element) { | |
var childNodes = element.childNodes, | |
children = [], | |
i = childNodes.length; | |
while (i--) { | |
if (childNodes[i].nodeType == 1) { | |
children.unshift(childNodes[i]); | |
} | |
} |
This file contains 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 user = {name: "dummy", uid: "demo"}; | |
var data; | |
var text = ""; | |
for (data in user) { | |
text += user[data]; | |
} |
This file contains 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
if (window.addEventListener) { | |
window.addEventListener("storage", onStorage, false); | |
} else { | |
window.attachEvent("onstorage", onStorage); | |
}; | |
var onStorage = function(data) { | |
// Receive changes in the localStorage | |
} |
This file contains 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
// repeat x times | |
var quantity = 10; | |
for (var i = 1; i <=quantity; i++) { | |
console.log('Runned: ' + i + 'time(s)' ); | |
} |
This file contains 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
<script> | |
var BasicElements = BasicElements || {}; | |
/** | |
* @demo demo/index.html | |
* @polymerBehavior BasicElements.pageSelectedBehavior | |
*/ | |
BasicElements.pageSelectedBehaviorImpl = { | |
properties: { | |
animate: { | |
type: Boolean, |
This file contains 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
#!/bin/sh -e | |
#Define our target device | |
export TARGET_ARCH="-march=armv7-a" | |
export TARGET_TUNE="-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb" | |
#Define the cross compilators on your system | |
export AR="arm-linux-gnueabi-ar" | |
export CC="arm-linux-gnueabi-gcc" | |
export CXX="arm-linux-gnueabi-g++" |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="import" href="../components/polymer/polymer.html"> | |
<template id="test-element"> | |
Hello, <content></content>. | |
</template> |
OlderNewer