Skip to content

Instantly share code, notes, and snippets.

View Jamie452's full-sized avatar

Jamie Street Jamie452

View GitHub Profile
@Jamie452
Jamie452 / app.js
Created March 16, 2017 00:06
Code (broken) to apply a LUT on the server side
let fs = require('fs');
let getPixels = require('get-pixels');
let ndArrayOps = require('ndarray-ops');
let parseCubeLUT = require('parse-cube-lut');
let applyCubeLUT = require('apply-cube-lut');
let savePixels = require('save-pixels');
fs.readFile('./luts/heulandite.cube', 'utf8', (err, rawLutData) => {
if (err) {
// Sample data from a console.log
// _id and company are proper ObjectIds
// created_date is a proper Date type
// location.coordinates are valid lng, lat values (changed here to 123, -123)
// I've tested the geoNear functionality and it's working properly (confirmed correct distances too)
[
{
_id: 581678137e2cc93a52f482b0,
title: 'Frontend Developer at Defense Limited',
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<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-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">