Skip to content

Instantly share code, notes, and snippets.

View RobbertWolfs's full-sized avatar

Robbert Wolfs RobbertWolfs

  • Euricom
  • Antwerp, Belgium
View GitHub Profile
@RobbertWolfs
RobbertWolfs / pixels.js
Last active March 30, 2018 11:56
Pixels - Houdini
registerPaint('pixels', class {
static get inputProperties() { return ['--size', '--art']; }
paint(ctx, geom, properties) {
const size = properties.get('--size').toString();
const art = JSON.parse(properties.get('--art').toString());
Object.keys(art).forEach(index => {
const row = art[index];
Object.keys(row).forEach(index2 => {
const column = row[index2];
<div id="app">
<p> {{ message }} </p>
</div>
import angular from 'angular';
import component from './home.view.js'; // this includes the home.view.js file and creates an angular 1.5 component below
const module = angular.module('app.shell.modules.home', []);
module.component('shellHome', component);
export default module.name;
it('should return objects', function () {
var backend = { transfer: sandbox.stub() };
var stub2 = sandbox.stub(repository, 'getMails').returns([
{id: 123, to: '[email protected]', body: 'aaaa...'},
{id: 123, to: '[email protected]', body: 'bbb...'}
]);
mailSystem.transferEuriMails(backend);
expect(stub2).to.have.been.called;