Skip to content

Instantly share code, notes, and snippets.

View leolana's full-sized avatar

Leonardo Lana leolana

View GitHub Profile
class SequelizeUsersRepository {
constructor({ userModel }) {
this.userModel = userModel;
}
add(user) {
const { valid, errors } = user.validate();
if(!valid) {
const error = new Error('ValidationError');
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Espelho from './Espelho';
class App extends Component {
constructor(props) {
super(props);
this.state = {
@leolana
leolana / fiddle.html
Created November 28, 2016 18:39 — forked from njouanin/fiddle.html
angularJS zero padding filter
<div ng-app="MyApp">
<h1>Zero padding filter</h1>
<div>
<input type="text" ng-model="ztext" placeholder="Type some text ..." />
</div>
<div>
<h2>Result:</h2>
<p>{{ztext | zpad:4}}</p>
</div
</div>
@leolana
leolana / docs style (bootstrap) - notes
Last active June 27, 2016 03:16 — forked from matthiasg/docs style (bootstrap)
the callouts from the bootstrap documentation
.note {
-ms-border-radius: 3px;
border: 1px solid #eee;
border-left-width: 5px;
border-radius: 3px;
margin: 20px 0;
padding: 20px;
}
.note:first-child {