Skip to content

Instantly share code, notes, and snippets.

View next-marianmoldovan's full-sized avatar

Marian C Moldovan next-marianmoldovan

  • BBVA Next Technologies
  • Madrid
View GitHub Profile
@next-marianmoldovan
next-marianmoldovan / Safe.ino
Created February 3, 2015 16:46
Safe, leds, speaker, sound sensor, ldr and temp/hum sensor
#include <Firmata.h>
#include <Boards.h>
#include <math.h>
#include <DHT.h>
#define RED 12
#define GREEN 13
#define SOUND_SENSOR A4
#define LIGHT_SENSOR 0
@next-marianmoldovan
next-marianmoldovan / DeviceOrientationControls.js
Created January 8, 2015 11:15
THREE VR Controller for mobiles with DeviceOrientationControls
/**
* @author richt / http://richt.me
* @author WestLangley / http://github.com/WestLangley
*
* W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)
*/
THREE.DeviceOrientationControls = function ( object, controls ) {
var scope = this;
@next-marianmoldovan
next-marianmoldovan / MotionControls.js
Created January 8, 2015 11:12
THREE VR Controller for mobiles with MotionControls from jbouny
/**
* @author jbouny / http://github.com/jbouny
*/
// This control perform rotation on one object by using gyroscope data.
// It only works on devices and browsers providing the deviceorientation event (smartphones, tablets).
// It permits to control the 3D camera with a natural way, by moving the device around oneself.
// One application can be augmented reality.
THREE.MotionControls = function ( object3D ) {
#clean encoding
iconv -f iso-8859-1 -t utf-8 -c items.json > clean.json
#import objets in mongo
mongoimport --db books --collection books --file clean.json