Skip to content

Instantly share code, notes, and snippets.

View doug2k1's full-sized avatar

Douglas Matoso doug2k1

  • Campinas - SP - Brazil
View GitHub Profile
class UserListContainer extends React.Component {
constructor () {
super();
this.state = {
users: []
};
}
componentDidMount () {
class UserList extends React.Component {
render () {
return (
<ul>
{this.props.users.map(user => <li key={user.id}>{user.name}</li>)}
</ul>
);
}
}
class UserList extends React.Component {
constructor () {
super();
this.state = {
users: []
};
}
componentDidMount () {
fetch('/users').then(users => {
@doug2k1
doug2k1 / checkBook.gs
Last active January 19, 2017 14:14
Google Script to check Packt free book
/*
The purpose of this script is to daily check Packt's Free Book offer
and notify via e-mail with the title of the book and link to download page
-> https://www.packtpub.com/packt/offers/free-learning
Author: Douglas Matoso - www.dmatoso.com
Instructions:
1) Create a new Google Script at http://script.google.com
2) Paste the code below, putting your email in the "email" var.