Skip to content

Instantly share code, notes, and snippets.

View vizath's full-sized avatar

Maxime Fafard vizath

  • Pod
  • Montréal, Québec
View GitHub Profile
@vizath
vizath / Responsive.js
Last active April 30, 2018 04:54
Create an object that you can listen on for screen sizes with incomplete Bootstrap example.
"use strict";
var EventEmitter = require('events').EventEmitter;
var CHANGE_EVENT = 'change';
var breakpoints = [0, 768, 992, 1200, Infinity];
var indexes;
var getSize = function() {
// http://stackoverflow.com/a/11744120/808657
@vizath
vizath / readme.md
Created June 11, 2015 23:40
SlimerJS on AWS EC2 with webgl support

There is not a lot of doc or posts about making an headless renderer with webgl support. Here are few of my findings

I tried things on Heroku, but I was not able to make anything work.

Next, I tried EC2 t2.micro, only to find out that OpenGL needs a graphic card to execute (sure, there are things like mesa that I didn't tried, but it looked like I needed to build Chrome and I didn't want to go that way).

The only easy solution that I found was AWS EC2 GPU Instances. They are pretty much overpriced for what I'm trying to acheive, but it worked. You need to use an AMI that support the Nvidia GRID thing. eg https://aws.amazon.com/marketplace/pp/B00FYCDDTE and its CentOS.

Slimer need Firefox and Firefox need shared libraries that we need to install (we will use a custom repo).