Skip to content

Instantly share code, notes, and snippets.

View tinusn's full-sized avatar

Tinus Aamand Norstved tinusn

View GitHub Profile
@tinusn
tinusn / app.js
Created December 6, 2015 19:40
electron node-muse
'use strict';
const electron = require('electron');
const nodeMuse = require("node-muse");
const Muse = nodeMuse.connect().Muse;
const OSC = nodeMuse.OSC;
const app = electron.app; // Module to control application life.
const BrowserWindow = electron.BrowserWindow; // Module to create native browser window.
// Report crashes to our server.
@tinusn
tinusn / virtual-repeat-model.ts
Created September 23, 2015 07:56
Virtual Repeat Model for angular-materials Virtual Repeat
class VirtualRepeatModel {
PAGE_SIZE: number = 20;
totalItems: number = 0;
totalPages: number;
loadedItems = {};
currentIndex: number;
extraParams = {};
constructor(public api: restangular.IElement, public initialPage?: number) {
@tinusn
tinusn / Application.java
Last active January 9, 2016 21:05
Play Framework 2.3 - Java - CORS
package controllers;
import play.*;
import play.mvc.*;
public class Application extends Controller {
/*
* Define any extra CORS headers needed for option requests (see http://enable-cors.org/server.html for more info)
*/