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
<body></body> | |
<script> | |
var container = document.createElement('div'); | |
for(var i = 0; i<5;i++) { | |
var elem = document.createElement('div') | |
elem.textContent = "I am " + i; | |
container.appendChild(elem); | |
} | |
container.addEventListener('click', function(e) { | |
var clicked = e.target; |
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 crypto = require('crypto'); | |
var express = require('express'); | |
var app = express(); | |
// TODO: derive keys using pbkdf2 and some time step in the salt to get TTLs. | |
var db = {}; | |
var sever_secret = '123456'; | |
var key_salt = '123456' |
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="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../paper-button/paper-button.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |
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
<polymer-element name="post-card"> | |
<template> | |
<style> | |
:host { | |
display: block; | |
position: relative; | |
background-color: white; | |
padding: 20px; | |
width: 100%; | |
font-size: 1.2rem; |
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 Summary1 = React.createClass({ | |
render: function(() { | |
var cards = this.props.cards | |
return ( | |
<div> | |
<Notification /> | |
<div> | |
cards.map(function(card, i) { | |
return <Card key={'key' + i} data={card}> |
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
'use strict'; | |
var React = require('react'); | |
var RCSS = require('rcss'); | |
var tweenState = require('react-tween-state'); | |
var DragMixin = require('./mixins/drag-mixin'); | |
var headerStyle = RCSS.registerClass({ | |
position: 'relative', | |
width: '100%', |
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 gameoflife(matrix) { | |
var population = []; | |
for (var i = 0; i < matrix.length; i++) { | |
population[i] = []; | |
for (var j = 0; j < matrix[0].length; j++) | |
population[i][j] = 0; | |
} | |
matrix.forEach(function(row, i) { | |
row.forEach(function(col, j) { |
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
// known mcc/mnc values for our sim card (this is Telenor Norway) | |
var mcc = 242; | |
var mnc = 01; | |
// First get the sim card number (API supports multi sim phones) | |
var simNum = Array.slice(window.navigator.mozMobileConnections) | |
.reduce(function(current, connection, i) { | |
if (connection && connection.data && connection.data.network) { | |
// For ONCE we're actually using type coercion as it's meant here! | |
if (connection.data.network.mcc == mcc && |
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
/* Media definitions */ | |
@media screen and (max--moz-device-pixel-ratio: 1.5) { | |
html { | |
font-size: 15px; | |
} | |
} | |
@font-face { | |
font-family: 'Keyboard Symbols'; | |
font-weight: 600; |
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
{ | |
"name": "testee", | |
"description": "testing app", | |
"type": "certified", | |
"launch_path": "/index.html", | |
"developer": { | |
"name": "The Gaia Team", | |
"url": "https://github.com/mozilla-b2g/gaia" | |
}, | |
"datastores-owned": { |
OlderNewer