Skip to content

Instantly share code, notes, and snippets.

const mailsWithoutReplyId = inboxEmails.filter((email) => {
return email.replyToMessageId === null;
});
const groupedEmails: EmailThread[] = [];
for (const mailWithoutReplyId of mailsWithoutReplyId) {
const chain = recursiveExtractReplies([mailWithoutReplyId]);
const emails = chain
<- launchResponse
Response {
seq: 0,
type: 'response',
request_seq: 2,
command: 'launch',
success: true
}
new connection 1
<- threadEvent
SERVICE WORKER REGISTER: ✅
vendor-506506f4b0d2affd0013a4415e9fb776.js.gz:8338 Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.
e.(anonymous function) @ vendor-506506f4b0d2affd0013a4415e9fb776.js.gz:8338
vendor-506506f4b0d2affd0013a4415e9fb776.js.gz:8338 Sleep detected, reloading
/ember/user_presence.json:1 Failed to load resource: net::ERR_INTERNET_DISCONNECTED
vendor-506506f4b0d2affd0013a4415e9fb776.js.gz:8465 Raven about to send: Object
/ember/ping.json:1 Failed to load resource: net::ERR_INTERNET_DISCONNECTED
vendor-506506f4b0d2affd0013a4415e9fb776.js.gz:8465 Raven about to send: Object
/ember/conversations.json?app_id=dr2wgs6y&assignee_identifier=all&sort_key=updated_at&sort_direction=desc&per_page=10&status=opened:1 Failed to load resource: net::ERR_INTERNET_DISCONNECTED
/ember/conversations/for_inbox?ap
@nickjanssen
nickjanssen / scene.json
Created November 22, 2016 01:13
Sample JSON export
{
"metadata": {
"version": "4.3",
"type": "Object",
"generator": "UnityThreeExporter"
},
"geometries": [
{
"uuid": "29217a08-464f-4839-80c7-b7ce9f03a234",
"type": "Geometry",
@nickjanssen
nickjanssen / App.jsx
Last active November 22, 2016 07:49
Example code showing how to create a Google Cardboard web demo. Link: http://cardboard.nickjanssen.com/
import React, { Component } from 'react'
const sceneConfig = {
url: 'Classroom/scene.json',
clearColor: 0xdbfff8,
startPosition: new THREE.Vector3(3, 2, 3),
lookAt: new THREE.Vector3(0, 2, 0)
}
const isMobile = typeof window.orientation !== 'undefined'
var controlsEnabled = false;
var prevTime = performance.now();
var velocity = new THREE.Vector3();
var raycaster = new THREE.Raycaster();
var gameObjects = {};
this.colliders = [];
var loader = new THREE.ObjectLoader();
loader.load('models/school/scene.json', function (obj) {
me.scene.add(obj);
player = new THREE.Object3D();
player.add(me.camera);
me.scene.add( player );
mesh.traverseAncestors(function (parent) {
parent.updateMatrixWorld(true);
})
var worldScale = mesh.getWorldScale();
var worldRotation = mesh.getWorldQuaternion();
var boxWidth: json.userData.size[0] * worldScale.x;
var boxHeight: json.userData.size[1] * worldScale.y;
var boxDepth: json.userData.size[2] * worldScale.z;
switch (data.userData.type) {
case 'BoxCollider':
entity.parent.addComponent($components.get('rigidBody', {
shape: {
type: 'box',
width: data.userData.size[0],
height: data.userData.size[1],
depth: data.userData.size[2]
},
offset: (new THREE.Vector3()).fromArray(data.userData.center),
{
"metadata": {
"version": "4.3",
"type": "Object",
"generator": "UnityThreeExporter"
},
"geometries": [
{
"uuid": "a2a4abd1-b124-4766-a8b3-0615e4197edb",
"type": "Geometry",