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
// Bootstrap models | |
fs.readdirSync(__dirname + '/app/models').forEach(function (file) { | |
require(__dirname + '/app/models/' + file) | |
}) |
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 controller = new Leap.Controller({enableGestures:true}); | |
controller.on('connect', function() { | |
console.log("Successfully connected."); | |
}); | |
controller.on('deviceConnected', function() { | |
console.log("A Leap device has been connected."); | |
}); |
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 map; | |
function initialize() { | |
var mapOptions = { | |
zoom: 8, | |
center: new google.maps.LatLng(-34.397, 150.644) | |
}; | |
map = new google.maps.Map(document.getElementById('map-canvas'), | |
mapOptions); | |
} |
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
controller.on('frame', function(frame){ | |
data = frame; | |
if(data && data.hands.length > 0){ | |
if(data.hands[0].palmPosition[1] < PALM_MAP_MOVE_THRESHOLD){ | |
map.panBy(data.hands[0].palmPosition[0]/10,data.hands[0].palmPosition[2]/10); | |
}else if(data.hands[0].palmPosition[1] > PALM_MAP_TYPE_THRESHOLD){ | |
checkFingers(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
<link rel="import" href="bower_components/polymer/polymer.html"> | |
<polymer-element name="who-am-i"> | |
<template> | |
<section> | |
<p>My name is <strong>{{name}}</strong>! | |
I am <strong>{{age}}</strong> years old. | |
I love <strong>{{fav_thing}}</strong></p> | |
<label for="ageInput">Age:</label> | |
<input id="ageInput" type="range" value="{{age}}"> |
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> | |
<script src="bower_components/platform/platform.js"></script> | |
<link rel="import" href="who-am-i.html"> | |
</head> | |
<body> | |
<who-am-i></who-am-i> | |
</body> | |
</html> |
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
06-27 00:07:36.350: I/chromium(3877): [INFO:CONSOLE(13)] "Uncaught TypeError: undefined is not a function", source: file:///android_asset/components/platform/platform.js (13) | |
06-27 00:07:36.360: I/chromium(3877): [INFO:CONSOLE(13)] "Uncaught TypeError: undefined is not a function", source: file:///android_asset/components/platform/platform.js (13) | |
06-27 00:07:36.360: I/chromium(3877): [INFO:CONSOLE(13)] "Uncaught TypeError: undefined is not a function", source: file:///android_asset/components/platform/platform.js (13) | |
06-27 00:07:36.390: I/chromium(3877): [INFO:CONSOLE(12)] "Exception caught during observer callback: TypeError: undefined is not a function | |
06-27 00:07:36.390: I/chromium(3877): at b.classList (file:///android_asset/components/platform/platform.js:13:20941) | |
06-27 00:07:36.390: I/chromium(3877): at Polymer.selectedIndexChanged (data:text/javascript;base64,CgogIFBvbHltZXIoJ3BhcGVyLXRhYnMnLCB7CiAgICAKICAgIC8qKgogICAgICogSWYgdHJ1ZSwgaW5rIGVmZmVjdCBpcyBkaXNhYmxlZC4KICAgICAqCiAgICAgKiBAYXR0cm |
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
package main | |
import "github.com/go-martini/martini" | |
func main() { | |
m := martini.Classic() | |
m.Get("/", func() string { | |
return "Hello world!" | |
}) | |
m.Run() |
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
package main | |
// | |
// 1 | |
// | |
import ( | |
"github.com/go-martini/martini" | |
"github.com/martini-contrib/render" | |
"encoding/json" | |
"encoding/base64" |
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
const React = require('react'); | |
const ReactAtellier = require('react-atellier')(React); | |
class AtellierWrapper extends React.Component{ | |
render() { | |
const Icon = React.createClass({ | |
render: function() { | |
return ( | |
<div> | |
hello |
OlderNewer