Skip to content

Instantly share code, notes, and snippets.

View Maloric's full-sized avatar

Jamie Morris Maloric

View GitHub Profile
@Maloric
Maloric / random-data.spec.ts
Last active October 21, 2019 16:37
Random Data Generators
class RandomDataFactory<T> {
constructor(private generatorFn: (...args: any[]) => T) {}
getOne(...args: any[]): T {
return this.generatorFn(...args);
}
getArray(length: number = 20, ...args: any[]): T[] {
return Array.from(new Array(length)).map((_, i) => this.getOne(...args));
}
@Maloric
Maloric / Gruntfile.js
Last active February 16, 2016 10:56
Atom Grunt Runner failure when using RequireJS
'use strict';
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.initConfig({});
grunt.registerTask('test', function(target) {
grunt.log.warn('It\'s alive!');
});
};