Skip to content

Instantly share code, notes, and snippets.

View michelmattos's full-sized avatar
:octocat:

Michel Mattos michelmattos

:octocat:
View GitHub Profile

Keybase proof

I hereby claim:

  • I am michelmattos on github.
  • I am hashthunder (https://keybase.io/hashthunder) on keybase.
  • I have a public key ASBdrSCmaFa32YgUupd4EplkmGEvp2bUD9Rq3GAGOkdQxwo

To claim this, I am signing this object:

@michelmattos
michelmattos / CommentBoxTest.js
Created March 23, 2017 09:50
A helper module for testing React components using jsdom, jquery and chai-jquery
import { renderComponent, expect } from './testHelper'
import CommentBox from './CommentBox'
describe('CommentBox', () => {
let component
beforeEach(() => {
component = renderComponent(CommentBox)
})
@michelmattos
michelmattos / componentization.js
Last active August 29, 2015 14:27
A "sugar" way to use Mithril's m.component.
'use strict';
var m = require('mithril');
function isObject(object) {
return {}.toString.call(object) === "[object Object]";
}
module.exports = function(component) {
return function() {
var args = [].slice.call(arguments),
@michelmattos
michelmattos / Configuration.cs
Last active August 29, 2015 14:11
How to "seed" an user using migrations with ASP.net MVC 5
namespace Identity.Migrations
{
using Identity.Models;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;